From: "Rui Huang" <vowstar@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: net-print/hpuld/
Date: Wed, 7 Sep 2022 03:57:03 +0000 (UTC) [thread overview]
Message-ID: <1662522899.fa253e9766d67697c3aa792425e49f8f7a0d1b28.vowstar@gentoo> (raw)
commit: fa253e9766d67697c3aa792425e49f8f7a0d1b28
Author: Huang Rui <vowstar <AT> gmail <DOT> com>
AuthorDate: Wed Sep 7 03:54:59 2022 +0000
Commit: Rui Huang <vowstar <AT> gmail <DOT> com>
CommitDate: Wed Sep 7 03:54:59 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fa253e97
net-print/hpuld: fix 860336,860339
Add missing libusb RDEPEND
Closes: https://bugs.gentoo.org/860336
Closes: https://bugs.gentoo.org/860339
Signed-off-by: Huang Rui <vowstar <AT> gmail.com>
net-print/hpuld/hpuld-1.00.39.15.00.23-r1.ebuild | 111 +++++++++++++++++++++++
1 file changed, 111 insertions(+)
diff --git a/net-print/hpuld/hpuld-1.00.39.15.00.23-r1.ebuild b/net-print/hpuld/hpuld-1.00.39.15.00.23-r1.ebuild
new file mode 100644
index 000000000..e94749ba6
--- /dev/null
+++ b/net-print/hpuld/hpuld-1.00.39.15.00.23-r1.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+MY_PV="$(ver_rs 4 _)"
+SANE_CONF_DIR="/etc/sane.d"
+
+DESCRIPTION="HP Unified Linux Driver (for samsung hardware)"
+HOMEPAGE="https://support.hp.com"
+
+SRC_URI="
+ https://ftp.ext.hp.com/pub/softlib/software13/printers/LaserJet/M437_M443/ULDLINUX_HewlettPackard_V${MY_PV}.zip
+"
+
+S="${WORKDIR}/uld"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~mips ~x86"
+
+IUSE="+scanner"
+
+RDEPEND="
+ dev-libs/libusb
+ net-print/cups
+ scanner? (
+ media-gfx/sane-backends
+ )
+"
+
+DEPEND="
+ ${RDEPEND}
+"
+
+BDEPEND="
+ app-arch/unzip
+"
+
+# Do not complain about CFLAGS etc since it is binary package
+QA_FLAGS_IGNORED=".*"
+QA_PRESTRIPPED="${QA_FLAGS_IGNORED}"
+
+src_unpack() {
+ default
+
+ for f in ${WORKDIR}/*/*.tar.gz; do
+ tar -zxf "$f" -C ${WORKDIR} || die
+ done
+}
+
+src_install() {
+ export AGREE_EULA="y"
+ export CONTINUE_INSTALL="y"
+ export PAGER="$(which cat)"
+
+ # Fix printer install path
+ sed -i "s#\"/opt\"#\"${D}/opt\"#g" noarch/package_utils || die
+ sed -i "s#\"/opt\"#\"${D}/opt\"#g" noarch/pre_install.sh || die
+ sed -i "s#\"\$INSTDIR_CUPS_BACKENDS\"#\"${D}/\$INSTDIR_CUPS_BACKENDS\"#g" noarch/printer.pkg || die
+ sed -i "s#\"\$INSTDIR_CUPS_FILTERS\"#\"${D}/\$INSTDIR_CUPS_FILTERS\"#g" noarch/printer.pkg || die
+ sed -i "s#\"\$INSTDIR_CUPS_PPD\"#\"${D}/\$INSTDIR_CUPS_PPD\"#g" noarch/printer-script.pkg || die
+ sed -i "s#\"\$INSTDIR_LSB_PPD\"#\"${D}/\$INSTDIR_LSB_PPD\"#g" noarch/printer-script.pkg || die
+ # Not use rpm and dpkg
+ sed -i "s#which rpm#which not_found_command_${PN}#g" noarch/package_utils || die
+ sed -i "s#which dpkg#which not_found_command_${PN}#g" noarch/package_utils || die
+
+ # Fix scanner install path
+ sed -i "s#SANE_DIR=/usr/lib\${LIBSFX}/sane#SANE_DIR=${D}/usr/lib\${LIBSFX}/sane#g" noarch/scanner.pkg || die
+ sed -i "s#/usr/lib/sane#${D}/usr/lib\${LIBSFX}/sane#g" noarch/scanner.pkg || die
+ sed -i "s#/usr/share/locale/\$i/LC_MESSAGES/#${D}//usr/share/locale/\$i/LC_MESSAGES#g" noarch/scanner.pkg || die
+ sed -i "s#\$(sane_config)#${D}/\$(sane_config)#g" noarch/scanner-script.pkg || die
+ sed -i "s#\$(udev_rules)#${D}/\$(udev_rules)#g" noarch/scanner-script.pkg || die
+ sed -i "s#\$(hal_rules)#${D}/\$(hal_rules)#g" noarch/scanner-script.pkg || die
+ sed -i "s#\${USERMAP}#${D}/\${USERMAP}#g" noarch/scanner-script.pkg || die
+ sed -i "s# trigger_libusbscanner_hotplug##g" noarch/scanner-script.pkg || die
+ mkdir -p "${D}"/etc/hotplug/usb || die
+
+ if use scanner ; then
+ echo "# Add support for the HP-ULD specific backend. Needs net-print/hpuld installed." > "${S}"/"${PN}".conf || die
+ echo "smfp" > "${S}"/"${PN}".conf || die
+ insinto ${SANE_CONF_DIR}/dll.d
+ doins "${S}"/"${PN}".conf
+
+ sh ./install.sh || die
+ fperms 644 /etc/sane.d/smfp-hewlett-packard.conf
+ else
+ sh ./install-printer.sh || die
+ fi
+}
+
+pkg_postinst() {
+ if use scanner ; then
+ ewarn "If you want to use the scanner,"
+ ewarn "make sure the smfp is listed in ${SANE_CONF_DIR}/dll.d/"${PN}".conf."
+ ewarn "If the geniusvp2 is listed in ${SANE_CONF_DIR}/dll.conf,"
+ ewarn "please comment out it."
+
+ ewarn "You should restart cupsd service after installed $P."
+ ewarn "OpenRC: rc-service cupsd restart"
+ ewarn "systemd: systemctl restart cups.service"
+ fi
+}
+
+pkg_postrm() {
+ if use scanner ; then
+ ewarn "You should restart cupsd service after removed $P."
+ ewarn "OpenRC: rc-service cupsd restart"
+ ewarn "systemd: systemctl restart cups.service"
+ fi
+}
next reply other threads:[~2022-09-07 3:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 3:57 Rui Huang [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-09-07 3:57 [gentoo-commits] repo/proj/guru:dev commit in: net-print/hpuld/ Rui Huang
2022-09-07 3:57 Rui Huang
2022-06-24 11:38 Rui Huang
2022-04-21 12:20 Rui Huang
2022-04-21 12:16 Rui Huang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1662522899.fa253e9766d67697c3aa792425e49f8f7a0d1b28.vowstar@gentoo \
--to=vowstar@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox