summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Beierlein <tomjbe@gentoo.org>2017-12-28 13:28:46 +0100
committerThomas Beierlein <tomjbe@gentoo.org>2017-12-28 13:28:46 +0100
commit1303e4559e55e2d5973b664a7fdf0a2cdb0d30a3 (patch)
tree69ee1b22309560264c43a36e2614b3bdf7d83279 /media-radio
parentdev-util/cmake: stable 3.9.6 for sparc, bug #642236 (diff)
downloadgentoo-1303e4559e55e2d5973b664a7fdf0a2cdb0d30a3.tar.gz
gentoo-1303e4559e55e2d5973b664a7fdf0a2cdb0d30a3.tar.bz2
gentoo-1303e4559e55e2d5973b664a7fdf0a2cdb0d30a3.zip
media-radio/svxlink: Provide systemd units
Services are backported from upstreams github repo. Package-Manager: Portage-2.3.19, Repoman-2.3.6
Diffstat (limited to 'media-radio')
-rw-r--r--media-radio/svxlink/files/remotetrx.service22
-rw-r--r--media-radio/svxlink/files/svxlink.service22
-rw-r--r--media-radio/svxlink/svxlink-15.11-r1.ebuild76
3 files changed, 120 insertions, 0 deletions
diff --git a/media-radio/svxlink/files/remotetrx.service b/media-radio/svxlink/files/remotetrx.service
new file mode 100644
index 00000000000..fd808a220a5
--- /dev/null
+++ b/media-radio/svxlink/files/remotetrx.service
@@ -0,0 +1,22 @@
+;;;;; Author: Richard Neese<kb3vgw@gmail.com>
+
+[Unit]
+Description=SvxLink remote transceiver repeater control software
+Documentation=man:remotetrx(1)
+After=network.target remote-fs.target syslog.target time.target
+
+[Service]
+PIDFile=/var/run/remotetrx.pid
+ExecStartPre=-/bin/touch /var/log/remotetrx
+ExecStartPre=-/bin/chown svxlink /var/log/remotetrx
+ExecStart=/bin/sh -c '/usr/bin/remotetrx --pidfile=/var/run/remotetrx.pid --logfile=/var/log/remotetrx --config=/etc/svxlink/remotetrx.conf --runasuser=svxlink'
+ExecReload=/bin/kill -s HUP $MAINPID
+Restart=on-failure
+TimeoutStartSec=60
+#WatchdogSec=@SVX_WatchdogSec@
+#NotifyAccess=main
+LimitCORE=infinity
+WorkingDirectory=/etc/svxlink
+
+[Install]
+WantedBy=multi-user.target
diff --git a/media-radio/svxlink/files/svxlink.service b/media-radio/svxlink/files/svxlink.service
new file mode 100644
index 00000000000..8b95f3047f7
--- /dev/null
+++ b/media-radio/svxlink/files/svxlink.service
@@ -0,0 +1,22 @@
+;;;;; Author: Richard Neese<kb3vgw@gmail.com>
+
+[Unit]
+Description=SvxLink repeater control software
+Documentation=man:svxlink(1)
+After=network.target remote-fs.target syslog.target time.target
+
+[Service]
+PIDFile=/var/run/svxlink.pid
+ExecStartPre=-/bin/touch /var/log/svxlink
+ExecStartPre=-/bin/chown svxlink /var/log/svxlink
+ExecStart=/bin/sh -c '/usr/bin/svxlink --logfile=/var/log/svxlink --config=/etc/svxlink/svxlink.conf --pidfile=/var/run/svxlink.pid --runasuser=svxlink'
+ExecReload=/bin/kill -s HUP $MAINPID
+Restart=on-failure
+TimeoutStartSec=60
+#WatchdogSec=@SVX_WatchdogSec@
+#NotifyAccess=main
+LimitCORE=infinity
+WorkingDirectory=/etc/svxlink
+
+[Install]
+WantedBy=multi-user.target
diff --git a/media-radio/svxlink/svxlink-15.11-r1.ebuild b/media-radio/svxlink/svxlink-15.11-r1.ebuild
new file mode 100644
index 00000000000..5dfe0e89f9b
--- /dev/null
+++ b/media-radio/svxlink/svxlink-15.11-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit cmake-utils eutils qt4-r2 systemd user
+
+CMAKE_USE_DIR="${S}/src"
+
+DESCRIPTION="Multi Purpose Voice Services System, including Qtel for EchoLink"
+HOMEPAGE="http://www.svxlink.org"
+SRC_URI="https://github.com/sm0svx/${PN}/archive/15.11.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/tcl:0
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ media-libs/alsa-lib
+ media-sound/gsm
+ dev-libs/libgcrypt:0
+ media-libs/speex
+ media-libs/opus
+ dev-libs/libsigc++:2
+ dev-libs/popt"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+pkg_setup() {
+ enewgroup svxlink
+ enewuser svxlink -1 -1 -1 svxlink
+}
+
+src_prepare() {
+ # fix compilation problem with newer gcc bug #639592
+ epatch "${FILESDIR}"/${P}-gcc72.patch
+
+ cmake-utils_src_prepare
+ # drop deprecated desktop category (bug #475730)
+ sed -i -e "s:Categories=Application;:Categories=:g" src/qtel/qtel.desktop || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DSYSCONF_INSTALL_DIR=/etc
+ -DLOCAL_STATE_DIR=/var
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ fowners -R svxlink.svxlink /var/spool/svxlink
+
+ rm -R "${D}"/usr/share/doc/svxlink || die
+ dodoc src/doc/README-${PV}.adoc
+ doman src/doc/man/*.1 src/doc/man/*.5
+
+ insinto /etc/logrotate.d
+ doins distributions/gentoo/etc/logrotate.d/*
+
+ newinitd "${FILESDIR}"/remotetrx.init remotetrx
+ newinitd "${FILESDIR}"/svxlink.init svxlink
+ newconfd "${FILESDIR}"/remotetrx.rc remotetrx
+ newconfd "${FILESDIR}"/svxlink.rc svxlink
+
+ systemd_dounit "${FILESDIR}"/remotetrx.service
+ systemd_dounit "${FILESDIR}"/svxlink.service
+}