summaryrefslogtreecommitdiff
path: root/ham/svxlink/svxlink.SlackBuild
diff options
context:
space:
mode:
authorGustavo Conrad <gusconrad@gmail.com>2015-01-10 07:02:37 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-01-10 07:45:57 +0700
commit2b14f25b867c4ea071006bcc8354bf6a6bde904f (patch)
treea39ca0b2a5c81cdb7c694205f1187a7c1f9d70d4 /ham/svxlink/svxlink.SlackBuild
parent9a132a15629af2534e349964892a8555888a93b3 (diff)
downloadslackbuilds-2b14f25b867c4ea071006bcc8354bf6a6bde904f.tar.gz
ham/svxlink: Updated for version 14.08.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'ham/svxlink/svxlink.SlackBuild')
-rw-r--r--ham/svxlink/svxlink.SlackBuild42
1 files changed, 29 insertions, 13 deletions
diff --git a/ham/svxlink/svxlink.SlackBuild b/ham/svxlink/svxlink.SlackBuild
index 06977f204e..bcbf1e594e 100644
--- a/ham/svxlink/svxlink.SlackBuild
+++ b/ham/svxlink/svxlink.SlackBuild
@@ -1,8 +1,8 @@
#!/bin/sh
-# Slackware build script for svxlink
+# Slackware build script for svxlink - cmake version
-# Copyright 2014, Gustavo Conrad (gus3963 gmail)
+# Copyright 2014-2015, Gustavo Conrad (gus3963 gmail)
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=svxlink
-VERSION=${VERSION:-13.12.1}
+VERSION=${VERSION:-14.08}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -54,6 +54,11 @@ else
LIBDIRSUFFIX=""
fi
+# get runtime configuration
+# invoke script as: QTEL=NO ./svxlink.SlackBuild
+# to compile svxlink only, no Qtel
+BUILD_QTEL="-DUSE_QT=YES" && [[ "$QTEL" = "NO" ]] && BUILD_QTEL="-DUSE_QT=NO"
+
set -e
# Bail if user or group isn't valid on your system
@@ -88,6 +93,7 @@ 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
@@ -100,30 +106,40 @@ find -L . \
\( -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
+# Compile the application and install it into the $PKG directory
+mkdir -p build
+cd build
+ cmake \
+ $BUILD_QTEL \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DSYSCONF_INSTALL_DIR=/etc \
+ -DLOCAL_STATE_DIR=/var \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ ..
+ make
+ make install DESTDIR=$PKG
+
+cd ..
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 \
+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
+rm -rf $PKG/usr/share/man
+
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
+cat $CWD/rc.svxlink > $PKG/etc/rc.d/rc.svxlink.new
# Rename .conf to .new to be processed by doinst.sh
rename .conf .conf.new $PKG/etc/svxlink/*