2013-10-28 17:20:19 +01:00
|
|
|
#!/bin/sh
|
|
|
|
# Slackware build script for <miniAudicle>
|
|
|
|
#
|
|
|
|
# Michales (clavisound) Michaloudes korgie@gmail.com <2013>
|
|
|
|
|
|
|
|
PRGNAM=miniAudicle
|
|
|
|
VERSION=${VERSION:-0.2.2c}
|
|
|
|
BUILD=${BUILD:-1}
|
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
2017-12-21 00:04:47 +01:00
|
|
|
i?86) ARCH=i586 ;;
|
2013-10-28 17:20:19 +01:00
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
CWD=$(pwd)
|
2013-11-22 08:34:22 +01:00
|
|
|
TMP=${TMP:-/tmp/SBo}
|
2013-10-28 17:20:19 +01:00
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
2017-12-21 00:04:47 +01:00
|
|
|
if [ "$ARCH" = "i586" ]; then
|
|
|
|
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
2013-10-28 17:20:19 +01:00
|
|
|
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
|
|
|
|
|
|
|
|
SOUNDENGINE=${SOUNDENGINE:-alsa}
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
rm -rf $PRGNAM-$VERSION
|
|
|
|
tar xvf $CWD/$PRGNAM-$VERSION.tgz
|
2016-01-08 23:04:56 +01:00
|
|
|
cd $PRGNAM-$VERSION
|
2013-10-28 17:20:19 +01:00
|
|
|
chown -R root:root .
|
2013-11-22 08:37:19 +01:00
|
|
|
find -L . \
|
|
|
|
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
2013-10-28 17:20:19 +01:00
|
|
|
-exec chmod 755 {} \; -o \
|
|
|
|
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
|
|
|
-exec chmod 644 {} \;
|
|
|
|
|
2016-01-08 23:04:56 +01:00
|
|
|
cd src
|
|
|
|
|
2013-10-28 17:20:19 +01:00
|
|
|
# Set our CFLAGS
|
|
|
|
sed -i "s|-O3|$SLKCFLAGS|" makefile* chuck/makefile*
|
|
|
|
|
|
|
|
make linux-$SOUNDENGINE
|
|
|
|
install -m 0755 -D wxw/$PRGNAM $PKG/usr/bin/$PRGNAM-$SOUNDENGINE
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cd $TMP/$PRGNAM-$VERSION/
|
|
|
|
cp -a \
|
|
|
|
COPYING README.linux BUGS LGPL VERSIONS \
|
|
|
|
$PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
# copy examples too
|
|
|
|
cp -a examples $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
|
|
|
|
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}
|