2010-05-12 23:31:46 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2010-05-13 00:34:47 +02:00
|
|
|
# Slackware build script for gnome-mplayer
|
|
|
|
# Written by Phillip Warner <pc_warner@yahoo.com>
|
2010-05-12 23:31:46 +02:00
|
|
|
|
|
|
|
PRGNAM=gnome-mplayer
|
2011-07-12 11:05:00 +02:00
|
|
|
VERSION=${VERSION:-1.0.4}
|
2011-07-26 07:37:24 +02:00
|
|
|
BUILD=${BUILD:-2}
|
2010-05-12 23:31:46 +02:00
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
2010-05-19 21:28:44 +02:00
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
2010-06-04 07:11:36 +02:00
|
|
|
i?86) ARCH=i486 ;;
|
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
2010-05-19 21:28:44 +02:00
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2010-05-12 23:31:46 +02:00
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
2011-07-12 11:05:00 +02:00
|
|
|
# Assume we're using dconf unless otherwise specified
|
|
|
|
GCONF=${GCONF:-NO}
|
|
|
|
|
2010-05-12 23:31:46 +02:00
|
|
|
if [ "$ARCH" = "i486" ]; then
|
|
|
|
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
2010-05-13 00:34:47 +02:00
|
|
|
LIBDIRSUFFIX=""
|
2010-05-12 23:31:46 +02:00
|
|
|
elif [ "$ARCH" = "i686" ]; then
|
|
|
|
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
2010-05-13 00:34:47 +02:00
|
|
|
LIBDIRSUFFIX=""
|
2010-05-12 23:31:46 +02:00
|
|
|
elif [ "$ARCH" = "x86_64" ]; then
|
|
|
|
SLKCFLAGS="-O2 -fPIC"
|
2010-05-13 00:34:47 +02:00
|
|
|
LIBDIRSUFFIX="64"
|
2010-05-19 21:28:44 +02:00
|
|
|
else
|
|
|
|
SLKCFLAGS="-O2"
|
|
|
|
LIBDIRSUFFIX=""
|
2010-05-12 23:31:46 +02:00
|
|
|
fi
|
|
|
|
|
2010-05-13 00:34:47 +02:00
|
|
|
set -e
|
|
|
|
|
2010-05-12 23:31:46 +02:00
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
2010-05-13 00:34:47 +02:00
|
|
|
cd $TMP
|
2010-05-12 23:31:46 +02:00
|
|
|
rm -rf $PRGNAM-$VERSION
|
2010-05-13 00:34:47 +02:00
|
|
|
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
|
|
|
cd $PRGNAM-$VERSION
|
2010-05-12 23:31:46 +02:00
|
|
|
chown -R root:root .
|
|
|
|
find . \
|
2010-05-13 00:34:47 +02:00
|
|
|
\( -perm 777 -o -perm 775 -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 {} \;
|
|
|
|
|
2011-07-26 07:37:24 +02:00
|
|
|
# Misc fixes that did not make it into 1.0.4
|
|
|
|
patch -p1 < $CWD/gnome-mplayer-fixes.diff
|
|
|
|
|
2011-07-12 11:05:00 +02:00
|
|
|
# If GCONF=YES above, then enable gconf; otherwise, disable it.
|
|
|
|
if [ "$GCONF" = "YES" ]; then
|
|
|
|
do_gconf="with"
|
|
|
|
else
|
|
|
|
do_gconf="without"
|
|
|
|
fi
|
|
|
|
|
2010-05-12 23:31:46 +02:00
|
|
|
CFLAGS="$SLKCFLAGS" \
|
|
|
|
CXXFLAGS="$SLKCFLAGS" \
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
2010-05-13 00:34:47 +02:00
|
|
|
--mandir=/usr/man \
|
|
|
|
--docdir=/usr/doc/$PRGNAM-$VERSION \
|
|
|
|
--disable-nautilus \
|
2011-07-12 11:05:00 +02:00
|
|
|
--${do_gconf}-gconf \
|
2010-05-13 00:34:47 +02:00
|
|
|
--disable-schemas-install \
|
|
|
|
--build=$ARCH-slackware-linux
|
|
|
|
|
|
|
|
make
|
|
|
|
make install DESTDIR=$PKG
|
|
|
|
|
2010-05-19 08:40:46 +02:00
|
|
|
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
|
|
|
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
2010-05-12 23:31:46 +02:00
|
|
|
|
2010-05-19 21:28:44 +02:00
|
|
|
find $PKG/usr/man -type f -exec gzip -9 {} \;
|
2010-05-12 23:31:46 +02:00
|
|
|
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
|
|
|
|
|
|
|
cd $PKG
|
2010-05-13 00:34:47 +02:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|