From f73577e64468e6fcb8fe65d9b3eb531c71647d9d Mon Sep 17 00:00:00 2001 From: biopsin Date: Mon, 15 Aug 2022 12:13:38 +0200 Subject: [PATCH 1/2] hplip: update to 3.22.6 Remove 1 patch and add 1 build dependency Tested both packages with hplip-scan & xsane on HP Neverstop Laser MFP 120x. Continue from PR hplip: update to 3.21.12 #35611 Close issue Package Request: hplip-plugin #34845 --- srcpkgs/hplip/template | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/srcpkgs/hplip/template b/srcpkgs/hplip/template index cde79c1cee18..123b5156f355 100644 --- a/srcpkgs/hplip/template +++ b/srcpkgs/hplip/template @@ -1,6 +1,7 @@ # Template file for 'hplip' +# Must be in sync with hplip-plugin package pkgname=hplip -version=3.21.10 +version=3.22.6 revision=1 build_style=gnu-configure pycompile_dirs="usr/share/hplip" @@ -36,7 +37,7 @@ license="GPL-2.0-only, BSD-3-Clause, MIT" homepage="https://developers.hp.com/hp-linux-imaging-and-printing" changelog="https://developers.hp.com/hp-linux-imaging-and-printing/release_notes" distfiles="${SOURCEFORGE_SITE}/hplip/hplip/${version}/hplip-${version}.tar.gz" -checksum=de230e1fdd1e718fc718417265612e0c882949e08fe045ee56f9f9882e6b6a60 +checksum=27ed0d492febb0b47c656234820d3ce573b24ff5b62e3bf4b2c47f82868d6bb4 conflicts="hplip-gui" CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/libusb-1.0 -I${XBPS_CROSS_BASE}/${py3_inc}" From 648d3e67dc9ab6518f3d3ef0f8b848db1cbba235 Mon Sep 17 00:00:00 2001 From: biopsin Date: Mon, 15 Aug 2022 12:19:18 +0200 Subject: [PATCH 2/2] New Package: hplip-plugin-3.22.6. Closes #34845 --- srcpkgs/hplip-plugin/template | 66 +++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 srcpkgs/hplip-plugin/template diff --git a/srcpkgs/hplip-plugin/template b/srcpkgs/hplip-plugin/template new file mode 100644 index 000000000000..c03fb82ba4c4 --- /dev/null +++ b/srcpkgs/hplip-plugin/template @@ -0,0 +1,66 @@ +# Template file for 'hplip-plugin' +# Must be in sync with main hplip package +pkgname=hplip-plugin +version=3.22.6 +revision=1 +archs="i686 x86_64 armv6hf armv7hf aarch64" +hostmakedepends="tar" +short_desc="Binary plugin for HPs hplip printer driver library" +maintainer="biopsin " +license="custom:proprietary" +homepage="https://developers.hp.com/hp-linux-imaging-and-printing/binary_plugin.html" +changelog="https://developers.hp.com/hp-linux-imaging-and-printing/release_notes" +distfiles="https://developers.hp.com/sites/default/files/hplip-${version}-plugin.run" +checksum=3124023e749754bad74b59cf208be5531d31b216f25343a5a5f2ce82164c82fb +repository=nonfree +restricted=yes + +ignore_elf_dirs="/usr/share/hplip" + +do_extract() { + /bin/sh ${XBPS_SRCDISTDIR}/${pkgname}-${version}/hplip-${version}-plugin.run \ + --noexec --target ${wrksrc} +} + +do_install() { + vmkdir usr/share/hplip/data/firmware + vmkdir usr/share/hplip/fax/plugins + vmkdir usr/share/hplip/prnt/plugins + vmkdir usr/share/hplip/scan/plugins + vmkdir usr/share/licenses/hplip-plugin + vmkdir var/lib/hp + + if [ $XBPS_TARGET_MACHINE = "i686" ]; then + _arch='x86_32' + elif [ $XBPS_TARGET_MACHINE = "x86_64" ]; then + _arch='x86_64' + elif [ $XBPS_TARGET_MACHINE = "armv6hf" ]; then + _arch='arm32' + elif [ $XBPS_TARGET_MACHINE = "armv7hf" ]; then + _arch='arm32' + elif [ $XBPS_TARGET_MACHINE = "aarch64" ]; then + _arch='arm64' + fi + + vcopy plugin.spec usr/share/hplip/ + vcopy hp_laserjet_*.fw.gz usr/share/hplip/data/firmware/ + vcopy fax_marvell-"$_arch".so usr/share/hplip/fax/plugins/ + vcopy hbpl1-"$_arch".so usr/share/hplip/prnt/plugins/ + vcopy lj-"$_arch".so usr/share/hplip/prnt/plugins/ + vcopy bb_*-"$_arch".so usr/share/hplip/scan/plugins/ + vlicense license.txt + + cat << EOF > hplip.state +[plugin] +installed = 1 +eula = 1 +version = ${version} +EOF + vcopy hplip.state var/lib/hp + + find "${DESTDIR}/usr/share/hplip" -type f -name "*.so" | while read f; do + lib_dir="${f%/*}" + lib_name="${f##*/}" + ln -sf "$lib_name" "$lib_dir/${lib_name%%-*}.so" + done +}