archrelease: copy trunk to extra-x86_64
[arch-packages.git] / ps-printer-app / trunk / PKGBUILD
blob85c64b5ccdf4bd8ee7c72b7e54e0587ac28292d1
1 # Maintainer: Andreas Radke <andyrtr@archlinux.org>
3 pkgname=ps-printer-app
4 #_ps-printer-app
5 _commit=a862941362488691b00bf8aad945be248ea9cc7c # master 2020-12-22
6 #_cups-filters_commit=26d6884b3a7ad52d1e7afe8fc25dcd7674c1156b  # master 2020-12-22
7 #_pappl_commit=4a64919a254f1ff3d3dcc7d64b1cdfe78fab4059 #  = 1.0.0
8 pkgver=0.r50.a862941
9 pkgrel=1
10 epoch=
11 pkgdesc="a Printer Application for PostScript printers that uses PAPPL to support IPP printing"
12 arch=('x86_64')
13 url="https://github.com/OpenPrinting/ps-printer-app"
14 license=('Apache')
15 groups=()
16 #depends=('pappl' 'cups-filters')
17 depends=('cups-filters')
18 makedepends=('git' #'libcups' 
19             # to build internal cups-filter static libs
20              'lcms2' 'poppler' 'qpdf' 'imagemagick' 'liblouis' 'ijs' 'systemd'
21              'ghostscript' 'ttf-dejavu' 'python' 'mupdf-tools'
23 checkdepends=()
24 optdepends=()
25 provides=()
26 conflicts=()
27 replaces=()
28 backup=()
29 options=()
30 install=
31 changelog=
32 #source=("$pkgname-$pkgver.tar.gz"
33 #        "$pkgname-$pkgver.patch")
34 source=("git+https://github.com/OpenPrinting/ps-printer-app#commit=$_commit"
35         pappl.zip::https://github.com/michaelrsweet/pappl/archive/master.zip
36         cups-filters.zip::https://github.com/OpenPrinting/cups-filters/archive/master.zip
37 #"git+https://github.com/OpenPrinting/ps-printer-app#commit=$_ps-printer-app_commit"
38         #"git+https://github.com/OpenPrinting/cups-filters#commit=$_cups-filters_commit"
39         #"git+https://github.com/michaelrsweet/pappl.git#commit=$_pappl_commit"
40         )
41 noextract=()
42 sha256sums=('SKIP'
43             'SKIP'
44             'SKIP')
45 #validpgpkeys=()
47 pkgver() {
48   cd $pkgname
49   #git describe --tags | sed 's/-/+/g' | sed 's/v//'
50   #git rev-list --count HEAD # = 25
51   printf "0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" # 0.r25.2e43897
54 #prepare() {
55 #       cd "$pkgname-$pkgver"
56 #       patch -p1 -i "$srcdir/$pkgname-$pkgver.patch"
59 #In file included from ps-printer-app.c:23:
60 #/usr/include/ppd/ppd.h:30:12: fatal error: versioning.h: No such file or directory
61 #   30 | #  include "versioning.h"
62 #      |            ^~~~~~~~~~~~~~
63 #compilation terminated.
64 #make: *** [Makefile:37: ps-printer-app.o] Error 1
67 #^ new cups-filters owns that ppd.h with
68 #  include "versioning.h" that should probably be 
69 #  include <cups/versioning.h>
71 build() {
72   cd "$pkgname"
74 # testing-x86_64-build -r ~/arch64/chroots/ -- -I ~/arch64/packages/cups-filters-1.27.5+298+g26d6884b-1-x86_64.pkg.tar.zst
75 # https://github.com/OpenPrinting/ps-printer-app#building-and-installing
76   
77   pushd ../pappl-master
78   ./configure && make
79   popd
80   
81   pushd ../cups-filters-master
82   ./autogen.sh && ./configure && make
83   popd
84   
85         #cd "$pkgname" #-$pkgver"
86         # ./configure --prefix=/usr
87         #make
88         
89   gcc -v -o ps-printer-app ps-printer-app.c \
90     ../pappl-master/pappl/libpappl.a \
91     ../cups-filters-master/.libs/libppd.a \
92     ../cups-filters-master/.libs/libcupsfilters.a \
93     -ldl -lpthread -lppd -lcups -lavahi-common -lavahi-client -lgnutls -ljpeg -lpng16 -ltiff -lz -lm -lusb-1.0 -lpam -lqpdf -lstdc++ \
94     -I. \
95     -I../pappl-master \
96     -I../cups-filters-master \
97     -I../cups-filters-master/cupsfilters 
101 check() {
102         cd "$pkgname" #-$pkgver"
103 #       make -k check
106 package() {
107         cd "$pkgname" #-$pkgver"
108         #make DESTDIR="$pkgdir/" install
109         
110         # see Makefile
111         install -m755 -Dt "${pkgdir}"/usr/bin ps-printer-app
112         install -m644 -Dt "${pkgdir}"/usr/share/man/man1 ps-printer-app.1
113         install -m644 -Dt "${pkgdir}"/usr/share/ppd generic-ps-printer.ppd
114         install -m644 -Dt "${pkgdir}"/usr/share/ps-printer-app testpage.ps
115         install -m644 -Dt "${pkgdir}"/usr/lib/systemd/system ps-printer-app.service