summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2021-11-30 18:52:37 +0600
committerJoonas Niilola <juippis@gentoo.org>2021-12-03 15:02:25 +0200
commitfab6223dd54f049cf170e01e17e8aa1d6b2a7f0c (patch)
tree6bedd2d8947893f31d1ec640f599103912d7b1a2 /x11-misc/clipmenu
parentnet-fs/samba: Removed old (diff)
downloadgentoo-fab6223dd54f049cf170e01e17e8aa1d6b2a7f0c.tar.gz
gentoo-fab6223dd54f049cf170e01e17e8aa1d6b2a7f0c.tar.bz2
gentoo-fab6223dd54f049cf170e01e17e8aa1d6b2a7f0c.zip
x11-misc/clipmenu: introduce different launcher options
while the default menu/frontend for clipmenu is dmenu, it can also work with rofi, fzf or any other "menu" application and thus dmenu should not be pulled in as a hard dep. Closes: https://github.com/gentoo/gentoo/pull/23125 Signed-off-by: Nickolas Raymond Kaczynski <nrk@disroot.org> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'x11-misc/clipmenu')
-rw-r--r--x11-misc/clipmenu/clipmenu-6.2.0-r1.ebuild57
-rw-r--r--x11-misc/clipmenu/clipmenu-6.2.0.ebuild34
-rw-r--r--x11-misc/clipmenu/metadata.xml5
3 files changed, 62 insertions, 34 deletions
diff --git a/x11-misc/clipmenu/clipmenu-6.2.0-r1.ebuild b/x11-misc/clipmenu/clipmenu-6.2.0-r1.ebuild
new file mode 100644
index 000000000000..be3e66670c5d
--- /dev/null
+++ b/x11-misc/clipmenu/clipmenu-6.2.0-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd
+
+DESCRIPTION="Clipboard management using dmenu"
+HOMEPAGE="https://github.com/cdown/clipmenu"
+SRC_URI="https://github.com/cdown/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Unlicense"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+dmenu rofi fzf"
+REQUIRED_USE="?? ( dmenu rofi fzf )"
+
+RDEPEND="
+ x11-misc/clipnotify
+ x11-misc/xsel
+ dmenu? ( x11-misc/dmenu )
+ rofi? ( x11-misc/rofi )
+ fzf? ( app-shells/fzf )
+"
+
+src_prepare() {
+ default
+
+ if use rofi ; then
+ sed -i 's|CM_LAUNCHER=dmenu|CM_LAUNCHER=rofi|' clipmenu || die "sed failed"
+ elif use fzf ; then
+ sed -i 's|CM_LAUNCHER=dmenu|CM_LAUNCHER=fzf|' clipmenu || die "sed failed"
+ fi
+}
+
+src_compile() {
+ :
+}
+
+src_install() {
+ local binfile
+ for binfile in clipctl clipdel clipfsck clipmenu clipmenud; do
+ dobin ${binfile}
+ done
+
+ dodoc README.md
+
+ systemd_douserunit "init/clipmenud.service"
+}
+
+pkg_postinst() {
+ if ! use dmenu && ! use rofi && ! use fzf ; then
+ ewarn "Clipmenu has been installed without a launcher."
+ ewarn "You will need to set \$CM_LAUNCHER to a dmenu-compatible app for clipmenu to work."
+ ewarn "Please refer to the documents for more info."
+ fi
+}
diff --git a/x11-misc/clipmenu/clipmenu-6.2.0.ebuild b/x11-misc/clipmenu/clipmenu-6.2.0.ebuild
deleted file mode 100644
index 5ae7092c8f4c..000000000000
--- a/x11-misc/clipmenu/clipmenu-6.2.0.ebuild
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 2020-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit systemd
-
-DESCRIPTION="Clipboard management using dmenu"
-HOMEPAGE="https://github.com/cdown/clipmenu"
-SRC_URI="https://github.com/cdown/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="Unlicense"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE=""
-
-RDEPEND="
- x11-misc/clipnotify
- x11-misc/dmenu
- x11-misc/xsel
-"
-
-src_compile() {
- :
-}
-
-src_install() {
- local binfile
- for binfile in clipctl clipdel clipfsck clipmenu clipmenud; do
- dobin ${binfile}
- done
-
- systemd_douserunit "init/clipmenud.service"
-}
diff --git a/x11-misc/clipmenu/metadata.xml b/x11-misc/clipmenu/metadata.xml
index a057b342f48a..ad77c07f77a8 100644
--- a/x11-misc/clipmenu/metadata.xml
+++ b/x11-misc/clipmenu/metadata.xml
@@ -9,4 +9,9 @@
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
+ <use>
+ <flag name="dmenu">Use dmenu as default launcher</flag>
+ <flag name="rofi">Use rofi as default launcher</flag>
+ <flag name="fzf">Use fzf as default launcher</flag>
+ </use>
</pkgmetadata>