1 # Maintainer: Andreas Radke <andyrtr@archlinux.org>
5 _commit=a862941362488691b00bf8aad945be248ea9cc7c # master 2020-12-22
6 #_cups-filters_commit=26d6884b3a7ad52d1e7afe8fc25dcd7674c1156b # master 2020-12-22
7 #_pappl_commit=4a64919a254f1ff3d3dcc7d64b1cdfe78fab4059 # = 1.0.0
11 pkgdesc="a Printer Application for PostScript printers that uses PAPPL to support IPP printing"
13 url="https://github.com/OpenPrinting/ps-printer-app"
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'
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"
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
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"
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>
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
81 pushd ../cups-filters-master
82 ./autogen.sh && ./configure && make
85 #cd "$pkgname" #-$pkgver"
86 # ./configure --prefix=/usr
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++ \
96 -I../cups-filters-master \
97 -I../cups-filters-master/cupsfilters
102 cd "$pkgname" #-$pkgver"
107 cd "$pkgname" #-$pkgver"
108 #make DESTDIR="$pkgdir/" install
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