#!/bin/sh # Heavily based on the Slackware 12.0 SlackBuild # http://www.theorie.physik.uni-goettingen.de/~ostreich/transcode/ # Packager Vincenzi Loris - slacky@slacky.it CWD=`pwd` TMP=${TMP:-/tmp/tgz} PKG=$TMP/package NAME=transcode VERSION=1.0.5 CHOST=i486 ARCH=${ARCH:-i486} BUILD=1sl SOURCE=http://transcode.kabewm.com/$NAME-$VERSION.tar.bz2 if [ ! -e $NAME-$VERSION.tar.bz2 ]; then wget -c $SOURCE fi rm -rf $PKG mkdir -p $PKG if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" fi cd $TMP tar xjvf $CWD/$NAME-$VERSION.tar.bz2 cd $NAME-$VERSION find . \( -perm 777 -o -perm 775 -o -perm 711 \) -exec chmod 755 {} \; find . \( -perm 700 -o -perm 555 -o -perm 511 \) -exec chmod 755 {} \; find . \( -perm 666 -o -perm 664 -o -perm 600 \) -exec chmod 644 {} \; find . \( -perm 444 -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; autoreconf -i -f chown -R root:root . CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr \ --mandir=/usr/man \ --with-ffmpeg-libs-includes=/usr/include/ffmpeg \ --with-ffmpeg-libs-libs=/usr/lib \ --with-libquicktime-prefix=/usr \ --with-libquicktime-includes=/usr/include/lqt \ --with-libquicktime-libs=/usr/lib \ --with-libfame-prefix=/usr \ --with-libfame-includes=/usr/include \ --with-libfame-libs=/usr/lib \ --with-lzo-prefix=/usr \ --with-lzo-includes=/usr/include/lzo \ --with-lzo-libs=/usr/lib \ --enable-freetype2 \ --enable-libdv \ --enable-libmpeg3 \ --enable-theora \ --enable-v4l \ --enable-xvid \ --enable-alsa \ --enable-x264 \ --enable-faac \ --enable-ogg \ --enable-vorbis \ --enable-libquicktime \ --enable-a52-default-decoder \ --enable-a52 \ --enable-mjpegtools \ --enable-libfame \ --enable-libxml2 \ --enable-imagemagick \ --enable-sdl \ --enable-gtk \ --enable-lzo \ --enable-avifile \ --program-prefix= \ --program-suffix= \ --enable-avifile \ --build=$CHOST-slackware-linux read make make install DESTDIR=$PKG mv -f $PKG/usr/share/doc $PKG/usr/ rm -rf $PKG/usr/share mv -f $PKG/usr/doc/$NAME $PKG/usr/doc/$NAME-$VERSION cp -a AUTHORS ChangeLog COPYING INSTALL README TODO $PKG/usr/doc/$NAME-$VERSION cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find $PKG/usr/man -type f -exec gzip -9 {} \; mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/slack-desc cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild requiredbuilder -v -y -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi