audio/shorten: Miscellaneous cleanups

Allow VERSION to be passed to the script. Remove unneeded comments and
configure flags. Use 'install-strip'. Generalize man page handling.

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
slakmagik 2011-01-28 22:55:53 -05:00 committed by Robby Workman
parent 5663f77522
commit ad832f6937
1 changed files with 3 additions and 9 deletions

View File

@ -5,16 +5,14 @@
# Released under the WTFPL
PRGNAM=shorten
VERSION=3.6.1
VERSION=${VERSION:-3.6.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@ -46,7 +44,6 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@ -58,19 +55,16 @@ CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man
make
make DESTDIR=$PKG install
make DESTDIR=$PKG install-strip
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/man -type f -exec gzip -9 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a [ACINR]* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
gzip -9 $PKG/usr/man/man1/$PRGNAM.1
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc