From 3b47973aa1b19e00ec3a2d64f7b6e05c982ef70e Mon Sep 17 00:00:00 2001 From: odrling Date: Fri, 24 Aug 2018 22:32:36 +0200 Subject: [PATCH] passff-host 1.0.2 --- www-plugins/passff-host/Manifest | 2 + www-plugins/passff-host/metadata.xml | 20 +++++++ .../passff-host/passff-host-1.0.2.ebuild | 56 +++++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 www-plugins/passff-host/Manifest create mode 100644 www-plugins/passff-host/metadata.xml create mode 100644 www-plugins/passff-host/passff-host-1.0.2.ebuild diff --git a/www-plugins/passff-host/Manifest b/www-plugins/passff-host/Manifest new file mode 100644 index 0000000..52e8a53 --- /dev/null +++ b/www-plugins/passff-host/Manifest @@ -0,0 +1,2 @@ +DIST passff-host-1.0.2.json 176 BLAKE2B 8eddc19cd0c072d25afff5cfa86a95d960ae7b986727099a04a1d983b887922f9ad77e940a2c80e0838a169afe81fa3f6529a901998bb98a6750ac888a09c264 SHA512 e4a4b90fb5323c6dbec339b9e67a7d546c6d7a95754fe03b3a4d96396c28de1caba3068b4e936ee0ce0997f865c8b5e53a3da1fb34f0123a04c5889302c28911 +DIST passff-host-1.0.2.py 3163 BLAKE2B c2b22e4e81d83d7f29a0464449fc453db3b6c97bf931216346baf9ae8a9ae238fbbdef669bfb5153ca1fde3b581e028ecaa74966a447a4d185060693732b9b6a SHA512 05bdd6f2418fe134aefd1224ec78555c9c4b6625c5c2e73423fdcdc3f2573214858e7b05b62a69b82a78297e0e73a5936a07ddd1576a2a23e7f30b9894c2e5f7 diff --git a/www-plugins/passff-host/metadata.xml b/www-plugins/passff-host/metadata.xml new file mode 100644 index 0000000..1e9cea8 --- /dev/null +++ b/www-plugins/passff-host/metadata.xml @@ -0,0 +1,20 @@ + + + + + contact@hacktivis.me + + + proxy-maint@gentoo.org + Proxy Maintainers + + + Install plugin for chrome (which also includes opera) + Install plugin for chromium + Install plugin for firefox + Install plugin for vivaldi + + + passff/passff-host + + diff --git a/www-plugins/passff-host/passff-host-1.0.2.ebuild b/www-plugins/passff-host/passff-host-1.0.2.ebuild new file mode 100644 index 0000000..90b8f99 --- /dev/null +++ b/www-plugins/passff-host/passff-host-1.0.2.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python3_4 python3_5 python3_6 ) + +inherit python-single-r1 + +DESCRIPTION="Host app for the PassFF WebExtension" +HOMEPAGE="https://github.com/passff/passff-host" + +# Using raw because of difference between git and release +# See https://github.com/passff/passff-host/issues/18 +SRC_URI=" + https://github.com/passff/passff-host/raw/${PV}/src/passff.py -> ${P}.py + https://github.com/passff/passff-host/raw/${PV}/src/passff.json -> ${P}.json +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="chrome chromium firefox vivaldi" +REQUIRED_USE="|| ( chrome chromium firefox vivaldi )" + +S="${WORKDIR}" + +src_unpack() { + cp "${DISTDIR}/${P}.json" . || die + cp "${DISTDIR}/${P}.py" . || die +} + +src_prepare() { + default + + sed -i "s/_VERSIONHOLDER_/${PV}/" "${P}.py" || die + 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" ) + 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 +}