diff options
Diffstat (limited to 'audio/faad2/faad2.SlackBuild')
-rw-r--r-- | audio/faad2/faad2.SlackBuild | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/audio/faad2/faad2.SlackBuild b/audio/faad2/faad2.SlackBuild index e0ed48385a..f40bb0d635 100644 --- a/audio/faad2/faad2.SlackBuild +++ b/audio/faad2/faad2.SlackBuild @@ -1,8 +1,9 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for faad2 # Copyright 2007 Niklas "Nille" Åkerström +# Copyright (c) 2020-2023, Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +23,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=faad2 -VERSION=${VERSION:-2.7} -BUILD=${BUILD:-2} +VERSION=${VERSION:-2.10.1} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +39,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -60,14 +71,16 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$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 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +./bootstrap CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -86,25 +99,18 @@ CXXFLAGS="$SLKCFLAGS" \ make make install-strip DESTDIR=$PKG -mv $PKG/usr/man/manm $PKG/usr/man/man1 -rename .man .1 $PKG/usr/man/man1/*.man -( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -) +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 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README* TODO docs/* \ +cp -a AUTHORS COPYING ChangeLog NEWS README* TODO docs/Ahead* \ $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 {} \; + +rm -f $PKG/usr/lib*/*.la mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} - -if [ "$1" = "--cleanup" ]; then - rm -rf $PKG $TMP/$PRGNAM-$VERSION - fi +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |