# Description: HP print/scan/fax support # URL: http://hplipopensource.com # Maintainer: Petar Petrov, slackalaxy at gmail dot com # Depends on: cups gnutls libidn2 qt5 sane # Conflicts: hpcups name=hplip version=3.24.4 release=3 source=(http://downloads.sourceforge.net/project/hplip/hplip/$version/hplip-$version.tar.gz 0003-models.dat-Re-add-drivers-missing-from-3.19.1.patch 0018-Allow-non-JPEG-scanning-on-the-HP-DeskJet-3520-All-i.patch 0021-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch 0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch 0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch 0026-remove-unicode-space-from-models.dat fix-desktop-file.patch hplip-covscan.patch hplip-hpaio-gcc14.patch hplip.no.upgrade.diff hplip-pcardext-disable.patch hplip-pserror-c99.patch hplip.python3.shebang.diff hplip-scan-hpaio-include.patch hplip-scan-orblite-c99.patch setup.py.lc_all.c.diff) build() { # hplip will build without sane, as well prt-get isinst sane || SCAN_OPTIONS="--disable-scan-build" # the whole port is based on Slackware's hplip.SlackBuild and patches cd $name-$version patch -p1 -i $SRC/hplip.no.upgrade.diff patch -p1 -i $SRC/setup.py.lc_all.c.diff patch -p1 -i $SRC/hplip.python3.shebang.diff patch -p1 -i $SRC/fix-desktop-file.patch patch -p1 -i $SRC/hplip-pserror-c99.patch patch -p1 -i $SRC/hplip-hpaio-gcc14.patch patch -p1 -i $SRC/hplip-covscan.patch patch -p1 -i $SRC/hplip-scan-orblite-c99.patch patch -p1 -i $SRC/hplip-scan-hpaio-include.patch patch -p1 -i $SRC/hplip-pcardext-disable.patch find -name '*.py' -print0 | xargs -0 \ sed -i.env-python -e 's,^#!/usr/bin/env python,#!/usr/bin/python3,' sed -i.env-python -e 's,^#!/usr/bin/env python,#!/usr/bin/python3,' \ prnt/filters/hpps \ fax/filters/pstotiff patch -p1 -i $SRC/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch patch -p1 -i $SRC/0021-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch patch -p1 -i $SRC/0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch patch -p1 -i $SRC/0003-models.dat-Re-add-drivers-missing-from-3.19.1.patch patch -p1 -i $SRC/0018-Allow-non-JPEG-scanning-on-the-HP-DeskJet-3520-All-i.patch patch -p1 -i $SRC/0026-remove-unicode-space-from-models.dat # for autoreconf for file in NEWS README AUTHORS ChangeLog ; do if [ ! -r $file ]; then touch $file fi done autoreconf -vif PYTHON=/usr/bin/python3 \ ./configure \ --prefix=/usr \ --libdir=/usr/lib \ --with-cupsbackenddir=/usr/lib/cups/backend \ --with-cupsfilterdir=/usr/lib/cups/filter \ --sysconfdir=/etc \ --localstatedir=/var \ --with-hpppddir=/usr/share/ppd/HP \ --with-drvdir=/usr/share/cups/drv/HP \ --enable-hpijs-install \ --enable-shadow-build \ $SCAN_OPTIONS \ --enable-gui-build \ --enable-fax-build \ --enable-doc-build \ --enable-foomatic-rip-hplip-install \ --enable-pp-build \ --disable-foomatic-ppd-install \ --disable-imageProcessor-build \ --enable-foomatic-drv-install \ --enable-network-build=no \ --enable-qt5 \ --enable-policykit \ --enable-cups-ppd-install make make install DESTDIR=$PKG rulesdir=/lib/udev/rules.d # Move dbus configs to system location: mkdir -p $PKG/usr/share/dbus-1/system.d/ mv $PKG/etc/dbus-1/system.d/* $PKG/usr/share/dbus-1/system.d/ rm -rf $PKG/etc/dbus-1/system.d/ # Don't ship .la files: rm -f $PKG/{,usr/}lib/*.la # no docs, please rm -rf $PKG/usr/share/doc # several scripts need this mkdir -p $PKG/var/lib/hp/ # not needed or provided elsewhere rm -rf $PKG/usr/share/hal rm -rf $PKG/etc/sane.d }