summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2022-06-03 06:24:36 +0100
committerSam James <sam@gentoo.org>2022-06-03 06:29:48 +0100
commit6c9fd029ec53ec921bcbbce3ea12f6c5d01eb270 (patch)
tree8010822b96cd6500644de38d7f9e182fd7a1e85b /app-crypt
parentnet-misc/ntpsec: Improve OpenRC script for ntpd (diff)
downloadgentoo-6c9fd029ec53ec921bcbbce3ea12f6c5d01eb270.tar.gz
gentoo-6c9fd029ec53ec921bcbbce3ea12f6c5d01eb270.tar.bz2
gentoo-6c9fd029ec53ec921bcbbce3ea12f6c5d01eb270.zip
app-crypt/moolticute: Improve OpenRC script
The attached script updates a couple things which effectively is the same as the current model however it follows the modular nature of the declarative syntax. Changes: * Splits start_stop_daemon_args into command_background and command_user options. Closes: https://bugs.gentoo.org/828074 Signed-off-by: Brian Evans <grknight@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-crypt')
-rw-r--r--app-crypt/moolticute/files/moolticuted.init-r112
-rw-r--r--app-crypt/moolticute/moolticute-0.43.19-r1.ebuild66
-rw-r--r--app-crypt/moolticute/moolticute-9999.ebuild4
3 files changed, 80 insertions, 2 deletions
diff --git a/app-crypt/moolticute/files/moolticuted.init-r1 b/app-crypt/moolticute/files/moolticuted.init-r1
new file mode 100644
index 000000000000..8c4942a34935
--- /dev/null
+++ b/app-crypt/moolticute/files/moolticuted.init-r1
@@ -0,0 +1,12 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+command=/usr/bin/moolticuted
+command_background="yes"
+pidfile=/var/run/moolticuted.pid
+command_user="nobody:usb"
+
+depend() {
+ need udev
+}
diff --git a/app-crypt/moolticute/moolticute-0.43.19-r1.ebuild b/app-crypt/moolticute/moolticute-0.43.19-r1.ebuild
new file mode 100644
index 000000000000..ea058a356a20
--- /dev/null
+++ b/app-crypt/moolticute/moolticute-0.43.19-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+if [[ ${PV} == 9999* ]]; then
+ EGIT_REPO_URI="https://github.com/mooltipass/moolticute.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/mooltipass/moolticute/archive/v${PV/_/-}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm"
+fi
+
+inherit xdg-utils qmake-utils udev
+
+DESCRIPTION="Mooltipass crossplatform daemon/tools"
+HOMEPAGE="https://github.com/mooltipass/moolticute"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE=""
+
+RDEPEND="
+ >=dev-libs/libusb-1.0.20
+ dev-qt/qtdbus:5
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qttest:5
+ dev-qt/qtwebsockets:5
+ dev-qt/qtwidgets:5
+"
+BDEPEND="${RDEPEND}
+ dev-qt/linguist-tools:5
+"
+
+S="${WORKDIR}/${P/_/-}"
+
+src_prepare() {
+ default
+
+ # Fill version.h with package version
+ if [[ ${PV} != 9999* ]]; then
+ sed -i "s/\"git\"/\"v${PV/_/-}\"/" src/version.h || die
+ fi
+}
+
+src_configure() {
+ eqmake5 PREFIX="/usr" Moolticute.pro
+}
+
+src_install() {
+ emake install INSTALL_ROOT="${D}"
+
+ udev_dorules "${FILESDIR}/50-mooltipass.rule"
+ newinitd "${FILESDIR}/moolticuted.init-r1" moolticuted
+}
+
+pkg_postinst() {
+ udev_reload
+ xdg_icon_cache_update
+}
+
+pkg_postrm() {
+ xdg_icon_cache_update
+}
diff --git a/app-crypt/moolticute/moolticute-9999.ebuild b/app-crypt/moolticute/moolticute-9999.ebuild
index 08512b4847b9..ea058a356a20 100644
--- a/app-crypt/moolticute/moolticute-9999.ebuild
+++ b/app-crypt/moolticute/moolticute-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -53,7 +53,7 @@ src_install() {
emake install INSTALL_ROOT="${D}"
udev_dorules "${FILESDIR}/50-mooltipass.rule"
- newinitd "${FILESDIR}/moolticuted.init" moolticuted
+ newinitd "${FILESDIR}/moolticuted.init-r1" moolticuted
}
pkg_postinst() {