#!/bin/sh # Heavily based on the Slackware 13.0 SlackBuild # http://www.videolan.org # Packager Andrea Sciucca ( gohanz at infinito.it) # http://www.slacky.eu # # Required: a52dec, amrnb, amrwb, dirac, enca, faac, faad2, ffmpeg, goom, jack-audio-connection-kit, lame, libass, libavc1394 # Required: libdca, libdvbpsi5, libdvdcss, libdvdnav, libdvdread, libebml, libgsm, libkate, libmatroska, libminizip # Required: libmodplug, libmpcdec, libmpeg2, libnotify, libproxy, libshout, libtiger, libupnp, libv4l, lirc # Required: lua, opencor-amr, openjpeg, schroendinger, speex, twolame, vcdimager, x264, xosd, xvidcore, zvbi # # Statically linked: fluidsynth, live555, libdc1394-1.2.2, libraw1394-1.3.0 CWD=`pwd` TMP=${TMP:-/tmp/txz} NAME=vlc PKG=$TMP/package/$NAME VERSION=1.0.6 ARCH=${ARCH:-i486} BUILD=3slacky 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 $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686"; SLKLDFLAGS=""; LIBDIRSUFFIX=""; CHOST=i486 elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686"; SLKLDFLAGS=""; LIBDIRSUFFIX=""; CHOST=i486 elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC"; SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" fi cd $TMP tar xvjf $CWD/$NAME-$VERSION.tar.bz2 || exit 1 echo -e "\E[0;32m+----------------------+\E[0;0m" echo -e "\E[0;32m| Start SlackBuild VLC |\E[0;0m" echo -e "\E[0;32m+----------------------+\E[0;0m" # Installing some statically linked package! upgradepkg --install-new $CWD/static-packages/* cd $NAME-$VERSION # Setting the default runtime font. zcat $CWD/$NAME.diff.gz | patch -p1 -E --backup --verbose chmod -R u+w,go+r-w,a-s . chown -R root:root . LDFLAGS="$SLKLDFLAGS" \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --mandir=/usr/man \ --enable-optimize-memory=no \ --enable-run-as-root \ --enable-release \ --enable-sout \ --enable-switcher \ --enable-shout \ --enable-live555 \ --enable-dv \ --enable-dc1394 \ --enable-dvdread \ --enable-dvdnav \ --enable-dvbpsi \ --enable-v4l \ --enable-v4l2 \ --enable-pvr \ --disable-gnomevfs \ --enable-cddax \ --enable-vcdx \ --enable-shine \ --enable-twolame \ --enable-faad \ --enable-real \ --enable-realrtsp \ --enable-flac \ --enable-tremor \ --enable-dirac \ --enable-theora \ --enable-csri \ --enable-libass \ --enable-svg \ --enable-snapshot \ --enable-svgalib \ --enable-aa \ --enable-caca \ --enable-jack \ --disable-pulse \ --disable-portaudio \ --enable-skins2 \ --enable-xosd \ --enable-galaktos \ --enable-goom \ --enable-lirc \ --enable-loader \ --enable-mozilla \ --with-live555-tree=/usr/lib/live \ --program-prefix= \ --program-suffix= \ --build=$ARCH-slackware-linux read make || exit 1 make install DESTDIR=$PKG || exit 1 # Restoring default Slackware 13.0 packages! upgradepkg --install-new $CWD/Slackware13.0-packages/* mkdir -p $PKG/usr/doc/$NAME-$VERSION/SlackBuild cp -a ABOUT-NLS AUTHORS COPYING ChangeLog HACKING INSTALL MAINTAINERS NEWS README THANKS \ $PKG/usr/doc/$NAME-$VERSION cp -a $PKG/usr/share/doc/vlc/* $PKG/usr/doc/$NAME-$VERSION rm -rf $PKG/usr/share/doc mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/SlackBuild/slack-desc cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/SlackBuild/$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 GenericName=Media Player GenericName[it]=Lettore multimediale Comment=A multi-platform MPEG, VCD/DVD, and DivX player Comment=Lettore MPEG, VCD/DVD e DivX multipiattaforma 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 vlc128x128.png $PKG/usr/share/icons/hicolor/128x128/apps/vlc.png cp -a vlc16x16.png $PKG/usr/share/icons/hicolor/16x16/apps/vlc.png cp -a vlc32x32.png $PKG/usr/share/icons/hicolor/32x32/apps/vlc.png cp -a vlc48x48.png $PKG/usr/share/icons/hicolor/48x48/apps/vlc.png ) cp -a $PKG/usr/lib/mozilla/plugins/* $TMP rm -r $PKG/usr/lib/mozilla gzip -9 $PKG/usr/man/*/* cd $PKG chown -R root:root $PKG if [ -x "$(which requiredbuilder)" ]; then ADD=$(ls /var/log/packages/ | sed -ne 's/\(libdvdcss\)-\([^-]\+-[^-]\+-[^-]\+\)/\1 >= \2/p') \ requiredbuilder -y -v -s $CWD $PKG fi makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.txz cd $TMP # Come back to build source directory # BUILDING MOZILLA VLC Plugin package TMP=${TMP:-/tmp/txz} PKG=$TMP/package/vlc-mozilla-plugin NAME=vlc-mozilla-plugin mkdir -p $PKG/usr/lib/mozilla/plugins cp -a $TMP/libvlcplugin.* $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: vlc-mozilla-plugin: vlc-mozilla-plugin: EOF cd $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.txz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi