From a523a40c98d419c32442493198fd39ebec180c9c Mon Sep 17 00:00:00 2001 From: Alan Hicks Date: Thu, 13 May 2010 00:35:39 +0200 Subject: network/asterisk: Updated for version 1.6.1.6 --- network/asterisk/asterisk.SlackBuild | 42 +++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 17 deletions(-) (limited to 'network/asterisk/asterisk.SlackBuild') diff --git a/network/asterisk/asterisk.SlackBuild b/network/asterisk/asterisk.SlackBuild index 4f0280838daf..846a88458928 100644 --- a/network/asterisk/asterisk.SlackBuild +++ b/network/asterisk/asterisk.SlackBuild @@ -1,4 +1,5 @@ #!/bin/bash + # Copyright 2006, Alan Hicks, Lizella, GA # All rights reserved. # @@ -19,13 +20,8 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# Modified by Robby Workman -# No additional license terms :) - -set -e - PRGNAM="asterisk" -VERSION="1.4.21.2" +VERSION="1.6.1.6" ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -37,10 +33,17 @@ 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 -fr $PKG $TMP/$PRGNAM-$VERSION mkdir -p $TMP $PKG $OUTPUT cd $TMP @@ -53,34 +56,38 @@ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --localstatedir=/var \ - --mandir=/usr/man + --mandir=/usr/man \ + --build=$ARCH-slackware-linux make make samples DESTDIR=$PKG make install DESTDIR=$PKG ( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + 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 ) -mkdir -p $PKG/install $PKG/usr/doc/$PRGNAM-$VERSION/sample_confs -mv $PKG/etc/asterisk/* $PKG/usr/doc/$PRGNAM-$VERSION/sample_confs/ -cp -a CHANGES COPYING CREDITS ChangeLog LICENSE README UPGRADE.txt doc/ \ - $PKG/usr/doc/$PRGNAM-$VERSION/ -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild - gzip -9 $PKG/usr/man/man?/*.? # Logrotate script mkdir -p $PKG/etc/logrotate.d install -m 0644 $CWD/logrotate.asterisk $PKG/etc/logrotate.d/asterisk.new +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/sample_confs +mv $PKG/etc/asterisk/* $PKG/usr/doc/$PRGNAM-$VERSION/sample_confs/ +cp -a CHANGES COPYING CREDITS ChangeLog LICENSE README UPGRADE.txt doc/ \ + $PKG/usr/doc/$PRGNAM-$VERSION/ +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + # Install a few typical config files for common asterisk servers for i in \ - asterisk codecs extensions iax indications musiconhold sip zapata modules ; + asterisk codecs extensions iax indications musiconhold sip modules ; do cat $PKG/usr/doc/$PRGNAM-$VERSION/sample_confs/${i}.conf > \ $PKG/etc/asterisk/${i}.conf.new ; @@ -89,9 +96,10 @@ done mkdir -p $PKG/etc/rc.d install -m 0755 contrib/init.d/rc.slackware.asterisk $PKG/etc/rc.d/rc.asterisk.new +mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG chown -R root:root . # Some files have improper ownership -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} -- cgit v1.2.3