aboutsummaryrefslogtreecommitdiff
path: root/multimedia/HandBrake/HandBrake.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/HandBrake/HandBrake.SlackBuild')
-rw-r--r--multimedia/HandBrake/HandBrake.SlackBuild42
1 files changed, 19 insertions, 23 deletions
diff --git a/multimedia/HandBrake/HandBrake.SlackBuild b/multimedia/HandBrake/HandBrake.SlackBuild
index f65066329cbd5..361695e7dec08 100644
--- a/multimedia/HandBrake/HandBrake.SlackBuild
+++ b/multimedia/HandBrake/HandBrake.SlackBuild
@@ -6,32 +6,30 @@
# Modified by David Somero at SlackBuilds.org.
PRGNAM=HandBrake
-VERSION=${VERSION:-0.9.4}
-ARCH=${ARCH:-i686}
+VERSION=${VERSION:-0.9.5}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i686 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-# Has to be i686 or x86_64
-if [ "$ARCH" != "x86_64" ]; then
- ARCH="i686"
-fi
-
-# We are doing this to prevent HandBrake from downloading these
-# files. SBo does not allow scripts/source to download stuff.
-DLOADS="a52dec-0.7.4.tar.gz faac-1.28.tar.gz faad2-2.7.tar.gz
-ffmpeg-r19067.tar.bz2 lame-3.98.tar.gz libdca-r81-strapped.tar.gz
-libdvdnav-svn1168.tar.gz libdvdread-svn1168.tar.gz libmkv-0.6.4.tar.bz2
-libogg-1.1.3.tar.gz libsamplerate-0.1.4.tar.gz libtheora-1.1.0.tar.bz2
-libvorbis-aotuv_b5.tar.gz mp4v2-trunk-r355.tar.bz2 mpeg2dec-0.5.1.tar.gz
-x264-r1347-5ddd61b.tar.gz"
-
set -e
+# Support building with no GUI.
+if [ "${GUI:-yes}" = "no" ]; then
+ GUI="--disable-gtk"
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -39,21 +37,18 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
mkdir download
-for file in $DLOADS ; do cp $CWD/$file download ; done
+cp -r $CWD/* download
chown -R root:root .
chmod -R a-s,u+w,g-w+r,o-w+r .
-./configure \
+./configure $GUI \
--prefix=/usr\
--arch=$ARCH
cd build
make
-cd ..
- install -D -m0755 -s build/HandBrakeCLI $PKG/usr/bin/HandBrakeCLI
- install -D -m0755 -s build/gtk/src/ghb $PKG/usr/bin/ghb
- install -D -m0644 gtk/src/ghb.desktop $PKG/usr/share/applications/ghb.desktop
- install -D -m0644 gtk/src/hb-icon.64.png $PKG/usr/share/pixmaps/hb-icon.png
+ make install DESTDIR=$PKG
+cd $TMP/$PRGNAM-$VERSION
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING CREDITS NEWS THANKS $PKG/usr/doc/$PRGNAM-$VERSION
@@ -61,6 +56,7 @@ 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
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}