diff options
author | Rick Farina <zerochaos@gentoo.org> | 2019-07-21 21:41:03 -0400 |
---|---|---|
committer | Rick Farina <zerochaos@gentoo.org> | 2019-07-21 21:41:03 -0400 |
commit | eadff1810e2702d0b99c91f74c91b81b483dc560 (patch) | |
tree | 8872b88db13140da1aade95119574064ccf72643 /net-wireless/rtl-sdr | |
parent | net-wireless/kismet: remove old (diff) | |
download | gentoo-eadff1810e2702d0b99c91f74c91b81b483dc560.tar.gz gentoo-eadff1810e2702d0b99c91f74c91b81b483dc560.tar.bz2 gentoo-eadff1810e2702d0b99c91f74c91b81b483dc560.zip |
net-wireless/rtl-sdr: add rtl_tcp openrc support
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Rick Farina <zerochaos@gentoo.org>
Diffstat (limited to 'net-wireless/rtl-sdr')
-rw-r--r-- | net-wireless/rtl-sdr/files/rtl_tcp.confd | 4 | ||||
-rw-r--r-- | net-wireless/rtl-sdr/files/rtl_tcp.initd | 18 | ||||
-rw-r--r-- | net-wireless/rtl-sdr/rtl-sdr-0.6.0-r1.ebuild (renamed from net-wireless/rtl-sdr/rtl-sdr-0.6.0.ebuild) | 6 | ||||
-rw-r--r-- | net-wireless/rtl-sdr/rtl-sdr-9999.ebuild | 10 |
4 files changed, 36 insertions, 2 deletions
diff --git a/net-wireless/rtl-sdr/files/rtl_tcp.confd b/net-wireless/rtl-sdr/files/rtl_tcp.confd new file mode 100644 index 000000000000..530e89fc940d --- /dev/null +++ b/net-wireless/rtl-sdr/files/rtl_tcp.confd @@ -0,0 +1,4 @@ +# /etc/conf.d/rtl_tcp - configuration file for /etc/init.d/rtl_tcp + +# Options to pass to rtl_tcp, see `rtl_tcp -h` +#RTL_TCP_OPTIONS="-d0" diff --git a/net-wireless/rtl-sdr/files/rtl_tcp.initd b/net-wireless/rtl-sdr/files/rtl_tcp.initd new file mode 100644 index 000000000000..2e4d07b8c28a --- /dev/null +++ b/net-wireless/rtl-sdr/files/rtl_tcp.initd @@ -0,0 +1,18 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +start() { + ebegin "Starting rtl_tcp" + start-stop-daemon --start --quiet --pidfile /run/rtl_tcp.pid \ + --background --make-pidfile --exec /usr/bin/rtl_tcp \ + -1 /var/log/rtl_tcp.log -2 /var/log/rtl_tcp.log \ + -- ${RTL_TCP_OPTIONS} + eend ${?} +} + +stop() { + ebegin "Stopping rtl_tcp" + start-stop-daemon --stop --quiet --pidfile /run/rtl_tcp.pid + eend ${?} +} diff --git a/net-wireless/rtl-sdr/rtl-sdr-0.6.0.ebuild b/net-wireless/rtl-sdr/rtl-sdr-0.6.0-r1.ebuild index a6d38d237ac6..59c56f84f78b 100644 --- a/net-wireless/rtl-sdr/rtl-sdr-0.6.0.ebuild +++ b/net-wireless/rtl-sdr/rtl-sdr-0.6.0-r1.ebuild @@ -44,6 +44,12 @@ src_configure() { cmake-utils_src_configure } +src_install() { + cmake-utils_src_install + newinitd "${FILESDIR}"/rtl_tcp.initd rtl_tcp + newconfd "${FILESDIR}"/rtl_tcp.confd rtl_tcp +} + pkg_postinst() { elog "Only users in the usb group can capture." elog "Just run 'gpasswd -a <USER> usb', then have <USER> re-login." diff --git a/net-wireless/rtl-sdr/rtl-sdr-9999.ebuild b/net-wireless/rtl-sdr/rtl-sdr-9999.ebuild index cb32ad203bb9..5b9fb0899d30 100644 --- a/net-wireless/rtl-sdr/rtl-sdr-9999.ebuild +++ b/net-wireless/rtl-sdr/rtl-sdr-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -41,11 +41,17 @@ src_configure() { mycmakeargs=( -DINSTALL_UDEV_RULES=OFF -DDETACH_KERNEL_DRIVER=ON - -DLIB_INSTALL_DIR=/usr/$(get_libdir) + -DLIB_INSTALL_DIR=$(get_libdir) ) cmake-utils_src_configure } +src_install() { + cmake-utils_src_install + newinitd "${FILESDIR}"/rtl_tcp.initd rtl_tcp + newconfd "${FILESDIR}"/rtl_tcp.confd rtl_tcp +} + pkg_postinst() { elog "Only users in the usb group can capture." elog "Just run 'gpasswd -a <USER> usb', then have <USER> re-login." |