diff options
author | JK Wood <joshuakwood@gmail.com> | 2014-07-23 07:58:31 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-07-23 07:58:31 +0700 |
commit | 56837f7a6b002042a0926e2b631b532bf6282f85 (patch) | |
tree | 3c066768e3a3536e9b470dc363d6726f0e9343c6 | |
parent | d5f9d9675d355a89149c81217a06eb8a2389e830 (diff) |
ham/aprx: Added (APRS software package).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | ham/aprx/README | 28 | ||||
-rw-r--r-- | ham/aprx/aprx.SlackBuild | 109 | ||||
-rw-r--r-- | ham/aprx/aprx.info | 10 | ||||
-rw-r--r-- | ham/aprx/doinst.sh | 16 | ||||
-rw-r--r-- | ham/aprx/rc.aprx.new | 69 | ||||
-rw-r--r-- | ham/aprx/slack-desc | 19 |
6 files changed, 251 insertions, 0 deletions
diff --git a/ham/aprx/README b/ham/aprx/README new file mode 100644 index 0000000000000..ed741bf033422 --- /dev/null +++ b/ham/aprx/README @@ -0,0 +1,28 @@ +aprx was originally a receive-only APRS iGate software, now extended to do +digipeating, and Tx-iGate. It works on any UNIX-like systems with minimal +requirements of system services, or system libraries beyond basic POSIX libc. + +The software is to be installed on a suitable UNIX-like system, and its +configuration file is then to be adjusted. Then it can: +* Handle arbitrary number of radio modems connected to itself +* Optionally relay APRS packets from radio receivers to APRS-IS + (http://www.aprs-is.net) network +* Optionally digipeat AX.25 packets with and without APRS NEWn-N + paradigm rules +* Optionally relay APRS packets from APRS-IS network to radio channel + (Tx-iGate) + +This software is intended for very limited resources environment, like small +embedded-like machines barely able to run the operating system with TCP/IP +networking. +A receive-only Rx-iGate does not need any sort of licenses in most parts of +the world where radio amateur hobby is permitted to begin with. + +On version 2, aprx has gotten the ability to do APRS Digipeater function, +Aprx Tx-iGate, as well as a variation of that called Viscous APRS Digipeater, +which is an excellent choice for a Fill-In digipeater like on a mobile +station. Viscousness means that it will listen for other copies of same +packet for a small configurable number of seconds, and if it hears same +packet only once, it will do normal digipeating for it. + +aprx can optionall be used with soundmodem in place of a hardware TNC. diff --git a/ham/aprx/aprx.SlackBuild b/ham/aprx/aprx.SlackBuild new file mode 100644 index 0000000000000..a6ba117547fd9 --- /dev/null +++ b/ham/aprx/aprx.SlackBuild @@ -0,0 +1,109 @@ +#!/bin/sh +# Slackbuild for aprx +# Written by JK Wood <joshuakwood@gmail.com> + +# Slackbuild is released under the Dog-on-Fire License: +# If use of this script causes your dog to catch on fire, +# you agree to send me five dollars. Or a picture +# of the dog on fire. +# Otherwise, you're on your own. I've tested the script +# on my own computer, and it hasn't broken anything. +# So if it does it on your computer, that falls in +# the realm of "Not my problem." +# +# Of course, if you'll send a bug report to the above +# email address, I may be able to see what you did +# wrong and prevent it from happening in the future. +# In which case, I may just send YOU five dollars. + +# Oh, and feel free to copy it and modify it as you +# see fit. Or as I see fit. Or as I fit. Although +# that is unlikely, as I am rather tall. + +PRGNAM=aprx +VERSION=${VERSION:-2.08.svn593} +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 + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar -xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +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 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --mandir=/usr/man \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +mv $PKG/etc/aprx.conf $PKG/etc/aprx.conf.new +mkdir -p $PKG/etc/rc.d +install -m 644 $CWD/rc.aprx.new $PKG/etc/rc.d + +mkdir -p $PKG/usr/share/$PRGNAM/ +cp -a firmware $PKG/usr/share/$PRGNAM + +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 + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a ChangeLog INSTALL LICENSE PROTOCOLS README ROADMAP TIMESTAMP-AT-APRSIS TODO \ + ViscousDigipeater.README ViscousDigipeaterTxEffect.png aprx-complex.conf doc/* \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +find $PKG/usr/doc -name "Makefile" -exec rm {} \; +find $PKG/usr/doc -type f -exec chmod 644 {} \; + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG${PKGTYPE:-.tgz} diff --git a/ham/aprx/aprx.info b/ham/aprx/aprx.info new file mode 100644 index 0000000000000..9e274a45b6e9a --- /dev/null +++ b/ham/aprx/aprx.info @@ -0,0 +1,10 @@ +PRGNAM="aprx" +VERSION="2.08.svn593" +HOMEPAGE="http://wiki.ham.fi/Aprx.en" +DOWNLOAD="http://ham.zmailer.org/oh2mqk/aprx/aprx-2.08.svn593.tar.gz" +MD5SUM="f1b82e728736ca818c34b04bd9fd21dc" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="JK Wood" +EMAIL="joshuakwood@gmail.com" diff --git a/ham/aprx/doinst.sh b/ham/aprx/doinst.sh new file mode 100644 index 0000000000000..514791d8bb811 --- /dev/null +++ b/ham/aprx/doinst.sh @@ -0,0 +1,16 @@ + +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/aprx.conf.new +config etc/rc.d/rc.aprx.new diff --git a/ham/aprx/rc.aprx.new b/ham/aprx/rc.aprx.new new file mode 100644 index 0000000000000..d5cc498eca0b7 --- /dev/null +++ b/ham/aprx/rc.aprx.new @@ -0,0 +1,69 @@ +#!/bin/sh +# +# aprx daemon control script. +# Written for Slackware Linux by JK Wood <joshuakwood@gmail.com> + +BIN=/sbin/aprx +CONF=/etc/aprx.conf +PID=/var/run/aprx.pid + +aprx_start() { + # Sanity checks. + if [ ! -r $CONF ]; then # no config file, exit: + echo "$CONF does not appear to exist. Abort." + exit 1 + fi + + if [ -s $PID ]; then + echo "aprx appears to already be running?" + exit 1 + fi + + echo "Starting aprx daemon..." + if [ -x $BIN ]; then + $BIN -f $CONF + fi +} + +aprx_stop() { + echo "Shutdown aprx gracefully..." + if [ -r $PID ]; then + kill -HUP $(cat $PID) + rm -f $PID + else + killall -HUP -q aprx + fi + echo +} + +aprx_restart() { + aprx_stop + sleep 3 + aprx_start +} + +aprx_status() { + if [ -e $PID ]; then + echo "aprx is running." + else + echo "arpx is stopped." + exit 1 + fi +} + +case "$1" in + start) + aprx_start + ;; + stop) + aprx_stop + ;; + restart) + aprx_restart + ;; + status) + aprx_status + ;; + *) + echo "usage: `basename $0` {start|stop|restart|status}" +esac diff --git a/ham/aprx/slack-desc b/ham/aprx/slack-desc new file mode 100644 index 0000000000000..df8b8c60cc68c --- /dev/null +++ b/ham/aprx/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------------------------------------------------------| +aprx: aprx (APRS software package) +aprx: +aprx: Aprx was originally a receive-only APRS iGate software, now extended +aprx: to do digipeating, and Tx-iGate. It works on any UNIX-like systems +aprx: with minimal requirements of system services, or system libraries +aprx: beyond basic POSIX libc. +aprx: +aprx: +aprx: +aprx: Homepage: http://wiki.ham.fi/Aprx.en +aprx: |