#!/bin/sh # Heavily based on the Slackware 11.0 SlackBuild # http://www.videolan.org # Packager Andrea Sciucca ( gohanz at infinito.it) # http://www.slacky.it # Requirements: # Avahi............( http://avahi.org ) # Dbud.............( http://www.freedesktop.org ) # Faac.............( http://www.audiocoding.com ) # Faad2............( http://www.audiocoding.com ) # GnuTLS...........( www.gnu.org/software/gnutls ) # Goom.............( http://www.ios-software.com/index.php3?page=projet&quoi=1&lg=AN ) # HAL-0.5.3........( http://www.freedesktop.org ) # Id3lib...........( http://id3lib.sourceforge.net ) # Imlib2...........( http://www.enlightenment.org/pages/imlib2.html ) # Jack-Audio.......( http://jackit.sourceforge.net ) # Lame.............( http://lame.sourceforge.net ) # LibA52...........( http://liba52.sourceforge.net ) # LibAVC1394.......( http://libavc1394.sourceforge.net ) # LibCddB..........( http://libcddb.sourceforge.net/index.html ) # LibCdIo..........( http://savannah.nongnu.org/projects/libcdio ) # LibCmml..........( http://www.annodex.net/software/libcmml ) # LibDaemon........( http://0pointer.de/lennart/projects/libdaemon ) # LibDc1394-.......( http://sourceforge.net/projects/libdc1394 ) # LibDts...........( http://debian.unnet.nl/pub/videolan/libdts/0.0.2 ) # LibDV............( http://libdv.sourceforge.net ) # LibDvBPsi4.......( http://developers.videolan.org/libdvbpsi ) # LibDvDcss........( http://developers.videolan.org/libdvdcss ) # LibDvDNav........( http://dvd.sourceforge.net ) # LibDvDRead.......( http://www.dtek.chalmers.se/groups/dvd/downloads.shtml ) # LibEbMl..........( http://dl.matroska.org ) # LibGGI...........( http://www.ggi-project.org ) # LibGcrypt........( http://directory.fsf.org/security/libgcrypt.html ) # LibGpGerror......( http://www.gnupg.org ) # LibMad...........( http://www.underbit.com/products/mad ) # LibMatroska......( http://dl.matroska.org ) # LibModPlug.......( http://modplug-xmms.sourceforge.net ) # LibMpcdec........( http://www.musepack.net/index.php?pg=home ) # LibMpeg2 [Mpeg2Dec].........( http://libmpeg2.sourceforge.net ) # LibMpeg3.........( http://heroinewarrior.com ) # LibOpenDaap......( http://crazney.net/programs/itunes/libopendaap.html ) # LibQuickTime.....( http://libquicktime.sourceforge.net ) # LibRaw1394.......( http://www.linux1394.org/index.php ) # LibSndFile.......( http://www.mega-nerd.com/libsndfile ) # LibShout.........( http://directory.fsf.org/audio/ogg/libshout.html ) # LibUpPnP.........( http://upnp.sourceforge.net ) # LibTar...........( http://www.feep.net/libtar ) # LibTasn..........( http://josefsson.org/libtasn1 ) # LIVE555..........( http://www.live555.com ) # MjpegTools.......( http://mjpeg.sourceforge.net ) # OpenSlp..........( http://www.openslp.org ) # PortAudio........( http://www.portaudio.com ) # Speex-...........( http://www.speex.org ) # Sqlite...........( http://www.sqlite.org ) # Tarkin...........( http://www.xiph.org/downloads ) # TwoLame..........( http://www.ecs.soton.ac.uk/~njh/twolame ) # Tremor...........( http://www.xiph.org/svn ) # VcdImager........( http://www.vcdimager.org ) # X264.............( http://developers.videolan.org/x264.html ) # XmlToMan.........( http://packages.debian.org/unstable/devel/xmltoman ) # Xosd.............( http://www.ignavus.net/software.html ) # Xvid.............( http://www.xvid.org/index.php ) # BUILDING FFMPEG STATIC LIBRARY CWD=`pwd` TMP=${TMP:-/tmp/tgz} NAME=ffmpeg ARCH=${ARCH:-i686} SOURCE=http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-510.zip if [ ! -e 26204-510.zip ]; then wget -c $SOURCE fi SOURCE=http://www.3gpp.org/ftp/Specs/archive/26_series/26.104/26104-510.zip if [ ! -e 26104-510.zip ]; then wget -c $SOURCE fi SOURCE=http://www.3gpp.org/ftp/Specs/archive/26_series/26.073/26073-510.zip if [ ! -e 26073-510.zip ]; then wget -c $SOURCE fi if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O3 -march=i686 -pipe -fomit-frame-pointer" elif [ "$ARCH" = "athlon64" ]; then SLKCFLAGS="-O2 -march=athlon64 -pipe" elif [ "$ARCH" = "athlonxp" ]; then SLKCFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" fi if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi mkdir -p $PKG/usr/bin cd $TMP tar xvjf $CWD/ffmpeg.tar.bz2 cd $NAME/libavcodec mkdir amrwb_float mkdir amr_float mkdir amr cd amrwb_float unzip -o $CWD/26204-510.zip unzip -o 26204-510_ANSI-C_source_code.zip mv makefile.gcc makefile cd ../amr_float unzip -o $CWD/26104-510.zip unzip -o 26104-510_ANSI_C_source_code.zip mv makefile.gcc makefile cd ../amr unzip -o $CWD/26073-510.zip unzip -o 26073-510_ANSI-C_source_code.zip cd $TMP/$NAME sed -i "s|-pedantic-errors|-DMMS_IO|g" libavcodec/amrwb_float/makefile sed -i "s|-pedantic-errors|-DMMS_IO|g" libavcodec/amr_float/makefile sed -i "s|-pedantic-errors|-DMMS_IO|g" libavcodec/amr/makefile 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 . CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr \ --mandir=/usr/man \ --disable-debug --enable-mp3lame \ --enable-xvid --enable-a52 \ --enable-libogg --enable-gpl \ --enable-pp \ --enable-faac --enable-faad \ --enable-a52bin --enable-vorbis \ --enable-faadbin --enable-amr_nb-fixed \ --enable-amr_if2 --enable-amr_wb \ --enable-pthreads make cd $CWD # Come back to build source directory # BUILDING wxGTK-2.6.3 (Unicode) library CWD=`pwd` TMP=${TMP:-/tmp/tgz} NAME=wxgtk SOURCE=http://heanet.dl.sourceforge.net/sourceforge/wxwindows/wxGTK-2.6.3.tar.bz2 if [ ! -e wxGTK-2.6.3.tar.bz2 ]; then wget -c $SOURCE fi if [ ! -d $TMP ]; then mkdir -p $TMP fi cd $TMP tar xjvf $CWD/wxGTK-2.6.3.tar.bz2 cd wxGTK-2.6.3 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 . CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr \ --enable-unicode \ --enable-plugins \ --disable-shared \ --with-sdl \ --enable-optimise \ --program-prefix="" \ --program-suffix="" \ i486-slackware-linux make cd $CWD # Come back to build source directory # BUILDING VLC PACKAGE with FFmpeg & WxGTk static library CWD=`pwd` TMP=${TMP:-/tmp/tgz} PKG=$TMP/package NAME=vlc VERSION=0.8.6c BUILD=1as export XPIDL=/usr/lib/seamonkey/xpidl SOURCE=http://download.videolan.org/pub/videolan/vlc/0.8.6c/$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 xzvf $CWD/$NAME-$VERSION.tar.gz 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" cd $NAME-$VERSION 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 . CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --enable-release \ --enable-optimize-memory \ --enable-shout \ --enable-live555 \ --with-live555-tree=/usr/lib/live \ --enable-dv \ --enable-dvdread \ --enable-v4l \ --enable-pvr \ --enable-cddax \ --enable-taglib \ --enable-vcdx \ --enable-dvb \ --enable-faad \ --enable-real \ --enable-realrtsp \ --enable-flac \ --enable-theora \ --enable-svg \ --enable-snapshot \ --enable-svgalib \ --enable-ggi \ --enable-aa \ --enable-caca \ --enable-esd \ --enable-portaudio \ --enable-arts \ --enable-jack \ --enable-cyberlink \ --enable-skins2 \ --enable-pda \ --enable-ncurses \ --enable-xosd \ --enable-galaktos \ --enable-goom \ --enable-twolame \ --enable-loader \ --enable-mozilla \ --enable-mediacontrol-python-bindings \ --enable-testsuite \ --enable-ffmpeg \ --with-ffmpeg-mp3lame \ --with-ffmpeg-faac \ --with-ffmpeg-vorbis \ --with-ffmpeg-theora \ --with-ffmpeg-ogg \ --with-ffmpeg-zlib \ --with-ffmpeg-tree=$TMP/ffmpeg \ --with-wx-config-path=$TMP/wxGTK-2.6.3 \ --program-prefix="" \ --program-suffix="" \ i486-slackware-linux make make install DESTDIR=$PKG chmod 755 $PKG/usr/lib/mozilla/plugins/* ( cd $PKG/usr/share/vlc/skins2 unzip -o $CWD/skins.zip ) mkdir -p $PKG/install echo "#!/bin/sh" >> $PKG/install/doinst.sh echo "mkdir -p ~/.vlc" >> $PKG/install/doinst.sh echo "( cd ~/.vlc ; rm -rf skins2 )" >> $PKG/install/doinst.sh echo "( cd ~/.vlc ; ln -sf /usr/share/vlc/skins2 skins2 )" >> $PKG/install/doinst.sh mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a ABOUT-NLS AUTHORS COPYING ChangeLog HACKING INSTALL MAINTAINERS NEWS README THANKS \ $PKG/usr/doc/$NAME-$VERSION 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 ( 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 cat << EOF > $PKG/usr/share/applications/$NAME.desktop [Desktop Entry] Type=Application Encoding=UTF-8 Name=VLC Name[it]=VLC GenericName=Media Player GenericName[it]=Lettore multimediale Comment=VideoLAN Media Player Icon=vlc TryExec=vlc Exec=vlc Terminal=false Categories=AudioVideo;Player; EOF # Removing VLC Mozilla Plugins from main VLC package rm -r $PKG/usr/lib/mozilla mkdir -p $PKG/opt/kde/share/icons/default.kde/16x16/apps mkdir -p $PKG/opt/kde/share/icons/default.kde/32x32/apps mkdir -p $PKG/opt/kde/share/icons/default.kde/48x48/apps mkdir -p $PKG/opt/kde/share/icons/default.kde/128x128/apps ( cd share cp -a vlc128*.png $PKG/opt/kde/share/icons/default.kde/128x128/apps/vlc.png cp -a vlc16*.png $PKG/opt/kde/share/icons/default.kde/16x16/apps/vlc.png cp -a vlc32*.png $PKG/opt/kde/share/icons/default.kde/32x32/apps/vlc.png cp -a vlc48*.png $PKG/opt/kde/share/icons/default.kde/48x48/apps/vlc.png ) cd $PKG requiredbuilder -v -y -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz cd $CWD # Come back to build source directory # BUILDING MOZILLA VLC Plugin package CWD=`pwd` TMP=${TMP:-/tmp/tgz} PKG=$TMP/package/vlc-mozilla-plugin NAME=vlc-mozilla-plugin mkdir -p $PKG/usr/lib/mozilla/plugins ( cd $TMP/vlc-$VERSION/mozilla cp -a libvlcplugin.so $PKG/usr/lib/mozilla/plugins ) mkdir -p $PKG/install cat << EOF > $PKG/install/slack-desc # HOW TO EDIT THIS FILE: # The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' # on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. |-----handy-ruler----------------------------------------------------| vlc-mozilla-plugin: VLC (Mozilla plugin) vlc-mozilla-plugin: vlc-mozilla-plugin: VLC media player plugin for Mozilla compatible browser vlc-mozilla-plugin: vlc-mozilla-plugin: **WARNING CAN CAUSE MOZILLA CRASH** vlc-mozilla-plugin: vlc-mozilla-plugin: vlc-mozilla-plugin: vlc-mozilla-plugin: http://www.videolan.org vlc-mozilla-plugin: WWW.SLACKY.IT vlc-mozilla-plugin: Packager Gohanz. EOF cd $PKG requiredbuilder -v -y $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi