1 |
commit: fab6223dd54f049cf170e01e17e8aa1d6b2a7f0c |
2 |
Author: NRK <nrk <AT> disroot <DOT> org> |
3 |
AuthorDate: Tue Nov 30 12:52:37 2021 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 3 13:02:25 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fab6223d |
7 |
|
8 |
x11-misc/clipmenu: introduce different launcher options |
9 |
|
10 |
while the default menu/frontend for clipmenu is dmenu, it can also work |
11 |
with rofi, fzf or any other "menu" application and thus dmenu should not |
12 |
be pulled in as a hard dep. |
13 |
|
14 |
Closes: https://github.com/gentoo/gentoo/pull/23125 |
15 |
Signed-off-by: Nickolas Raymond Kaczynski <nrk <AT> disroot.org> |
16 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
17 |
|
18 |
x11-misc/clipmenu/clipmenu-6.2.0-r1.ebuild | 57 ++++++++++++++++++++++++++++++ |
19 |
x11-misc/clipmenu/clipmenu-6.2.0.ebuild | 34 ------------------ |
20 |
x11-misc/clipmenu/metadata.xml | 5 +++ |
21 |
3 files changed, 62 insertions(+), 34 deletions(-) |
22 |
|
23 |
diff --git a/x11-misc/clipmenu/clipmenu-6.2.0-r1.ebuild b/x11-misc/clipmenu/clipmenu-6.2.0-r1.ebuild |
24 |
new file mode 100644 |
25 |
index 000000000000..be3e66670c5d |
26 |
--- /dev/null |
27 |
+++ b/x11-misc/clipmenu/clipmenu-6.2.0-r1.ebuild |
28 |
@@ -0,0 +1,57 @@ |
29 |
+# Copyright 2020-2021 Gentoo Authors |
30 |
+# Distributed under the terms of the GNU General Public License v2 |
31 |
+ |
32 |
+EAPI=7 |
33 |
+ |
34 |
+inherit systemd |
35 |
+ |
36 |
+DESCRIPTION="Clipboard management using dmenu" |
37 |
+HOMEPAGE="https://github.com/cdown/clipmenu" |
38 |
+SRC_URI="https://github.com/cdown/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
39 |
+ |
40 |
+LICENSE="Unlicense" |
41 |
+SLOT="0" |
42 |
+KEYWORDS="amd64 x86" |
43 |
+IUSE="+dmenu rofi fzf" |
44 |
+REQUIRED_USE="?? ( dmenu rofi fzf )" |
45 |
+ |
46 |
+RDEPEND=" |
47 |
+ x11-misc/clipnotify |
48 |
+ x11-misc/xsel |
49 |
+ dmenu? ( x11-misc/dmenu ) |
50 |
+ rofi? ( x11-misc/rofi ) |
51 |
+ fzf? ( app-shells/fzf ) |
52 |
+" |
53 |
+ |
54 |
+src_prepare() { |
55 |
+ default |
56 |
+ |
57 |
+ if use rofi ; then |
58 |
+ sed -i 's|CM_LAUNCHER=dmenu|CM_LAUNCHER=rofi|' clipmenu || die "sed failed" |
59 |
+ elif use fzf ; then |
60 |
+ sed -i 's|CM_LAUNCHER=dmenu|CM_LAUNCHER=fzf|' clipmenu || die "sed failed" |
61 |
+ fi |
62 |
+} |
63 |
+ |
64 |
+src_compile() { |
65 |
+ : |
66 |
+} |
67 |
+ |
68 |
+src_install() { |
69 |
+ local binfile |
70 |
+ for binfile in clipctl clipdel clipfsck clipmenu clipmenud; do |
71 |
+ dobin ${binfile} |
72 |
+ done |
73 |
+ |
74 |
+ dodoc README.md |
75 |
+ |
76 |
+ systemd_douserunit "init/clipmenud.service" |
77 |
+} |
78 |
+ |
79 |
+pkg_postinst() { |
80 |
+ if ! use dmenu && ! use rofi && ! use fzf ; then |
81 |
+ ewarn "Clipmenu has been installed without a launcher." |
82 |
+ ewarn "You will need to set \$CM_LAUNCHER to a dmenu-compatible app for clipmenu to work." |
83 |
+ ewarn "Please refer to the documents for more info." |
84 |
+ fi |
85 |
+} |
86 |
|
87 |
diff --git a/x11-misc/clipmenu/clipmenu-6.2.0.ebuild b/x11-misc/clipmenu/clipmenu-6.2.0.ebuild |
88 |
deleted file mode 100644 |
89 |
index 5ae7092c8f4c..000000000000 |
90 |
--- a/x11-misc/clipmenu/clipmenu-6.2.0.ebuild |
91 |
+++ /dev/null |
92 |
@@ -1,34 +0,0 @@ |
93 |
-# Copyright 2020-2021 Gentoo Authors |
94 |
-# Distributed under the terms of the GNU General Public License v2 |
95 |
- |
96 |
-EAPI=7 |
97 |
- |
98 |
-inherit systemd |
99 |
- |
100 |
-DESCRIPTION="Clipboard management using dmenu" |
101 |
-HOMEPAGE="https://github.com/cdown/clipmenu" |
102 |
-SRC_URI="https://github.com/cdown/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
103 |
- |
104 |
-LICENSE="Unlicense" |
105 |
-SLOT="0" |
106 |
-KEYWORDS="amd64 x86" |
107 |
-IUSE="" |
108 |
- |
109 |
-RDEPEND=" |
110 |
- x11-misc/clipnotify |
111 |
- x11-misc/dmenu |
112 |
- x11-misc/xsel |
113 |
-" |
114 |
- |
115 |
-src_compile() { |
116 |
- : |
117 |
-} |
118 |
- |
119 |
-src_install() { |
120 |
- local binfile |
121 |
- for binfile in clipctl clipdel clipfsck clipmenu clipmenud; do |
122 |
- dobin ${binfile} |
123 |
- done |
124 |
- |
125 |
- systemd_douserunit "init/clipmenud.service" |
126 |
-} |
127 |
|
128 |
diff --git a/x11-misc/clipmenu/metadata.xml b/x11-misc/clipmenu/metadata.xml |
129 |
index a057b342f48a..ad77c07f77a8 100644 |
130 |
--- a/x11-misc/clipmenu/metadata.xml |
131 |
+++ b/x11-misc/clipmenu/metadata.xml |
132 |
@@ -9,4 +9,9 @@ |
133 |
<email>proxy-maint@g.o</email> |
134 |
<name>Proxy Maintainers</name> |
135 |
</maintainer> |
136 |
+ <use> |
137 |
+ <flag name="dmenu">Use dmenu as default launcher</flag> |
138 |
+ <flag name="rofi">Use rofi as default launcher</flag> |
139 |
+ <flag name="fzf">Use fzf as default launcher</flag> |
140 |
+ </use> |
141 |
</pkgmetadata> |