#!/bin/sh # Copyright Loris Vincenzi (http://www.slacky.eu) # All rights reserved. # # Heavily based on the Slackware 13.0 SlackBuild # http://qdvdauthor.sourceforge.net/ # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Required: MPlayer, amrnb, amrwb, cdrkit, dirac, dv2sub, dvd-slideshow, dvdauthor, dvdisaster, faac, ffmpeg, lame, libdc1394, libgsm, libusb1, mctoolame, mjpegftools, openjpeg, qt3, schroedinger, speex, transcode, toolame, videotrans, x264, xvidcore CWD=`pwd` TMP=${TMP:-/tmp/txz} NAME=qdvdauthor PKG=$TMP/package VERSION=2.1.0 ARCH=${ARCH:-i486} BUILD=1sl SOURCE=http://downloads.sourceforge.net/project/qdvdauthor/qdvdauthor/$VERSION/$NAME-$VERSION.tar.gz if [ ! -e $NAME-$VERSION.tar.gz ]; then wget -c $SOURCE fi SOURCE=http://qdvdauthor.sourceforge.net/data/masks.tar.bz2 if [ ! -e masks.tar.bz2 ]; then wget -c $SOURCE fi SOURCE=http://qdvdauthor.sourceforge.net/data/buttons.tar.bz2 if [ ! -e buttons.tar.bz2 ]; then wget -c $SOURCE fi SOURCE=http://qdvdauthor.sourceforge.net/data/alpha_trans.tar.bz2 if [ ! -e alpha_trans.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 xzvf $CWD/$NAME-$VERSION.tar.gz echo -e "\E[0;32m+---------------------------------+\E[0;0m" echo -e "\E[0;32m| Start SlackBuild Q' DVD-Author |\E[0;0m" echo -e "\E[0;32m+---------------------------------+\E[0;0m" cd $NAME-$VERSION find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 600 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; find . -perm 400 -exec chmod 644 {} \; find . -perm 440 -exec chmod 644 {} \; find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; chown -R root:root . # Build 'Q' DVD-Author # Build and install: LDFLAGS="$SLKLDFLAGS" \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure --prefix=$PKG/usr --system-path=/usr --no-configurator --omit-local-ffmpeg || return 1 ./configure --no-configurator --install Install our slideshow stuff ( cd $PKG/usr/share/qdvdauthor tar xvjf $CWD/alpha_trans.tar.bz2 chown root:root $PKG/usr/share/qdvdauthor/transitions/ -R find $PKG/usr/share/qdvdauthor/transitions/ -type d -exec chmod 0755 {} \; find $PKG/usr/share/qdvdauthor/transitions/ -type f -exec chmod 0644 {} \; ) Install our buttons ( cd $PKG/usr/share/qdvdauthor tar xvjf $CWD/buttons.tar.bz2 chown root:root $PKG/usr/share/qdvdauthor/buttons/ -R find $PKG/usr/share/qdvdauthor/buttons/ -type d -exec chmod 0755 {} \; find $PKG/usr/share/qdvdauthor/buttons/ -type f -exec chmod 0644 {} \; ) Install our masks ( cd $PKG/usr/share/qdvdauthor tar xvjf $CWD/masks.tar.bz2 chown root:root $PKG/usr/share/qdvdauthor/masks/ -R find $PKG/usr/share/qdvdauthor/masks/ -type d -exec chmod 0755 {} \; find $PKG/usr/share/qdvdauthor/masks/ -type f -exec chmod 0644 {} \; ) ( 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/doc/$NAME-$VERSION/SlackBuild cp -a CHANGELOG COPYING INSTALL README TODO doc $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/SlackBuild/slack-desc cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/SlackBuild/$NAME.SlackBuild mkdir -p $PKG/usr/share/pixmaps cp qdvdauthor.png $PKG/usr/share/pixmaps mkdir -p $PKG/usr/share/applications cp qdvdauthor.desktop $PKG/usr/share/applications 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 &> /dev/null fi" >> $PKG/install/doinst.sh echo "" >> $PKG/install/doinst.sh cd $PKG ADD=$(ls /var/log/packages/ | sed -ne 's/\(MPlayer\)-\([^-]\+-[^-]\+-[^-]\+\)/\1 >= \2,/p' \ -e 's/\(cdrkit\)-\([^-]\+-[^-]\+-[^-]\+\)/\1 >= \2,/p' \ -e 's/\(dv2sub\)-\([^-]\+-[^-]\+-[^-]\+\)/\1 >= \2,/p' \ -e 's/\(dvd-slideshow\)-\([^-]\+-[^-]\+-[^-]\+\)/\1 >= \2,/p' \ -e 's/\(dvdauthor\)-\([^-]\+-[^-]\+-[^-]\+\)/\1 >= \2,/p' \ -e 's/\(dvdisaster\)-\([^-]\+-[^-]\+-[^-]\+\)/\1 >= \2,/p' \ -e 's/\(mctoolame\)-\([^-]\+-[^-]\+-[^-]\+\)/\1 >= \2,/p' \ -e 's/\(mjpegtools\)-\([^-]\+-[^-]\+-[^-]\+\)/\1 >= \2,/p' \ -e 's/\(toolame\)-\([^-]\+-[^-]\+-[^-]\+\)/\1 >= \2,/p' \ -e 's/\(transcode\)-\([^-]\+-[^-]\+-[^-]\+\)/\1 >= \2,/p' \ -e 's/\(videotrans\)-\([^-]\+-[^-]\+-[^-]\+\)/\1 >= \2/p') \ requiredbuilder -y -v -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.txz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi