pkgname=hplip pkgver=3.23.12 # incase a or b is used in hplip rls: _pkgver=3.23.12 pkgrel=2 pkgdesc="Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet." arch=('x86_64') url="https://developers.hp.com/hp-linux-imaging-and-printing" license=('GPL') depends=('ghostscript' 'foomatic-db' 'foomatic-db-engine' 'cups' 'net-snmp' 'libusb' 'wget' 'python3-gobject3' 'pyqt5-python3' 'python3-distro' 'libxcrypt') makedepends=('pkgconfig' 'sane' 'rpcbind' 'dbus-python3') optdepends=('dbus-python3: for dbus support' 'sane: for scanner support' 'rpcbind: for network support') options=('!libtool') install=${pkgname}.install source=("https://downloads.sourceforge.net/hplip/${pkgname}-${_pkgver}.tar.gz" 'imageprocessor.patch') md5sums=('86be3fb32bb360a16db08139aacb2a70' '02df8be3c3e33abe6293a8b526f599a0') build() { cd ${pkgname}-${_pkgver} # https://github.com/KaOSx/main/issues/31, patch file prnt/filters/hpps #patch -p2 -i ${srcdir}/patch # https://bugs.launchpad.net/hplip/+bug/1785230, remove closed source parts, breaking hplip > 3.18.6 #patch -p1 -i ${srcdir}/imageprocessor.patch export AUTOMAKE='automake --foreign' autoreconf --force --install ./configure --prefix=/usr \ --disable-qt4 \ --enable-qt5 \ --enable-hpcups-install \ --enable-new-hpcups \ --enable-cups-ppd-install \ --enable-cups-drv-install \ --enable-pp-build make } package() { cd ${pkgname}-${_pkgver} make -j4 rulesdir=/usr/lib/udev/rules.d DESTDIR=${pkgdir}/ install install prnt/hpcups/libImageProcessor-x86_64.so ${pkgdir}/usr/lib ln -s libImageProcessor-x86_64.so ${pkgdir}/usr/lib/libImageProcessor.so # remove sane conflicts and obsolete files rm -rf ${pkgdir}/etc/{sane.d,xdg} rm -vrf ${pkgdir}/usr/share/hal rm -vrf $pkgdir/etc/init.d # .desktop file showing in Lost & Found echo "Categories=Application;Utility;" >> ${pkgdir}/usr/share/applications/hp-uiscan.desktop sed -i -e 's|/usr/share/icons/Humanity/devices/48/printer.svg|/usr/share/hplip/data/images/128x128/hp_logo.png|' ${pkgdir}/usr/share/applications/hp-uiscan.desktop python3 -m compileall -d /usr/share ${pkgdir}/usr/share python3 -O -m compileall -d /usr/share ${pkgdir}/usr/share }