diff options
-rw-r--r-- | ham/svxlink/README | 15 | ||||
-rw-r--r-- | ham/svxlink/doinst.sh | 24 | ||||
-rw-r--r-- | ham/svxlink/rc.svxlink | 57 | ||||
-rw-r--r-- | ham/svxlink/slack-desc | 19 | ||||
-rw-r--r-- | ham/svxlink/svxlink.SlackBuild | 133 | ||||
-rw-r--r-- | ham/svxlink/svxlink.info | 10 |
6 files changed, 258 insertions, 0 deletions
diff --git a/ham/svxlink/README b/ham/svxlink/README new file mode 100644 index 000000000000..8c8e7edb527b --- /dev/null +++ b/ham/svxlink/README @@ -0,0 +1,15 @@ +The SvxLink project is developing a flexible, general purpose voice +services system for ham radio use. +The SvxLink Server consists of a core that handles the connection to +the transceiver. The core can be configured to act as a repeater +controller or to operate on a simplex channel. The voice services are +loaded into the core as plugins. +The project also includes an EchoLink client GUI application (Qtel). + +Opus is an optional (and, based on the audio quality, suggested!) +dependency available from slackbuilds.org + +You need a "svxlink" user and group: + + # groupadd -g 286 svxlink + # useradd -u 286 -g svxlink -d /var/spool/svxlink -s /bin/false svxlink diff --git a/ham/svxlink/doinst.sh b/ham/svxlink/doinst.sh new file mode 100644 index 000000000000..7e5752f26e3c --- /dev/null +++ b/ham/svxlink/doinst.sh @@ -0,0 +1,24 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/svxlink/svxlink.conf.new +config etc/svxlink/remotetrx.conf.new +config etc/svxlink/TclVoiceMail.conf.new +config etc/svxlink/svxlink.d/ModuleDtmfRepeater.conf.new +config etc/svxlink/svxlink.d/ModuleEchoLink.conf.new +config etc/svxlink/svxlink.d/ModuleHelp.conf.new +config etc/svxlink/svxlink.d/ModuleMetarInfo.conf.new +config etc/svxlink/svxlink.d/ModuleParrot.conf.new +config etc/svxlink/svxlink.d/ModulePropagationMonitor.conf.new +config etc/svxlink/svxlink.d/ModuleSelCallEnc.conf.new +config etc/svxlink/svxlink.d/ModuleTclVoiceMail.conf.new diff --git a/ham/svxlink/rc.svxlink b/ham/svxlink/rc.svxlink new file mode 100644 index 000000000000..0b50a77f4643 --- /dev/null +++ b/ham/svxlink/rc.svxlink @@ -0,0 +1,57 @@ +#!/bin/sh +# Start/stop/restart svxlink. + +# Start svxlink: +svxlink_start() { + # CMDLINE="/usr/bin/svxlink --daemon --runasuser=svxlink --pidfile=/var/run/svxlink.pid --logfile=/var/log/svxlink" + CMDLINE="/usr/bin/svxlink --daemon --runasuser=svxlink --pidfile=/var/run/svxlink.pid" + echo -n "Starting SvxLink: $CMDLINE" + $CMDLINE + echo +} + +# Stop svxlink: +svxlink_stop() { + echo -n "Stopping SvxLink..." + if [ -r /var/run/svxlink.pid ]; then + kill $(cat /var/run/svxlink.pid) + rm -f /var/run/svxlink.pid + else + killall -q svxlink + fi + echo +} + +# Restart svxlink: +svxlink_restart() { + svxlink_stop + sleep 1 + svxlink_start +} + +# Check if svxlink is running: +svxlink_status() { + if [ -e /var/run/svxlink.pid ]; then + echo "SvxLink is running." + else + echo "SvxLink is stopped." + exit 1 + fi +} + +case "$1" in +'start') + svxlink_start + ;; +'stop') + svxlink_stop + ;; +'restart') + svxlink_restart + ;; +'status') + svxlink_status + ;; +*) + echo "usage $0 start|stop|restart|status" +esac diff --git a/ham/svxlink/slack-desc b/ham/svxlink/slack-desc new file mode 100644 index 000000000000..11cee74f12b8 --- /dev/null +++ b/ham/svxlink/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +svxlink: SvxLink (A general purpose voice services system for ham radio use) +svxlink: +svxlink: The SvxLink project is developing a flexible, general purpose voice +svxlink: services system for ham radio use. +svxlink: The SvxLink Server consists of a core that handles the connection to +svxlink: the transceiver. The core can be configured to act as a repeater +svxlink: controller or to operate on a simplex channel. The voice services are +svxlink: loaded into the core as plugins. +svxlink: The project also includes an EchoLink client GUI application (Qtel). +svxlink: +svxlink: diff --git a/ham/svxlink/svxlink.SlackBuild b/ham/svxlink/svxlink.SlackBuild new file mode 100644 index 000000000000..06977f204e91 --- /dev/null +++ b/ham/svxlink/svxlink.SlackBuild @@ -0,0 +1,133 @@ +#!/bin/sh + +# Slackware build script for svxlink + +# Copyright 2014, Gustavo Conrad (gus3963 gmail) +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=svxlink +VERSION=${VERSION:-13.12.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +# Bail if user or group isn't valid on your system +if ! grep ^svxlink: /etc/passwd 2>&1 > /dev/null; then + +cat << EOF + + You must have a svxlink user and group to run this script + + # groupadd -g 286 svxlink + # useradd -u 286 -g svxlink -d /var/spool/svxlink -s /bin/false svxlink + +EOF + + exit +elif ! grep ^svxlink: /etc/group 2>&1 > /dev/null; then + +cat << EOF + + You must have a svxlink group to run this script + + # groupadd -g 286 svxlink + +EOF + + exit +fi + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION + +tar xvf $CWD/$VERSION.tar.gz +# the Github download unpacks several directories, we only need src +# We will download a larger file but I think it's better this way +# to make the overall process simpler +cd $PRGNAM-$VERSION/src + +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +make +make install DESTDIR=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +# Move man pages +mkdir -p $PKG/usr/man +mv $PKG/usr/share/man/* $PKG/usr/man +rmdir $PKG/usr/share/man + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYRIGHT doc/README* doc/*.txt doc/qteluserdocs/*.pdf doc/qteluserdocs/*.tex \ + $PKG/usr/doc/$PRGNAM-$VERSION + +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +# Copy init script +mkdir -p $PKG/etc/rc.d +cat $CWD/rc.svxlink > $PKG/etc/rc.d/rc.svxlink + +# Rename .conf to .new to be processed by doinst.sh +rename .conf .conf.new $PKG/etc/svxlink/* +rename .conf .conf.new $PKG/etc/svxlink/svxlink.d/*.conf + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/ham/svxlink/svxlink.info b/ham/svxlink/svxlink.info new file mode 100644 index 000000000000..52c6ce29984c --- /dev/null +++ b/ham/svxlink/svxlink.info @@ -0,0 +1,10 @@ +PRGNAM="svxlink" +VERSION="13.12.1" +HOMEPAGE="http://sm0svx.github.io/svxlink/" +DOWNLOAD="https://github.com/sm0svx/svxlink/archive/13.12.1.tar.gz" +MD5SUM="9e665711d3eb0e7a8cd3a0c63324de07" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="libsigc++ gsm speex" +MAINTAINER="Gustavo Conrad - LU8WFY" +EMAIL="gus3963@gmail.com" |