#!/bin/sh # Heavily based on the Slackware 11.0 SlackBuild # http://gpac.sourceforge.net # Packagers Andrea Sciucca ( gohanz at infinito.it) # http://www.slacky.it # Depends from: # FFmpeg.......................( http://ffmpeg.sourceforge.net ) # wxwidgets (UNICODE)..........( http://www.wxwindows.org ) # Faad.........................( http://www.audiocoding.com ) # Faac.........................( http://www.audiocoding.com ) # Lame.........................( http://lame.sourceforge.net ) # Libdc1394....................( http://sourceforge.net/projects/libdc1394 ) # LibMad.......................( http://www.underbit.com/products/mad ) # Libraw.......................( http://www.linux1394.org/index.php ) # OpenSSl......................( http://www.openssl.org ) CWD=`pwd` TMP=${TMP:-/tmp/tgz} PKG=$TMP/package-gpac NAME=gpac VERSION=0.4.4 ARCH=${ARCH:-i686} BUILD=1as SOURCE=http://puzzle.dl.sourceforge.net/sourceforge/gpac/$NAME-$VERSION.tar.gz if [ ! -e $NAME-$VERSION.tar.gz ]; then wget -c $SOURCE fi if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi cd $TMP tar xvzf $CWD/$NAME-$VERSION.tar.gz cd $NAME (cd modules/amr_float_dec/amr_nb_ft unzip -o $CWD/26104-610.zip unzip -o 26104-610_ANSI_C_source_code.zip mv c-code/* . ) (cd modules/amr_float_dec/amr_wb_ft unzip -o $CWD/26204-600.zip unzip -o 26204-600_ANSI-C_source_code.zip mv c-code/* . ) find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; chown -R root:root . chmod u+x ./configure echo -e "\E[0;32m+---------------------------------+\E[0;0m" echo -e "\E[0;32m| Start SlackBuild $NAME-$VERSION |\E[0;0m" echo -e "\E[0;32m+---------------------------------+\E[0;0m" ./configure --prefix=/usr \ --mozdir=/usr/lib/seamonkey \ --enable-amr \ --use-ffmpeg=local \ --cpu=$ARCH mkdir -p $PKG/usr/include mkdir -p $PKG/usr/lib/gpac mkdir -p $PKG/usr/man/man1 mkdir -p $PKG/usr/lib/mozilla/components/ mkdir -p $PKG/usr/lib/mozilla/plugins make all make install prefix=$PKG/usr make install-lib prefix=$PKG/usr make -C applications/osmozilla rm -rf $PKG/usr/lib/gpac mv /usr/lib/gpac $PKG/usr/lib/ (cd bin/gcc install -m 755 nposmozilla.so $PKG/usr/lib/mozilla/plugins install -m 755 nposmozilla.xpt $PKG/usr/lib/mozilla/components ) (cd doc/man cp -a * $PKG/usr/man/man1 ) mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a AUTHORS BUGS COPYING Changelog 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 . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs strip -g 2> /dev/null ) mkdir -p $PKG/usr/share/applications mkdir -p $PKG/usr/share/pixmaps cp -a $TMP/$NAME/applications/osmo4_wx/osmo4.xpm $PKG/usr/share/pixmaps cat << EOF > $PKG/usr/share/applications/Osmo4.desktop [Desktop Entry] Type=Application Encoding=UTF-8 Name=Osmo4 Name[it]=Osmo4 GenericName=Media Player GenericName[it]=Lettore multimediale Comment=GPAC Client Media Player Icon=/usr/share/pixmaps/osmo4.xpm TryExec=Osmo4 Exec=Osmo4 Terminal=false Categories=AudioVideo;Player; EOF mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc gzip -9 $PKG/usr/man/man1/* cd $PKG requiredbuilder -y -v -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi