From 0c17bd70a7e654097e814e02cb320f1e73cca778 Mon Sep 17 00:00:00 2001 From: dataCobra Date: Thu, 10 Nov 2022 06:56:23 +0100 Subject: [PATCH] New package: hplip-plugin-3.22.10 --- srcpkgs/hplip-plugin/template | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 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 00000000000000..a7fe4808c98541 --- /dev/null +++ b/srcpkgs/hplip-plugin/template @@ -0,0 +1,61 @@ +# Template file for 'hplip-plugin' +# Must be in sync with main hplip package +pkgname=hplip-plugin +version=3.22.10 +revision=1 +archs="i686 x86_64 armv[67]l 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=bb9648ea0626a9b3cfa29e260348d5d617f328c55b66eda346384c04f4740b1f +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 + + case "$XBPS_TARGET_MACHINE" in + i686) _arch='x86_32' ;; + x86_64) _arch='x86_64' ;; + armv[67]l) _arch='arm32' ;; + aarch64) _arch='arm64' ;; + esac + + 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 +}