clean cvs header
[gentoo-zh.git] / net-print / hplip-plugin / hplip-plugin-3.14.1.ebuild
blobc5c0f7f749bed9a1c506fba74859ab544c4ca872
1 # Copyright 1999-2021 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=7
6 inherit unpacker
8 DESCRIPTION="Binary plugin for HPs hplip printer driver library"
9 HOMEPAGE="http://hplipopensource.com/hplip-web/index.html"
10 SRC_URI="http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-${PV}-plugin.run"
12 LICENSE="hplip-plugin"
13 SLOT="0"
14 KEYWORDS="amd64 x86"
15 IUSE=""
17 RDEPEND="
18 ~net-print/hplip-${PV}
20 DEPEND=""
22 S=${WORKDIR}
24 HPLIP_HOME=/usr/share/hplip
26 # Binary prebuilt package
27 QA_PRESTRIPPED="
28 /usr/share/hplip/scan/plugins/bb_marvell.so
29 /usr/share/hplip/scan/plugins/bb_soapht.so
30 /usr/share/hplip/scan/plugins/bb_soap.so
31 /usr/share/hplip/fax/plugins/fax_marvell.so
32 /usr/share/hplip/prnt/plugins/lj.so"
34 # License does not allow us to redistribute the "source" package
35 RESTRICT="mirror"
37 src_unpack() {
38 unpack_makeself "hplip-${PV}-plugin.run"
41 src_install() {
42 local hplip_arch=$(use amd64 && echo 'x86_64' || echo 'x86_32')
44 insinto "${HPLIP_HOME}"/data/firmware
45 doins *.fw.gz
47 for plugin in *-${hplip_arch}.so; do
48 local plugin_type=prnt
49 case "${plugin}" in
50 fax_*) plugin_type=fax ;;
51 bb_*) plugin_type=scan ;;
52 esac
54 exeinto "${HPLIP_HOME}"/${plugin_type}/plugins
55 newexe ${plugin} ${plugin/-${hplip_arch}}
56 done
58 mkdir -p "${D}/var/lib/hp" || die
59 cat >> "${D}/var/lib/hp/hplip.state" << _EOF_ || die
60 [plugin]
61 installed = 1
62 eula = 1
63 version = ${PV}
64 _EOF_