From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1411627-garchives=archives.gentoo.org@lists.gentoo.org> 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 B7989158094 for <garchives@archives.gentoo.org>; Fri, 24 Jun 2022 11:38:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 07AB5E08CA; Fri, 24 Jun 2022 11:38:23 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B4350E08CA for <gentoo-commits@lists.gentoo.org>; Fri, 24 Jun 2022 11:38:22 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A544D3419D5 for <gentoo-commits@lists.gentoo.org>; Fri, 24 Jun 2022 11:38:21 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3D58C4F2 for <gentoo-commits@lists.gentoo.org>; Fri, 24 Jun 2022 11:38:20 +0000 (UTC) From: "Rui Huang" <vowstar@gmail.com> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Rui Huang" <vowstar@gmail.com> Message-ID: <1656070682.1bee2aa4d91e033cc1d575822dbca7fe79bad3f2.vowstar@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev 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: vowstar X-VCS-Committer-Name: Rui Huang X-VCS-Revision: 1bee2aa4d91e033cc1d575822dbca7fe79bad3f2 X-VCS-Branch: dev Date: Fri, 24 Jun 2022 11:38:20 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: dfbba089-3a1d-4503-bbf2-763becc5f625 X-Archives-Hash: 0bfccf9c932270d5538afa0fabcea591 commit: 1bee2aa4d91e033cc1d575822dbca7fe79bad3f2 Author: Huang Rui <vowstar <AT> gmail <DOT> com> AuthorDate: Fri Jun 24 11:37:31 2022 +0000 Commit: Rui Huang <vowstar <AT> gmail <DOT> com> 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 <vowstar <AT> 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 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> <email>vowstar@gmail.com</email>