From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 28991158095 for ; Fri, 24 Jun 2022 13:24:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2ACB4E07B3; Fri, 24 Jun 2022 13:24:11 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0D379E07A9 for ; Fri, 24 Jun 2022 13:24:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F1A76341A6A for ; Fri, 24 Jun 2022 13:24:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4433B456 for ; Fri, 24 Jun 2022 13:24:08 +0000 (UTC) From: "Andrew Ammerlaan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Ammerlaan" Message-ID: <1656070682.1bee2aa4d91e033cc1d575822dbca7fe79bad3f2.andrewammerlaan@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: net-print/hpuld/ X-VCS-Repository: repo/proj/guru X-VCS-Files: net-print/hpuld/hpuld-1.00.39.15.00.23.ebuild net-print/hpuld/metadata.xml X-VCS-Directories: net-print/hpuld/ X-VCS-Committer: andrewammerlaan X-VCS-Committer-Name: Andrew Ammerlaan X-VCS-Revision: 1bee2aa4d91e033cc1d575822dbca7fe79bad3f2 X-VCS-Branch: master Date: Fri, 24 Jun 2022 13:24:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: eb2f2bce-2be5-4dbf-bfe5-b8c9917b6561 X-Archives-Hash: 9b8875fc7573e71022ed82fa82a9d93b commit: 1bee2aa4d91e033cc1d575822dbca7fe79bad3f2 Author: Huang Rui gmail com> AuthorDate: Fri Jun 24 11:37:31 2022 +0000 Commit: Andrew Ammerlaan gentoo org> CommitDate: Fri Jun 24 11:38:02 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1bee2aa4 net-print/hpuld: fix install error when have rpm Signed-off-by: Huang Rui gmail.com> net-print/hpuld/hpuld-1.00.39.15.00.23.ebuild | 37 ++++++++++----------------- net-print/hpuld/metadata.xml | 2 +- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/net-print/hpuld/hpuld-1.00.39.15.00.23.ebuild b/net-print/hpuld/hpuld-1.00.39.15.00.23.ebuild index ead2296e6..1d31577a8 100644 --- a/net-print/hpuld/hpuld-1.00.39.15.00.23.ebuild +++ b/net-print/hpuld/hpuld-1.00.39.15.00.23.ebuild @@ -4,6 +4,7 @@ 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" @@ -63,6 +64,9 @@ src_install() { 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 @@ -76,25 +80,13 @@ src_install() { mkdir -p "${D}"/etc/hotplug/usb || die if use scanner ; then - local SCDIR="/etc/sane.d" - - if [ -f ${SCDIR}/dll.conf ] ; then - mkdir -p ${D}/${SCDIR} || die - cat ${SCDIR}/dll.conf > ${D}/${SCDIR}/dll.conf || die - if ! grep -q '^smfp$' ${D}/${SCDIR}/dll.conf ; then - echo "# Add support for the HP-ULD specific backend. Needs net-print/hpuld installed." >> ${D}/${SCDIR}/dll.conf || die - echo "smfp" >> ${D}/${SCDIR}/dll.conf || die - fi - if grep -q '^geniusvp2' ${D}/${SCDIR}/dll.conf ; then - # Comment out geniusvp2 backend - sed -i 's/geniusvp2/#geniusvp2/' > ${D}/${SCDIR}/dll.conf || die - fi - else - echo "smfp" >> ${D}/${SCDIR}/dll.conf || die - fi - chmod 664 ${D}/${SCDIR}/dll.conf + 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 @@ -103,8 +95,8 @@ src_install() { pkg_postinst() { if use scanner ; then ewarn "If you want to use the scanner," - ewarn "make sure the smfp is listed in /etc/sane.d/dll.conf." - ewarn "If the geniusvp2 is listed in /etc/sane.d/dll.conf," + 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." @@ -115,9 +107,8 @@ pkg_postinst() { pkg_postrm() { if use scanner ; then - ewarn "After you removed $P," - ewarn "if the smfp is listed in /etc/sane.d/dll.conf" - ewarn "you should remove it to keep clean." - ewarn "If you are just reinstalling, ignore this message." + ewarn "You should restart cupsd service after removed $P." + ewarn "OpenRC: rc-service cupsd restart" + ewarn "systemd: systemctl restart cups.service" fi } diff --git a/net-print/hpuld/metadata.xml b/net-print/hpuld/metadata.xml index 1871ee15e..d32bbab0a 100644 --- a/net-print/hpuld/metadata.xml +++ b/net-print/hpuld/metadata.xml @@ -1,5 +1,5 @@ - + vowstar@gmail.com