summaryrefslogtreecommitdiff
path: root/system/dahdi-complete
diff options
context:
space:
mode:
authorJonathan Chapman <glitch@glitchwrks.com>2015-10-09 23:16:36 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-10-09 23:17:04 +0700
commitffe58df880bc92fef3e0361c1bce5add7e6ae709 (patch)
tree2ee8c6b1a93116c3beaa377eebbf6015a40609f9 /system/dahdi-complete
parent7d653a1d7a3800e1cfced9b52573d40bf410f298 (diff)
downloadslackbuilds-ffe58df880bc92fef3e0361c1bce5add7e6ae709.tar.gz
system/dahdi-complete: Added (DAHDI hardware drivers for Asterisk).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/dahdi-complete')
-rw-r--r--system/dahdi-complete/LICENSE166
-rw-r--r--system/dahdi-complete/README11
-rw-r--r--system/dahdi-complete/README.SLACKWARE13
-rw-r--r--system/dahdi-complete/dahdi-complete.SlackBuild107
-rw-r--r--system/dahdi-complete/dahdi-complete.info10
-rw-r--r--system/dahdi-complete/doinst.sh41
-rw-r--r--system/dahdi-complete/slack-desc19
7 files changed, 367 insertions, 0 deletions
diff --git a/system/dahdi-complete/LICENSE b/system/dahdi-complete/LICENSE
new file mode 100644
index 0000000000..341c30bda4
--- /dev/null
+++ b/system/dahdi-complete/LICENSE
@@ -0,0 +1,166 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
diff --git a/system/dahdi-complete/README b/system/dahdi-complete/README
new file mode 100644
index 0000000000..32c4ef4cfb
--- /dev/null
+++ b/system/dahdi-complete/README
@@ -0,0 +1,11 @@
+dahdi-complete provides everything necessary for using DAHDI (Digium/Asterisk
+Hardware Device Interface) telephony hardware with Linux. This includes:
+
+* drivers
+* configuration tools
+* example configuration files
+* firmware
+
+As this package contains kernel modules that will be built for your current
+kernel, you will need to rebuild (not simply reinstall) this SlackBuild if you
+change/upgrade your kernel.
diff --git a/system/dahdi-complete/README.SLACKWARE b/system/dahdi-complete/README.SLACKWARE
new file mode 100644
index 0000000000..bfcd8b3762
--- /dev/null
+++ b/system/dahdi-complete/README.SLACKWARE
@@ -0,0 +1,13 @@
+README.SLACKWARE for dahdi-complete
+
+To start dahdi-complete at boot, add the following to /etc/rc.d/rc.local:
+
+ if [ -x /etc/rc.d/rc.dahdi ]; then
+ /etc/rc.d/rc.dahdi start
+ fi
+
+This goes in /etc/rc.d/rc.local_shutdown:
+
+ if [ -x /etc/rc.d/rc.dahdi ]; then
+ /etc/rc.d/rc.dahdi stop
+ fi
diff --git a/system/dahdi-complete/dahdi-complete.SlackBuild b/system/dahdi-complete/dahdi-complete.SlackBuild
new file mode 100644
index 0000000000..269d26fe5e
--- /dev/null
+++ b/system/dahdi-complete/dahdi-complete.SlackBuild
@@ -0,0 +1,107 @@
+#!/bin/sh -e
+
+# Slackware Package Build Script for DAHDI complete package (http://www.asterisk.org/downloads/dahdi)
+# SlackBuild source at https://github.com/chapmajs/dahdi-complete-slackbuild
+
+# See LICENSE included in the project root for licensing information.
+
+# Copyright (c) 2015 Jonathan Chapman
+# glitch@glitchwrks.com
+# All rights reserved.
+
+PRGNAM=dahdi-complete
+VERSION=${VERSION:-2.10.2}
+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}
+
+ARCHIVE_NAME=dahdi-linux-complete
+
+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
+
+# Clean up old builds
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar zxvf $CWD/$ARCHIVE_NAME-$VERSION+$VERSION.tar.gz
+cd $ARCHIVE_NAME-$VERSION+$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 {} \;
+
+cd linux
+make all
+cd ../tools
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --with-dahdi=../linux \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+cd ..
+make config DESTDIR=$PKG
+
+# move config files to .new
+cd $PKG/etc
+for file in $(find . -type f); do
+ mv $file "$file.new"
+done
+
+install -D -m 0644 $TMP/$ARCHIVE_NAME-$VERSION+$VERSION/tools/dahdi.init $PKG/etc/rc.d/rc.dahdi.new
+
+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
+
+mv $PKG/usr/share/man $PKG/usr/
+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
+
+# Clean up zero-length firmware files
+(
+ cd $PKG/lib/firmware
+ find . -size 0 | xargs rm
+)
+
+# Finish up the package
+mkdir -p $PKG/install
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/dahdi-complete/dahdi-complete.info b/system/dahdi-complete/dahdi-complete.info
new file mode 100644
index 0000000000..545f353e9a
--- /dev/null
+++ b/system/dahdi-complete/dahdi-complete.info
@@ -0,0 +1,10 @@
+PRGNAM="dahdi-complete"
+VERSION="2.10.2"
+HOMEPAGE="http://www.asterisk.org/downloads/dahdi"
+DOWNLOAD="http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-2.10.2+2.10.2.tar.gz"
+MD5SUM="9b5ae61dc6202b45284d71481ec758c0"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Jonathan Chapman"
+EMAIL="glitch@glitchwrks.com"
diff --git a/system/dahdi-complete/doinst.sh b/system/dahdi-complete/doinst.sh
new file mode 100644
index 0000000000..76b1cc357b
--- /dev/null
+++ b/system/dahdi-complete/doinst.sh
@@ -0,0 +1,41 @@
+# Post-install configuration scripts, borrowed from the fail2ban
+# Slackbuild:
+
+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...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+preserve_perms etc/rc.d/rc.dahdi.new
+
+config etc/udev/rules.d/xpp.rules.new
+config etc/udev/rules.d/dahdi.rules.new
+config etc/hotplug/usb/xpp_fxloader.usermap.new
+config etc/dahdi/system.conf.new
+config etc/dahdi/assigned-spans.conf.sample.new
+config etc/dahdi/span-types.conf.sample.new
+config etc/dahdi/init.conf.new
+config etc/dahdi/modules.new
+config etc/dahdi/genconf_parameters.new
+config etc/bash_completion.d/dahdi.new
+config etc/modprobe.d/dahdi.conf.new
+config etc/modprobe.d/dahdi.blacklist.conf.new
diff --git a/system/dahdi-complete/slack-desc b/system/dahdi-complete/slack-desc
new file mode 100644
index 0000000000..42f917c5c5
--- /dev/null
+++ b/system/dahdi-complete/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------------------------------------------------------|
+dahdi-complete: dahdi-complete (DAHDI hardware drivers for Asterisk)
+dahdi-complete:
+dahdi-complete: DAHDI (Digium/Asterisk Hardware Device Interface) is the open source
+dahdi-complete: device technology used to control Digium and other legacy telephony
+dahdi-complete: interface cards.
+dahdi-complete:
+dahdi-complete:
+dahdi-complete:
+dahdi-complete:
+dahdi-complete: Homepage: http://www.asterisk.org/downloads/dahdi
+dahdi-complete: