aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan P. Stanić <mps@arvanta.net>2019-11-09 21:10:38 +0100
committerMilan P. Stanić <mps@arvanta.net>2019-11-09 21:11:09 +0100
commit7eb6ec8e104c913ef6af6954d57fe8aaba81b656 (patch)
tree69b55ebb3602caca694fdf0ba79c2f02976d17ae
parent88df3fee24aa5223f4d1f105f4bf4b7c88412346 (diff)
testing/svxlink: new aport
http://www.svxlink.org Advanced radio repeater controller and EchoLink
-rw-r--r--testing/svxlink/APKBUILD63
-rw-r--r--testing/svxlink/svxlink.confd21
-rw-r--r--testing/svxlink/svxlink.initd32
-rw-r--r--testing/svxlink/svxlink.post-install4
-rw-r--r--testing/svxlink/svxlink.pre-install5
5 files changed, 125 insertions, 0 deletions
diff --git a/testing/svxlink/APKBUILD b/testing/svxlink/APKBUILD
new file mode 100644
index 00000000000..92a1e23ac59
--- /dev/null
+++ b/testing/svxlink/APKBUILD
@@ -0,0 +1,63 @@
+# Contributor: Milan P. Stanić <mps@arvanta.net>
+# Maintainer: Milan P. Stanić <mps@arvanta.net>
+pkgname=svxlink
+pkgver=19.09.1
+pkgrel=0
+pkgdesc="Advanced radio repeater controller and EchoLink"
+url="http://www.svxlink.org"
+arch="all"
+license="GPL-2.0-or-later"
+pkgusers="svxlink"
+pkggroups="svxlink"
+options="!check" # package doesn't have tests
+makedepends="groff cmake alsa-lib-dev popt-dev gsm-dev speex-dev
+ libgcrypt-dev tcl-dev curl-dev libsigc++-dev"
+install="$pkgname.pre-install $pkgname.post-install"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-static"
+source="$pkgname-$pkgver.tar.gz::https://github.com/sm0svx/svxlink/archive/$pkgver.tar.gz
+ svxlink.initd
+ svxlink.confd
+ "
+builddir="$srcdir"/$pkgname-$pkgver/src
+
+build() {
+ cd $builddir
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DSYSCONF_INSTALL_DIR=/etc \
+ -DLOCAL_STATE_DIR=/var \
+ -DLIB_INSTALL_DIR=/usr/lib \
+ -DBUILD_STATIC_LIBS=ON \
+ -DUSE_OSS=NO -DUSE_QT=NO \
+
+ make
+ make doc
+}
+
+static() {
+ depends=""
+ pkgdesc="$kgdesc static libraries"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "${pkgdir}-dev"/usr/lib/*.a "$subpkgdir"/usr/lib
+}
+
+package() {
+ cd $builddir
+ make DESTDIR="$pkgdir" install
+ rm -rf ${pkgdir}/usr/share/doc
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname
+ install -o svxlink -g svxlink -d "$pkgdir"/var/spool/svxlink
+ install -o svxlink -g svxlink -d "$pkgdir"/var/spool/svxlink/voice_mail/
+ install -o svxlink -g svxlink -d "$pkgdir"/var/spool/svxlink/qso_recorder/
+ install -o svxlink -g svxlink -d "$pkgdir"/var/spool/svxlink/propagation_monitor
+}
+
+sha512sums="93fb0ac360544244ba1843ed8036ca2772b6207cb9bb34e80a746c195bb024a59ac7b799fd92191b8dec05d2258fb73ea7cc1103aee8bd94491b2e3e480ae0fa svxlink-19.09.1.tar.gz
+39d1a4febfdd5e50b9df21c0e77c80a50af1680a6e001cda3f31fc752b1cba0948c40bf70106579e32c1de37ee76d6dde218824bcac2b013a71b144256f60168 svxlink.initd
+1a587c032e73c3a76a1aa8c18d2b3d90a716f49ffb75a5b863da02a59a76a433355e2c1a07f44795545bce01e713890881a14ef9b9d2aae3690e0bf462d432a7 svxlink.confd"
diff --git a/testing/svxlink/svxlink.confd b/testing/svxlink/svxlink.confd
new file mode 100644
index 00000000000..27bab4260f4
--- /dev/null
+++ b/testing/svxlink/svxlink.confd
@@ -0,0 +1,21 @@
+#############################################################################
+#
+# Configuration file for the SvxLink startup script /etc/init.d/svxlink
+#
+#############################################################################
+
+# The log file to use
+LOGFILE=/var/log/svxlink
+
+# The PID file to use
+PIDFILE=/run/svxlink.pid
+
+# The user to run the SvxLink server as
+RUNASUSER=svxlink
+
+# Specify which configuration file to use
+CFGFILE=/etc/svxlink/svxlink.conf
+
+# Environment variables to set up. Separate variables with a space.
+ENV="ASYNC_AUDIO_NOTRIGGER=1"
+
diff --git a/testing/svxlink/svxlink.initd b/testing/svxlink/svxlink.initd
new file mode 100644
index 00000000000..ece921a3d3a
--- /dev/null
+++ b/testing/svxlink/svxlink.initd
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+
+name="SvxLink Server"
+pname="svxlink"
+command="/usr/bin/$pname"
+
+
+POPTS="--daemon \
+ ${RUNASUSER:+--runasuser=$RUNASUSER} \
+ ${PIDFILE:+--pidfile=$PIDFILE} \
+ ${LOGFILE:+--logfile=$LOGFILE} \
+ ${CFGFILE:+--config=$CFGFILE}"
+
+depend() {
+ need localmount
+ use net
+ after bootmisc
+}
+
+start() {
+ ebegin "Starting $pname"
+ export $ENV
+ start-stop-daemon --start --pidfile $PIDFILE --exec $command -- $POPTS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping $name"
+ start-stop-daemon --stop --quiet --pidfile "$PIDFILE"
+ eend $? "Failed to stop $name"
+}
+
diff --git a/testing/svxlink/svxlink.post-install b/testing/svxlink/svxlink.post-install
new file mode 100644
index 00000000000..0586fcd5c52
--- /dev/null
+++ b/testing/svxlink/svxlink.post-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# add something which happends after install
+
diff --git a/testing/svxlink/svxlink.pre-install b/testing/svxlink/svxlink.pre-install
new file mode 100644
index 00000000000..bd1aaafec64
--- /dev/null
+++ b/testing/svxlink/svxlink.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+addgroup -S svxlink 2>/dev/null
+adduser -S -H -h /var/spool/svxlink -s /sbin/nologin -g svxlink svxlink 2>/dev/null
+adduser svxlink audio 2>/dev/null