From 4456c756e6e3f911e06a4ff26dd890d8370e1d95 Mon Sep 17 00:00:00 2001 From: Georgy Yakovlev Date: Fri, 31 Dec 2021 04:10:39 -0800 Subject: www-plugins/passff-host: add pinentry to rdepend Signed-off-by: Georgy Yakovlev --- .../passff-host/passff-host-1.2.3-r1.ebuild | 68 ++++++++++++++++++++++ www-plugins/passff-host/passff-host-1.2.3.ebuild | 59 ------------------- 2 files changed, 68 insertions(+), 59 deletions(-) create mode 100644 www-plugins/passff-host/passff-host-1.2.3-r1.ebuild delete mode 100644 www-plugins/passff-host/passff-host-1.2.3.ebuild (limited to 'www-plugins') diff --git a/www-plugins/passff-host/passff-host-1.2.3-r1.ebuild b/www-plugins/passff-host/passff-host-1.2.3-r1.ebuild new file mode 100644 index 000000000000..0f40d6776d69 --- /dev/null +++ b/www-plugins/passff-host/passff-host-1.2.3-r1.ebuild @@ -0,0 +1,68 @@ +# Copyright 2018-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..10} ) + +inherit python-single-r1 + +DESCRIPTION="Host app for the PassFF WebExtension" +HOMEPAGE="https://github.com/passff/passff-host" + +SRC_URI=" + https://github.com/passff/passff-host/releases/download/${PV}/passff.py -> ${P}.py + https://github.com/passff/passff-host/releases/download/${PV}/passff.json -> ${P}.json +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc64 ~x86" +IUSE="chrome chromium +firefox vivaldi" +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + || ( chrome chromium firefox vivaldi ) +" + +RDEPEND=" + ${PYTHON_DEPS} + app-crypt/pinentry +" + +S="${WORKDIR}" + +src_unpack() { + cp "${DISTDIR}/${P}.json" . || die + cp "${DISTDIR}/${P}.py" . || die +} + +src_prepare() { + default + python_fix_shebang "${P}.py" +} + +src_install() { + local target_dirs=() + + use chrome && target_dirs+=( "/etc/opt/chrome/native-messaging-hosts" ) + use chromium && target_dirs+=( "/etc/chromium/native-messaging-hosts" ) + use firefox && target_dirs+=( "/usr/$(get_libdir)/mozilla/native-messaging-hosts" ) + # www-client/firefox-bin compile-time dir is under /usr/lib/ + use firefox && target_dirs+=( "/usr/lib/mozilla/native-messaging-hosts" ) + use vivaldi && target_dirs+=( "/etc/vivaldi/native-messaging-hosts" ) + + for target_dir in "${target_dirs[@]}"; do + sed "s;PLACEHOLDER;${target_dir}/passff.py;g" "${P}.json" > "passff.json" || die + + insinto "${target_dir}" + doins passff.json + exeinto "${target_dir}" + newexe "${P}.py" passff.py + done +} + +pkg_postinst() { + elog "Make sure to use graphical version of pinentry for ${PN} to work properly" + elog "Run 'eselect pinentry list'" + elog "And select 'pinentry-qt5' or 'pinentry-gnome'. efl might work too." +} diff --git a/www-plugins/passff-host/passff-host-1.2.3.ebuild b/www-plugins/passff-host/passff-host-1.2.3.ebuild deleted file mode 100644 index 3c481e7e23ec..000000000000 --- a/www-plugins/passff-host/passff-host-1.2.3.ebuild +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 2018-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7..10} ) - -inherit python-single-r1 - -DESCRIPTION="Host app for the PassFF WebExtension" -HOMEPAGE="https://github.com/passff/passff-host" - -SRC_URI=" - https://github.com/passff/passff-host/releases/download/${PV}/passff.py -> ${P}.py - https://github.com/passff/passff-host/releases/download/${PV}/passff.json -> ${P}.json -" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~ppc64 ~x86" -IUSE="chrome chromium +firefox vivaldi" -REQUIRED_USE=" - ${PYTHON_REQUIRED_USE} - || ( chrome chromium firefox vivaldi ) -" - -RDEPEND="${PYTHON_DEPS}" - -S="${WORKDIR}" - -src_unpack() { - cp "${DISTDIR}/${P}.json" . || die - cp "${DISTDIR}/${P}.py" . || die -} - -src_prepare() { - default - python_fix_shebang "${P}.py" -} - -src_install() { - local target_dirs=() - - use chrome && target_dirs+=( "/etc/opt/chrome/native-messaging-hosts" ) - use chromium && target_dirs+=( "/etc/chromium/native-messaging-hosts" ) - use firefox && target_dirs+=( "/usr/$(get_libdir)/mozilla/native-messaging-hosts" ) - # www-client/firefox-bin compile-time dir is under /usr/lib/ - use firefox && target_dirs+=( "/usr/lib/mozilla/native-messaging-hosts" ) - use vivaldi && target_dirs+=( "/etc/vivaldi/native-messaging-hosts" ) - - for target_dir in "${target_dirs[@]}"; do - sed "s;PLACEHOLDER;${target_dir}/passff.py;g" "${P}.json" > "passff.json" || die - - insinto "${target_dir}" - doins passff.json - exeinto "${target_dir}" - newexe "${P}.py" passff.py - done -} -- cgit v1.2.3-65-gdbad