#!/bin/sh # Heavily based on the Slackware 12.1 SlackBuild # http://www.videolan.org # Packager Andrea Sciucca ( gohanz at infinito.it) # http://www.slacky.it # 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-710.zip if [ ! -e 26204-710.zip ]; then wget -c $SOURCE fi SOURCE=http://www.3gpp.org/ftp/Specs/archive/26_series/26.104/26104-700.zip if [ ! -e 26104-700.zip ]; then wget -c $SOURCE fi SOURCE=http://www.3gpp.org/ftp/Specs/archive/26_series/26.073/26073-700.zip if [ ! -e 26073-700.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-710.zip unzip -o 26204-710_ANSI-C_source_code.zip ( cd c-code mv makefile.gcc makefile cp * .. ) cd ../amr_float unzip -o $CWD/26104-700.zip unzip -o 26104-700_ANSI_C_source_code.zip ( cd c-code mv makefile.gcc makefile cp * .. ) cd ../amr unzip -o $CWD/26073-700.zip unzip -o 26073-700_ANSI_C_source_code.zip ( cd c-code cp * .. ) 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 chmod -R u+w,go+r-w,a-s . 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 Mpeg2dec Static library CWD=`pwd` TMP=${TMP:-/tmp/tgz} NAME=mpeg2dec VERSION=0.4.1 SOURCE=http://libmpeg2.sourceforge.net/files/mpeg2dec-0.4.1.tar.gz if [ ! -e mpeg2dec-0.4.1.tar.gz ]; then wget -c $SOURCE fi if [ ! -d $TMP ]; then mkdir -p $TMP fi cd $TMP tar xzvf $CWD/$NAME-$VERSION.tar.gz cd $NAME-$VERSION chmod -R u+w,go+r-w,a-s . chown -R root:root . CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr \ --program-prefix= \ --program-suffix= \ --build=i486-slackware-linux make cd $CWD # Come back to build source directory # BUILDING wxGTK-2.6.3 (Unicode) Static library CWD=`pwd` TMP=${TMP:-/tmp/tgz} NAME=wxgtk VERSION=2.6.4 SOURCE=http://heanet.dl.sourceforge.net/sourceforge/wxwindows/wxGTK-2.6.4.tar.bz2 if [ ! -e wxGTK-2.6.4.tar.bz2 ]; then wget -c $SOURCE fi cd $TMP tar xvjf $CWD/wxGTK-$VERSION.tar.bz2 cd wxGTK-$VERSION chmod -R u+w,go+r-w,a-s . 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= \ --build=i486-slackware-linux make cd $CWD # Come back to build source directory # BUILDING VLC PACKAGE with wxGTK library CWD=`pwd` TMP=${TMP:-/tmp/tgz} PKG=$TMP/package/vlc NAME=vlc VERSION=0.8.6i ARCH=i686 BUILD=1as export XPIDL=/usr/lib/seamonkey/xpidl SOURCE=http://download.videolan.org/pub/videolan/vlc/$VERSION/$NAME-$VERSION.tar.bz2 if [ ! -e $NAME-$VERSION.tar.bz2 ]; then wget -c $SOURCE fi if [ ! -d $PKG ]; then mkdir -p $PKG fi cd $TMP tar xvjf $CWD/$NAME-$VERSION.tar.bz2 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 chmod -R u+w,go+r-w,a-s . 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.4 \ --program-prefix= \ --program-suffix= \ --build=i486-slackware-linux make make install DESTDIR=$PKG 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 echo "if [ -x /usr/bin/update-mime-database ]; then /usr/bin/update-mime-database /usr/share/mime &> /dev/null fi" >> $PKG/install/doinst.sh echo "" >> $PKG/install/doinst.sh echo "if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database 1> /dev/null &> /dev/null fi" >> $PKG/install/doinst.sh echo >> $PKG/install/doinst.sh echo "if [ -x /usr/bin/gtk-update-icon-cache ]; then /usr/bin/gtk-update-icon-cache -f -q /usr/share/icons/hicolor &> /dev/null fi" >> $PKG/install/doinst.sh echo >> $PKG/install/doinst.sh ( 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; StartupNotify=true MimeType=application/ogg;application/ram;application/smil;application/vnd.rn-realmedia;application/x-extension-m4a;application/x-extension-mp4;application/x-flac;application/x-flash-video;application/x-matroska;application/x-ogg;application/x-quicktime-media-link;application/x-quicktimeplayer;application/x-shockwave-flash;application/x-shorten;application/x-smil;application/xspf+xml;audio/3gpp;audio/ac3;audio/AMR;audio/AMR-WB;audio/basic;audio/mp4;audio/mpeg;audio/mpegurl;audio/vnd.rn-realaudio;audio/x-ape;audio/x-flac;audio/x-it;audio/x-m4a;audio/x-matroska;audio/x-mod;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;audio/x-ms-wma;audio/x-musepack;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-realaudio;audio/x-pn-realaudio-plugin;audio/x-pn-wav;audio/x-pn-windows-acm;audio/x-realaudio;audio/x-real-audio;audio/x-scpls;audio/x-tta;audio/x-wav;audio/x-wav;audio/x-wavpack;image/vnd.rn-realpix;image/x-pict;misc/ultravox;text/google-video-pointer;text/x-google-video-pointer;video/3gpp;video/dv;video/fli;video/flv;video/mp4;video/mp4v-es;video/mpeg;video/msvideo;video/quicktime;video/vivo;video/vnd.divx;video/vnd.rn-realvideo;video/vnd.vivo;video/x-anim;video/x-avi;video/x-flc;video/x-fli;video/x-flic;video/x-m4v;video/x-matroska;video/x-mpeg;video/x-ms-asf;video/x-msvideo;video/x-ms-wm;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvx;video/x-nsv;video/x-ogm+ogg;video/x-theora+ogg; EOF mkdir -p $PKG/usr/share/icons/hicolor/16x16/apps mkdir -p $PKG/usr/share/icons/hicolor/32x32/apps mkdir -p $PKG/usr/share/icons/hicolor/48x48/apps mkdir -p $PKG/usr/share/icons/hicolor/128x128/apps ( cd share cp -a vlc128*.png $PKG/usr/share/icons/hicolor/128x128/apps/vlc.png cp -a vlc16*.png $PKG/usr/share/icons/hicolor/16x16/apps/vlc.png cp -a vlc32*.png $PKG/usr/share/icons/hicolor/32x32/apps/vlc.png cp -a vlc48*.png $PKG/usr/share/icons/hicolor/48x48/apps/vlc.png ) rm -r $PKG/usr/lib/mozilla cd $PKG requiredbuilder -v -y -s $CWD $PKG makepkg -l y -c n $CWD/../$NAME-$VERSION-$ARCH-$BUILD.tgz cd $TMP # 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-0.8.6i/mozilla cp -a libvlcplugin.so $PKG/usr/lib/mozilla/plugins ) chmod 755 $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 -s $PKG makepkg -l y -c n $CWD/../$NAME-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi