2021-05-17 17:10:26 +00:00
|
|
|
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
|
2022-11-02 12:37:56 +00:00
|
|
|
# Contributor: Tom Gundersen <teg@jklm.no>
|
2021-05-17 17:10:26 +00:00
|
|
|
# Contributor : Rémy Oudompheng <remy@archlinux.org>
|
|
|
|
# Contributor: Morgan LEFIEUX <comete@archlinuxfr.org>
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
2021-11-05 01:03:38 +00:00
|
|
|
# - patch to remove x86-only ImageProcessor
|
2021-05-17 17:10:26 +00:00
|
|
|
|
|
|
|
pkgname=hplip
|
2022-11-02 12:37:56 +00:00
|
|
|
pkgver=3.22.10
|
2023-01-09 11:08:25 +00:00
|
|
|
pkgrel=2
|
2021-05-17 17:10:26 +00:00
|
|
|
epoch=1
|
|
|
|
pkgdesc="Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet"
|
|
|
|
arch=('x86_64')
|
|
|
|
url="https://hplipopensource.com"
|
|
|
|
license=('GPL2' 'custom')
|
|
|
|
depends=('python-dbus' 'python-distro' 'ghostscript' 'net-snmp' 'foomatic-db-engine' 'python-gobject' 'libxcrypt')
|
|
|
|
makedepends=('python-pyqt5' 'sane' 'rpcbind' 'cups' 'libusb')
|
|
|
|
optdepends=('cups: for printing support'
|
|
|
|
'sane: for scanner support'
|
|
|
|
'xsane: sane scanner frontend'
|
|
|
|
'python-pillow: for commandline scanning support'
|
|
|
|
'python-reportlab: for pdf output in hp-scan'
|
|
|
|
'rpcbind: for network support'
|
|
|
|
'python-pyqt5: for running GUI and hp-toolbox'
|
|
|
|
'libusb: for advanced usb support'
|
|
|
|
'wget: for network support')
|
|
|
|
# 'hplip-plugin: binary blobs for specific devices (AUR) or run hp-setup to download the plugin'
|
|
|
|
backup=('etc/hp/hplip.conf' 'etc/sane.d/dll.d/hpaio')
|
|
|
|
source=(https://downloads.sourceforge.net/${pkgname}/$pkgname-$pkgver.tar.gz{,.asc}
|
|
|
|
disable_upgrade.patch
|
2022-06-03 17:09:28 +00:00
|
|
|
0003-models.dat-Re-add-drivers-missing-from-3.19.1.patch
|
2021-05-17 17:10:26 +00:00
|
|
|
0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
|
|
|
|
0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch
|
2022-06-30 12:49:54 +00:00
|
|
|
0025_fix-Werror-format-security.patch
|
2021-11-05 01:03:38 +00:00
|
|
|
0001-Remove-ImageProcessor.patch
|
2021-05-17 17:10:26 +00:00
|
|
|
# use the one from Fedora
|
|
|
|
hplip-configure-python.patch
|
|
|
|
python3.diff
|
|
|
|
reproducible-gzip.patch)
|
2022-11-02 12:37:56 +00:00
|
|
|
sha512sums=('0be9cd48cddebffb2472f36669ba92edbcf9019cb3b561a9630457949a6e6f13eab552582027b02468b4732e376f17321929502ad4d1f6bb4d5ea1262b171ef7'
|
2021-05-17 17:10:26 +00:00
|
|
|
'SKIP'
|
2023-01-09 11:08:25 +00:00
|
|
|
'a12aaeece5285ffb86bdbc24871bf512fbc1f29da44ae51ded314378032662074a42b8aca23bebb378bf78ed15bb7f99da59bfb4cd456f3458e7a5ef42a900f8'
|
2022-06-03 17:09:28 +00:00
|
|
|
'f79b3f09d022178099f38b9eae1792396e730eb5352a03d088e6610d92b3895f3f65bb92089ce7f5b21d794f9716ceb176d29ca7283e8a48bb04cf6aba305a2f'
|
2021-05-17 17:10:26 +00:00
|
|
|
'22aeb5b851f78bc6bc62e0bc3da99fecaf42d7604af41e2f3343f8d3666541f7b06b7d1a7d0ddf24f1731ac7b12dfe582375a98e3b94dfa323d6ce954549ca67'
|
2022-06-30 12:49:54 +00:00
|
|
|
'b7e67bccb2516f4d98e4c5ea55f7d2299d95bfdc341dbc0149af1423169bedcd8bcfdb125c92f373e9e7be57ea284fef80a8343035fb42572b9cb927929cd257'
|
2021-05-17 17:10:26 +00:00
|
|
|
'763949a0bc460dcc9faefc86f2a91cf342781bfce696ed0c3826758572dd03ac266bbeb7b6a4f9376ac298d7d3c9c4def42d94921a8e1d1695e39396e36d95ff'
|
2021-11-05 03:36:29 +00:00
|
|
|
'7f402ed13341ac9a01f28ecdb97effcd15f5fa9d123e554d4dd78e9f5ed01bcf7b4fe7400c53ddf5e7068f9ffd858d8fefe060e2fcacea0a0524145d78e315cc'
|
2021-05-17 17:10:26 +00:00
|
|
|
'089c102357ea5fd55d81ae76aaff62713f780fd84500c3b92ecd6b2bb11ccdc3a162978548e9a5f9e98a8354a5be3997e416c52daa18eda4621ed79a29d6fea8'
|
2021-12-19 14:12:30 +00:00
|
|
|
'b8a4c860e90a52ec566ca5a9c7f3a5ecb7386ae76e17b2c6c878073e60eeaf0cb63883b740b4725794be9914e1ab8fc91313efb288395f3095f599c07f54cf14'
|
2022-04-30 14:17:49 +00:00
|
|
|
'379fcbe9dc2986da828a174a0ac4e71a1da43a98408894d5e713e09d7d9cba1e9fac30f9602b81d48d992abe6b65b6402b8a07664efe97400c5d839be33cf15f')
|
2021-05-17 17:10:26 +00:00
|
|
|
validpgpkeys=('4ABA2F66DBD5A95894910E0673D770CDA59047B9') # HPLIP (HP Linux Imaging and Printing) <hplip@hp.com>
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd "$pkgname"-$pkgver
|
|
|
|
|
|
|
|
# disable insecure update - https://bugs.archlinux.org/task/38083
|
|
|
|
patch -Np0 -i "${srcdir}"/disable_upgrade.patch
|
|
|
|
# add missing 'include <cups/ppd.h>' at various places
|
|
|
|
patch -Np1 -i "${srcdir}"/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
|
|
|
|
# fix some handling unicode file names FS#58412
|
|
|
|
patch -Np1 -i "${srcdir}"/0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch
|
|
|
|
# Workaround patch for missing Python3 transition of the old
|
|
|
|
# (pre-USB-storage) photo memory card support (pcardext) - Debian patch
|
2022-06-03 17:09:28 +00:00
|
|
|
# fix model support / Debian patch / FS#74942
|
|
|
|
patch -Np1 -i "${srcdir}"/0003-models.dat-Re-add-drivers-missing-from-3.19.1.patch
|
2021-05-17 17:10:26 +00:00
|
|
|
patch -Np1 -i "${srcdir}"/python3.diff
|
|
|
|
# remove imageprocessor
|
2021-11-05 01:03:38 +00:00
|
|
|
patch -Np1 -i "${srcdir}"/0001-Remove-ImageProcessor.patch
|
2022-06-30 12:49:54 +00:00
|
|
|
# fix -Werror=format-security build error with gcc 12
|
|
|
|
patch -Np1 -i "${srcdir}"/0025_fix-Werror-format-security.patch
|
2021-05-17 17:10:26 +00:00
|
|
|
# https://bugs.launchpad.net/hplip/+bug/1879445
|
|
|
|
# broken scanning - https://bugs.archlinux.org/task/66704
|
|
|
|
patch -Np1 -i ../hplip-configure-python.patch
|
|
|
|
|
|
|
|
# make gzip creation reproducible by removing the timestamp
|
|
|
|
patch -Np1 -i ../reproducible-gzip.patch
|
|
|
|
|
|
|
|
export AUTOMAKE='automake --foreign'
|
|
|
|
autoreconf --force --install
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "$pkgname"-$pkgver
|
|
|
|
./configure --prefix=/usr \
|
|
|
|
--enable-qt5 \
|
|
|
|
--disable-qt4 \
|
|
|
|
--enable-hpcups-install \
|
|
|
|
--enable-cups-drv-install \
|
|
|
|
--disable-imageProcessor-build \
|
|
|
|
--enable-pp-build #--help
|
|
|
|
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
|
|
|
make
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd "$pkgname"-$pkgver
|
|
|
|
make -j1 rulesdir=/usr/lib/udev/rules.d DESTDIR="$pkgdir/" install
|
|
|
|
|
|
|
|
# remove config provided by sane and autostart of hp-daemon
|
|
|
|
rm -rf "$pkgdir"/etc/{sane.d,xdg}
|
|
|
|
install -dm755 "${pkgdir}"/etc/sane.d/dll.d
|
|
|
|
echo hpaio > "${pkgdir}"/etc/sane.d/dll.d/hpaio
|
|
|
|
|
|
|
|
# remove HAL .fdi file because HAL is no longer used
|
|
|
|
rm -vrf "$pkgdir"/usr/share/hal
|
|
|
|
|
|
|
|
# remove rc script
|
|
|
|
rm -vrf "$pkgdir"/etc/init.d
|
|
|
|
|
|
|
|
# add mixed license file
|
|
|
|
install -Dt "${pkgdir}"/usr/share/licenses/${pkgname} -m644 COPYING
|
|
|
|
|
|
|
|
# Compile Python bytecode:
|
|
|
|
python -m compileall -d /usr/share "$pkgdir/usr/share"
|
|
|
|
python -O -m compileall -d /usr/share "$pkgdir/usr/share"
|
|
|
|
}
|