mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-24 10:02:29 +01:00
8296e8ecb1
Install the GTK+ front-end, there is basically no point to this package without it.
66 lines
1.9 KiB
Bash
66 lines
1.9 KiB
Bash
#!/bin/sh
|
|
|
|
# Slackware build script for HandBrakeCLI
|
|
|
|
# This slackbuild maintained by Klaatu at klaatu@hackerpublicradio.org
|
|
# Modified by David Somero at SlackBuilds.org.
|
|
|
|
PRGNAM=HandBrake
|
|
VERSION=${VERSION:-0.9.4}
|
|
ARCH=${ARCH:-i686}
|
|
BUILD=${BUILD:-1}
|
|
TAG=${TAG:-_SBo}
|
|
|
|
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
|
|
|
|
rm -rf $PKG
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
cd $TMP
|
|
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
|
|
chown -R root:root .
|
|
chmod -R a-s,u+w,g-w+r,o-w+r .
|
|
|
|
./configure \
|
|
--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
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
cp -a AUTHORS COPYING CREDITS NEWS THANKS $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}
|