network/dahdi-tools: Added to 13.0 repository

This commit is contained in:
Alan Hicks 2010-05-13 00:59:56 +02:00 committed by Robby Workman
parent b1630c0002
commit f897958711
5 changed files with 165 additions and 0 deletions

View file

@ -0,0 +1,13 @@
The dahdi drivers and binaries are needed to use popular digital and
analogue telephony equipment and are typically installed alongside the
asterisk PBX (although these are not required for asterisk if you are
not using any hardware to interface with the POTS/PSTN system). Note
that if you change your kernel after installing any dahdi components,
you'll have to re-compile dahdi-linux (a simple re-install will not
suffice), but may be able to keep your existing dahdi-tools package.
After installing dahdi-tools, all the modules for digium telephony cards
will be blacklisted in /etc/modprobe.d/dahdi.blacklist.conf - this is
intentional to allow you to load modules in a specific order in rc.local.
This requires dahdi-linux.

View file

@ -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}

View file

@ -0,0 +1,10 @@
PRGNAM="dahdi-tools"
VERSION="2.2.0"
HOMEPAGE="http://www.digium.com"
DOWNLOAD="http://downloads.asterisk.org/pub/telephony/dahdi-tools/dahdi-tools-2.2.0.tar.gz"
MD5SUM="a018f452f3851a312ff51705ac44de37"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Alan Hicks"
EMAIL="alan@lizella.net"
APPROVED="rworkman"

View file

@ -0,0 +1,19 @@
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/dahdi/init.conf.new
config etc/dahdi/modules.new
config etc/dahdi/system.conf.new
config etc/modprobe.d/dahdi.conf.new
config etc/modprobe.d/dahdi.blacklist.conf.new
config etc/dahdi/genconf_parameters.new

View file

@ -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 ':'.
|-----handy-ruler-----------------------------------------------------|
dahdi-tools: dahdi-tools (tools for dahdi-linux)
dahdi-tools:
dahdi-tools: The dahdi-tools include userland applications to interface with
dahdi-tools: certain digital and analogue devices, primarily of use with the
dahdi-tools: Asterisk PBX (Private Branch Exchange).
dahdi-tools:
dahdi-tools:
dahdi-tools:
dahdi-tools:
dahdi-tools:
dahdi-tools: