### this file is sourced not run
PKGVER=1.34
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=ippusbxd-$PKGVER.tar.gz
MD5SUM=4f61bb7e8034301fb6939e544a669674
SRC_URL=https://github.com/OpenPrinting/ippusbxd/archive/${PKGVER}.tar.gz
BUNDLE=

SLACKREQ='libusb avahi'
SLACKDESC="ippusbxd: ippusbxd $PKGVER (IPP Everywhere USB Printer Driver)
ippusbxd: 
ippusbxd: ippusbxd is a driver that provides enables CUPS to print to 
ippusbxd: IPP-over-USB printers directly without using any vendor driver. 
ippusbxd: Setting is mostly manual at the moment, so make sure you read the 
ippusbxd: docs in /usr/share/doc/ippusbxd-doc.md.
ippusbxd: 
ippusbxd: Only 2nd method (using dummy0) is supported.
ippusbxd: 
ippusbxd: https://github.com/OpenPrinting/ippusbxd
ippusbxd: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/ippusbxd* &&

	# bug
	sed -i -e 's/o2/O2/' src/CMakeLists.txt &&
	
	# build
	make &&

	# install bin and docs
	install -m755 exe/ippusbxd /usr/sbin &&
	install -dm755 /usr/share/man/man8 &&
	install -m644 doc/ippusbxd.8 /usr/share/man/man8 &&
	install -dm755 /usr/share/doc &&
	install -m644 readme.md /usr/share/doc/ippusbxd-doc.md &&

	# we don't install udev-rule because it is systemd-only
	pkg_build_slackdesc
}
