summaryrefslogtreecommitdiff
path: root/source/l/a52dec
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/a52dec')
-rwxr-xr-xsource/l/a52dec/a52dec.SlackBuild114
-rw-r--r--source/l/a52dec/slack-desc12
2 files changed, 126 insertions, 0 deletions
diff --git a/source/l/a52dec/a52dec.SlackBuild b/source/l/a52dec/a52dec.SlackBuild
new file mode 100755
index 00000000..0153daff
--- /dev/null
+++ b/source/l/a52dec/a52dec.SlackBuild
@@ -0,0 +1,114 @@
+#!/bin/sh
+
+# Slackware build script for a52dec
+#
+# Copyright 2007 Niklas "Nille" Åkerström
+# Copyright 2014, 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2014 Heinz Wiesinger, Amsterdam, NL
+# 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.
+
+PKGNAM=a52dec
+VERSION=${VERSION:-$(echo a52dec*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d- | rev)}
+BUILD=${BUILD:-2}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:--j6}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit
+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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --enable-shared \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# This header is needed by xine-lib:
+cp -a liba52/a52_internal.h $PKG/usr/include/a52dec
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.*
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING* ChangeLog HISTORY INSTALL NEWS README* TODO \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/source/l/a52dec/slack-desc b/source/l/a52dec/slack-desc
new file mode 100644
index 00000000..e4de56fb
--- /dev/null
+++ b/source/l/a52dec/slack-desc
@@ -0,0 +1,12 @@
+ |-----handy-ruler------------------------------------------------------|
+a52dec: a52dec (test program for liba52)
+a52dec:
+a52dec: a52dec is a test program for liba52. It decodes ATSC A/52 streams
+a52dec: and also includes a demultiplexer for mpeg-1 and mpeg-2 program
+a52dec: streams. This package also includes liba52, which is a free
+a52dec: library for decoding ATSC A/52 streams. The A/52 standard is used
+a52dec: in a variety of applications, including digital television and DVD.
+a52dec: It is also known as AC-3.
+a52dec:
+a52dec: Homepage: http://liba52.sourceforge.net/
+a52dec: