summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-misc')
-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>