aboutsummaryrefslogtreecommitdiff
path: root/network/dahdi-tools/dahdi-tools.SlackBuild
diff options
context:
space:
mode:
authorAlan Hicks <alan@lizella.net>2010-05-13 00:59:56 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-13 00:59:56 +0200
commitf897958711c89eb6012c188947c78edea0d05252 (patch)
tree41e53cf47e68037a8775178f2f1265456f044005 /network/dahdi-tools/dahdi-tools.SlackBuild
parentb1630c00026679eb31028097ef2fdf2fba808e86 (diff)
network/dahdi-tools: Added to 13.0 repository
Diffstat (limited to 'network/dahdi-tools/dahdi-tools.SlackBuild')
-rw-r--r--network/dahdi-tools/dahdi-tools.SlackBuild104
1 files changed, 104 insertions, 0 deletions
diff --git a/network/dahdi-tools/dahdi-tools.SlackBuild b/network/dahdi-tools/dahdi-tools.SlackBuild
new file mode 100644
index 0000000000000..871f48437e491
--- /dev/null
+++ b/network/dahdi-tools/dahdi-tools.SlackBuild
@@ -0,0 +1,104 @@
+#!/bin/bash
+
+# Copyright 2006, Alan Hicks, Lizella, GA
+# 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="dahdi-tools"
+VERSION="2.2.0"
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG="$TMP/pkg-$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"
+fi
+
+set -e
+
+rm -rf $PKG $TMP/$PRGNAM-$VERSION
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R a-s,u+w,go+r-w .
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+make config DESTDIR=$PKG || true
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Fix up the manpages
+gzip -9 $PKG/usr/man/man?/*.?
+
+# We shouldn't need these
+rm -fr $PKG/etc/hotplug
+
+# Fix up the configuration files
+mv $PKG/etc/dahdi/init.conf $PKG/etc/dahdi/init.conf.new
+mv $PKG/etc/dahdi/modules $PKG/etc/dahdi/modules.new
+mv $PKG/etc/dahdi/system.conf $PKG/etc/dahdi/system.conf.new
+mv $PKG/etc/modprobe.d/dahdi $PKG/etc/modprobe.d/dahdi.conf.new
+mv $PKG/etc/modprobe.d/dahdi.blacklist \
+ $PKG/etc/modprobe.d/dahdi.blacklist.conf.new
+mv $PKG/etc/dahdi/genconf_parameters \
+ $PKG/etc/dahdi/genconf_parameters.new
+
+mkdir -p $PKG/install $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ ChangeLog LICENSE LICENSE.LGPL README UPGRADE.txt \
+ $PKG/usr/doc/$PRGNAM-$VERSION/
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+find $PKG/usr/doc -type f -exec chmod 0644 {} \;
+chown -R root:root $PKG/usr/doc
+
+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}