void-packages/srcpkgs/hplip-plugin/template

66 lines
1.6 KiB
Bash
Raw Normal View History

2023-01-04 08:43:52 +01:00
# Template file for 'hplip-plugin'
# This package must be kept in sync with hplip
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 <biopsin@teknik.io>"
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() {
local _arch _f
case "$XBPS_TARGET_MACHINE" in
i686) _arch='x86_32' ;;
x86_64) _arch='x86_64' ;;
armv[67]l) _arch='arm32' ;;
aarch64) _arch='arm64' ;;
esac
vinstall plugin.spec 0644 usr/share/hplip
for _f in hp_laserjet_*.fw.gz; do
vinstall "${_f}" 0644 usr/share/hplip/data/firmware
done
vinstall "fax_marvell-${_arch}.so" 0755 \
usr/share/hplip/fax/plugins fax_marvell.so
vinstall "hbpl1-${_arch}.so" 0755 \
usr/share/hplip/prnt/plugins hbpl1.so
vinstall "lj-${_arch}.so" 0755 \
usr/share/hplip/prnt/plugins lj.so
for _f in bb_*-"${_arch}.so"; do
vinstall "${_f}" 0755 \
usr/share/hplip/scan/plugins "${_f/-${_arch}}"
done
vlicense license.txt
cat <<-EOF > hplip.state
[plugin]
installed = 1
eula = 1
version = ${version}
EOF
vinstall hplip.state 0644 var/lib/hp
}