diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2020-12-14 17:48:13 +0100 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2020-12-14 18:17:37 +0100 |
commit | 64bc2dea286b22f4cce895ece50684affd6bf215 (patch) | |
tree | 1de744c29bcc39fdeb6c3d10515571094c466218 /dev-libs/libratbag | |
parent | app-misc/piper-0.5.1: New support package (diff) | |
download | gentoo-64bc2dea286b22f4cce895ece50684affd6bf215.tar.gz gentoo-64bc2dea286b22f4cce895ece50684affd6bf215.tar.bz2 gentoo-64bc2dea286b22f4cce895ece50684affd6bf215.zip |
dev-libs/libratbag: ebuild enhancements
- use systemd.eclass to determine systemunitdir
- Set plugdev group as the unix group that may access ratbagd via dbus
- (R)DEPEND on acct-group/plugdev
- Add openrc init script for ratbagd
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'dev-libs/libratbag')
-rw-r--r-- | dev-libs/libratbag/files/ratbagd.init | 13 | ||||
-rw-r--r-- | dev-libs/libratbag/libratbag-0.15.ebuild | 17 | ||||
-rw-r--r-- | dev-libs/libratbag/metadata.xml | 5 |
3 files changed, 32 insertions, 3 deletions
diff --git a/dev-libs/libratbag/files/ratbagd.init b/dev-libs/libratbag/files/ratbagd.init new file mode 100644 index 000000000000..d3e7d08334ce --- /dev/null +++ b/dev-libs/libratbag/files/ratbagd.init @@ -0,0 +1,13 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="system daemon to introspect and modify configurable mice" +pidfile="/run/${SVCNAME}.pid" +command="/usr/bin/ratbagd" +start_stop_daemon_args="--quiet" +command_background="true" + +depend() { + need dbus +} diff --git a/dev-libs/libratbag/libratbag-0.15.ebuild b/dev-libs/libratbag/libratbag-0.15.ebuild index 599db86cfd67..bd064182e849 100644 --- a/dev-libs/libratbag/libratbag-0.15.ebuild +++ b/dev-libs/libratbag/libratbag-0.15.ebuild @@ -5,7 +5,7 @@ EAPI=7 PYTHON_COMPAT=( python3_{6,7,8} ) -inherit meson python-single-r1 udev +inherit meson python-single-r1 systemd udev DESCRIPTION="Library to configure gaming mice" HOMEPAGE="https://github.com/libratbag/libratbag" @@ -37,6 +37,7 @@ BDEPEND=" " RDEPEND=" ${PYTHON_DEPS} + acct-group/plugdev dev-libs/gobject-introspection dev-libs/libevdev virtual/libudev @@ -63,10 +64,12 @@ src_configure() { python_setup local emesonargs=( - $(meson_use systemd) - -Dlogind-provider=$(usex elogind elogind systemd) $(meson_use doc documentation) + $(meson_use systemd) $(meson_use test tests) + -Ddbus-group="plugdev" + -Dlogind-provider=$(usex elogind elogind systemd) + -Dsystemd-unit-dir="$(systemd_get_systemunitdir)" -Dudev-dir="${EPREFIX}$(get_udevdir)" ) @@ -76,4 +79,12 @@ src_configure() { src_install() { meson_src_install python_fix_shebang "${ED}"/usr/bin/ + newinitd "${FILESDIR}"/ratbagd.init ratbagd +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]] ; then + elog 'You need to be in "plugdev" group in order to access the' + elog 'ratbagd dbus interface' + fi } diff --git a/dev-libs/libratbag/metadata.xml b/dev-libs/libratbag/metadata.xml index 2ae9cbec3558..f0fab9cd91af 100644 --- a/dev-libs/libratbag/metadata.xml +++ b/dev-libs/libratbag/metadata.xml @@ -9,6 +9,11 @@ <email>proxy-maint@gentoo.org</email> <name>Proxy Maintainers</name> </maintainer> + <maintainer type="person"> + <email>polynomial-c@gentoo.org</email> + <name>Lars Wendler</name> + <description>Proxy maintainer for Alex</description> + </maintainer> <upstream> <remote-id type="github">libratbag/libratbag</remote-id> </upstream> |