2010-05-13 00:59:34 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Slackware build script for HandBrakeCLI
|
|
|
|
|
|
|
|
# This slackbuild maintained by Klaatu at klaatu@hackerpublicradio.org
|
|
|
|
# Modified by David Somero at SlackBuilds.org.
|
2012-09-24 18:00:46 +02:00
|
|
|
# Modified by Erik Hanson at SlackBuilds.org
|
2010-05-13 00:59:34 +02:00
|
|
|
|
|
|
|
PRGNAM=HandBrake
|
2013-11-16 21:51:56 +01:00
|
|
|
VERSION=${VERSION:-0.9.9}
|
2010-05-13 00:59:34 +02:00
|
|
|
BUILD=${BUILD:-1}
|
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
2011-04-03 06:35:49 +02:00
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
|
|
|
i?86) ARCH=i686 ;;
|
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2010-05-13 00:59:34 +02:00
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
2012-09-24 18:00:46 +02:00
|
|
|
if [ "$ARCH" = "i486" ]; then
|
|
|
|
LIBDIRSUFFIX=""
|
|
|
|
elif [ "$ARCH" = "i686" ]; then
|
|
|
|
LIBDIRSUFFIX=""
|
|
|
|
elif [ "$ARCH" = "x86_64" ]; then
|
|
|
|
LIBDIRSUFFIX="64"
|
|
|
|
else
|
|
|
|
LIBDIRSUFFIX=""
|
2011-04-03 06:35:49 +02:00
|
|
|
fi
|
|
|
|
|
2012-09-24 18:00:46 +02:00
|
|
|
set -e
|
|
|
|
|
2010-05-13 00:59:34 +02:00
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
rm -rf $PRGNAM-$VERSION
|
|
|
|
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
|
|
|
|
cd $PRGNAM-$VERSION
|
2012-09-24 18:00:46 +02:00
|
|
|
mkdir -p download
|
2011-04-03 06:35:49 +02:00
|
|
|
cp -r $CWD/* download
|
2010-05-13 00:59:34 +02:00
|
|
|
chown -R root:root .
|
|
|
|
chmod -R a-s,u+w,g-w+r,o-w+r .
|
|
|
|
|
2012-09-24 18:00:46 +02:00
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--disable-gtk-update-checks \
|
2010-05-13 00:59:34 +02:00
|
|
|
--arch=$ARCH
|
|
|
|
|
|
|
|
cd build
|
2012-09-24 18:00:46 +02:00
|
|
|
# Fix underlinking by configuring the gtk module first, then sed:
|
|
|
|
make gtk.configure
|
|
|
|
sed -i '/^LDFLAGS/s/$/ -ltheoraenc -ltheoradec/' gtk/src/Makefile
|
2013-11-22 08:34:22 +01:00
|
|
|
make
|
2011-04-03 06:35:49 +02:00
|
|
|
make install DESTDIR=$PKG
|
|
|
|
cd $TMP/$PRGNAM-$VERSION
|
2010-05-13 00:59:34 +02:00
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
2012-09-24 18:00:46 +02:00
|
|
|
cp -a AUTHORS COPYING CREDITS NEWS THANKS TRANSLATIONS \
|
|
|
|
$PKG/usr/doc/$PRGNAM-$VERSION
|
2010-05-13 00:59:34 +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
|
2011-04-03 06:35:49 +02:00
|
|
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
2010-05-13 00:59:34 +02:00
|
|
|
|
|
|
|
cd $PKG
|
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|