net-print/hplip-plugin: Version bump to 3.20.2
authorJames Le Cuirot <chewi@gentoo.org>
Mon, 30 Mar 2020 22:05:02 +0000 (23:05 +0100)
committerJames Le Cuirot <chewi@gentoo.org>
Mon, 30 Mar 2020 22:05:02 +0000 (23:05 +0100)
Package-Manager: Portage-2.3.96, Repoman-2.3.20
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
net-print/hplip-plugin/Manifest
net-print/hplip-plugin/hplip-plugin-3.20.2.ebuild [new file with mode: 0644]

index 1547c6d7f8675b56651ddd7b0cbda0237c20d402..836977931cf219188480f026aa45627fda30f4fb 100644 (file)
@@ -1 +1,2 @@
 DIST hplip-3.19.12-plugin.run 11512079 BLAKE2B 534cbba51b2254f8227611b8f0449e100361fb445400f664e43e30412be8eb554bb35c2fe260d45cd5ad742b083af6d551532a9d14585029b0ff93675fab578a SHA512 ac2022d555f5084d5bf1e4519ddbb29828e9ca385aa6dff818ae9e79b60b4b2745e31ad4146cb01bca3747fae0d61b96e4a823b81179d2e2c55a643831165e4b
+DIST hplip-3.20.2-plugin.run 11517273 BLAKE2B 2e1a4829fad70c575ee86b02b80057cf5e3bd7d6ef2e5d76a532290b699ec908ef57e568938607ce8ee7ff8150aa4096ce6425023ce671150b7fac69310ec82b SHA512 632e9d5a0381b568fb1766df493134b9d8c53c13bd5da1e7e06fdf8369d8f30205378e64fec3372104b44ce6ed6a5e9c1f587914f0ad6454a750d07d384e5d28
diff --git a/net-print/hplip-plugin/hplip-plugin-3.20.2.ebuild b/net-print/hplip-plugin/hplip-plugin-3.20.2.ebuild
new file mode 100644 (file)
index 0000000..3151365
--- /dev/null
@@ -0,0 +1,71 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit unpacker
+
+DESCRIPTION="Proprietary plugins and firmware for HPLIP"
+HOMEPAGE="https://developers.hp.com/hp-linux-imaging-and-printing/plugins"
+SRC_URI="https://developers.hp.com/sites/default/files/hplip-${PV}-plugin.run"
+LICENSE="hplip-plugin"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+RDEPEND="
+       ~net-print/hplip-${PV}
+       virtual/libusb:0
+       virtual/udev
+"
+DEPEND=""
+
+S=${WORKDIR}
+
+HPLIP_HOME=/usr/share/hplip
+
+# Binary prebuilt package
+QA_PRESTRIPPED="
+       /usr/share/hplip/fax/plugins/fax_marvell.so
+       /usr/share/hplip/prnt/plugins/hbpl1.so
+       /usr/share/hplip/prnt/plugins/lj.so
+       /usr/share/hplip/scan/plugins/bb_escl.so
+       /usr/share/hplip/scan/plugins/bb_marvell.so
+       /usr/share/hplip/scan/plugins/bb_soapht.so
+       /usr/share/hplip/scan/plugins/bb_soap.so
+"
+
+# License does not allow us to redistribute the "source" package
+RESTRICT="mirror"
+
+src_install() {
+       local hplip_arch
+       case "${ARCH}" in
+               amd64) hplip_arch="x86_64" ;;
+               arm)   hplip_arch="arm32"  ;;
+               x86)   hplip_arch="x86_32" ;;
+               *)     die "Unsupported architecture." ;;
+       esac
+
+       insinto "${HPLIP_HOME}"/data/firmware
+       doins *.fw.gz
+
+       for plugin in *-${hplip_arch}.so; do
+               local plugin_type=prnt
+               case "${plugin}" in
+                       fax_*) plugin_type=fax ;;
+                       bb_*)  plugin_type=scan ;;
+               esac
+
+               exeinto "${HPLIP_HOME}"/${plugin_type}/plugins
+               newexe ${plugin} ${plugin/-${hplip_arch}}
+       done
+
+       insinto /var/lib/hp
+       newins - hplip.state <<-_EOF_
+               [plugin]
+               installed = 1
+               eula = 1
+               version = ${PV}
+       _EOF_
+}