1 # Maintainer: Andreas Radke <andyrtr@archlinux.org>
6 pkgdesc="allows using the IPP protocol, normally designed for network printers, to be used with USB printers as well"
8 url="https://github.com/OpenPrinting/ipp-usb"
9 license=('custom: BSD')
10 depends=('avahi' 'libusb')
12 backup=(etc/ipp-usb/ipp-usb.conf)
13 # ToDo: package goipp and fix ipp-usb - keeps downloading goipp even if present in build system
14 #makedepends=('go' 'golang-github-openprinting-goipp')
15 source=("$pkgname-$pkgver.tar.gz"::https://github.com/OpenPrinting/ipp-usb/archive/$pkgver.tar.gz
16 systemd-service.patch)
17 sha256sums=('81f325abc45b4d2b8812022d93dfcebc807c2b0688e2a9f7052f0bddfadf5b01'
18 '8cec95d5de1fcc95187c6521971a0239a5503bbc08162e5d67cfef2439e07a76')
22 # fix systemd service file; FS#67526
23 patch -Np1 -i ../systemd-service.patch
25 sed -i "s/sbin/bin/g" Makefile
30 export CGO_CPPFLAGS="${CPPFLAGS}"
31 export CGO_CFLAGS="${CFLAGS}"
32 export CGO_CXXFLAGS="${CXXFLAGS}"
33 export CGO_LDFLAGS="${LDFLAGS}"
34 export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
36 #go build -o "$pkgname" .
47 # https://github.com/OpenPrinting/ipp-usb/blob/master/Makefile
48 # DESTDIR and PREFIX are fully f... up so do it our own
49 #make DESTDIR="${pkgdir}" install
51 install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
52 install -Dm644 ipp-usb.conf "$pkgdir"/etc/ipp-usb/ipp-usb.conf
53 install -Dm644 systemd-udev/71-ipp-usb.rules "$pkgdir"/usr/lib/udev/rules.d/71-ipp-usb.rules
54 install -Dm644 systemd-udev/ipp-usb.service "$pkgdir"/usr/lib/systemd/system/ipp-usb.service
55 install -Dm644 ipp-usb.8 "$pkgdir"/usr/share/man/man8/ipp-usb.8
56 install -Dm644 ipp-usb-quirks/* -t "$pkgdir"/usr//share/ipp-usb/quirks
58 install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"