61 lines
2.2 KiB
Bash
61 lines
2.2 KiB
Bash
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
|
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
|
|
|
|
pkgname=ipp-usb
|
|
pkgver=0.9.25
|
|
pkgrel=1
|
|
pkgdesc="allows using the IPP protocol, normally designed for network printers, to be used with USB printers as well"
|
|
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
|
|
url="https://github.com/OpenPrinting/ipp-usb"
|
|
license=('BSD-2-Clause')
|
|
depends=('avahi' 'libusb' 'glibc')
|
|
makedepends=('go')
|
|
backup=(etc/ipp-usb/ipp-usb.conf)
|
|
# ToDo: package goipp and fix ipp-usb - keeps downloading goipp even if present in build system
|
|
#makedepends=('go' 'golang-github-openprinting-goipp')
|
|
source=("$pkgname-$pkgver.tar.gz"::https://github.com/OpenPrinting/ipp-usb/archive/$pkgver.tar.gz
|
|
systemd-service.patch)
|
|
sha256sums=('935f8e64c91f122ee33015b51f12c02f61dcd482a348cebe3b741cfc7e20024e'
|
|
'8cec95d5de1fcc95187c6521971a0239a5503bbc08162e5d67cfef2439e07a76')
|
|
|
|
prepare() {
|
|
cd "$pkgname-$pkgver"
|
|
# fix systemd service file; FS#67526
|
|
patch -Np1 -i ../systemd-service.patch
|
|
# fix Makefile
|
|
sed -i "s/sbin/bin/g" Makefile
|
|
}
|
|
|
|
build() {
|
|
cd "$pkgname-$pkgver"
|
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
|
export CGO_CFLAGS="${CFLAGS}"
|
|
export CGO_CXXFLAGS="${CXXFLAGS}"
|
|
export CGO_LDFLAGS="${LDFLAGS}"
|
|
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
|
|
|
|
#go build -o "$pkgname" .
|
|
make
|
|
}
|
|
|
|
check() {
|
|
cd "$pkgname-$pkgver"
|
|
go test
|
|
}
|
|
|
|
package() {
|
|
cd "$pkgname-$pkgver"
|
|
# https://github.com/OpenPrinting/ipp-usb/blob/master/Makefile
|
|
# DESTDIR and PREFIX are fully f... up so do it our own
|
|
#make DESTDIR="${pkgdir}" install
|
|
|
|
install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
|
|
install -Dm644 ipp-usb.conf "$pkgdir"/etc/ipp-usb/ipp-usb.conf
|
|
install -Dm644 systemd-udev/71-ipp-usb.rules "$pkgdir"/usr/lib/udev/rules.d/71-ipp-usb.rules
|
|
install -Dm644 systemd-udev/ipp-usb.service "$pkgdir"/usr/lib/systemd/system/ipp-usb.service
|
|
install -Dm644 ipp-usb.8 "$pkgdir"/usr/share/man/man8/ipp-usb.8
|
|
install -Dm644 ipp-usb-quirks/* -t "$pkgdir"/usr/share/ipp-usb/quirks
|
|
|
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
}
|