1 |
commit: b29bf7bd1007ec4bdb62d45a1a62a0f4b9588fee |
2 |
Author: Lucian Poston <lucianposton <AT> pm <DOT> me> |
3 |
AuthorDate: Tue Feb 11 22:26:58 2020 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 12 06:24:38 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b29bf7bd |
7 |
|
8 |
www-plugins/passff-host: Install to firefox-bin dir |
9 |
|
10 |
Firefox's directory for native messaging hosts is a compile-time |
11 |
variable. www-client/firefox-bin is set to a directory under /usr/lib/, |
12 |
while www-client/firefox varies. This -r1 bump will install passff-host |
13 |
to both locations so that both firefox and firefox-bin are able to |
14 |
locate the plugin. |
15 |
|
16 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
17 |
Signed-off-by: Lucian Poston <lucianposton <AT> pm.me> |
18 |
Closes: https://bugs.gentoo.org/687746 |
19 |
Closes: https://github.com/gentoo/gentoo/pull/14632 |
20 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
21 |
|
22 |
.../passff-host/passff-host-1.2.1-r1.ebuild | 59 ++++++++++++++++++++++ |
23 |
1 file changed, 59 insertions(+) |
24 |
|
25 |
diff --git a/www-plugins/passff-host/passff-host-1.2.1-r1.ebuild b/www-plugins/passff-host/passff-host-1.2.1-r1.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..ae62d7aaca1 |
28 |
--- /dev/null |
29 |
+++ b/www-plugins/passff-host/passff-host-1.2.1-r1.ebuild |
30 |
@@ -0,0 +1,59 @@ |
31 |
+# Copyright 2018-2020 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+ |
36 |
+PYTHON_COMPAT=( python3_6 python3_7 ) |
37 |
+ |
38 |
+inherit python-single-r1 |
39 |
+ |
40 |
+DESCRIPTION="Host app for the PassFF WebExtension" |
41 |
+HOMEPAGE="https://github.com/passff/passff-host" |
42 |
+ |
43 |
+SRC_URI=" |
44 |
+ https://github.com/passff/passff-host/releases/download/${PV}/passff.py -> ${P}.py |
45 |
+ https://github.com/passff/passff-host/releases/download/${PV}/passff.json -> ${P}.json |
46 |
+" |
47 |
+ |
48 |
+LICENSE="GPL-2" |
49 |
+SLOT="0" |
50 |
+KEYWORDS="~amd64 ~ppc64 ~x86" |
51 |
+IUSE="chrome chromium firefox vivaldi" |
52 |
+REQUIRED_USE=" |
53 |
+ ${PYTHON_REQUIRED_USE} |
54 |
+ || ( chrome chromium firefox vivaldi ) |
55 |
+" |
56 |
+ |
57 |
+RDEPEND="${PYTHON_DEPS}" |
58 |
+ |
59 |
+S="${WORKDIR}" |
60 |
+ |
61 |
+src_unpack() { |
62 |
+ cp "${DISTDIR}/${P}.json" . || die |
63 |
+ cp "${DISTDIR}/${P}.py" . || die |
64 |
+} |
65 |
+ |
66 |
+src_prepare() { |
67 |
+ default |
68 |
+ python_fix_shebang "${P}.py" |
69 |
+} |
70 |
+ |
71 |
+src_install() { |
72 |
+ local target_dirs=() |
73 |
+ |
74 |
+ use chrome && target_dirs+=( "/etc/opt/chrome/native-messaging-hosts" ) |
75 |
+ use chromium && target_dirs+=( "/etc/chromium/native-messaging-hosts" ) |
76 |
+ use firefox && target_dirs+=( "/usr/$(get_libdir)/mozilla/native-messaging-hosts" ) |
77 |
+ # www-client/firefox-bin compile-time dir is under /usr/lib/ |
78 |
+ use firefox && target_dirs+=( "/usr/lib/mozilla/native-messaging-hosts" ) |
79 |
+ use vivaldi && target_dirs+=( "/etc/vivaldi/native-messaging-hosts" ) |
80 |
+ |
81 |
+ for target_dir in "${target_dirs[@]}"; do |
82 |
+ sed "s;PLACEHOLDER;${target_dir}/passff.py;g" "${P}.json" > "passff.json" || die |
83 |
+ |
84 |
+ insinto "${target_dir}" |
85 |
+ doins passff.json |
86 |
+ exeinto "${target_dir}" |
87 |
+ newexe "${P}.py" passff.py |
88 |
+ done |
89 |
+} |