#!/bin/sh # Copyright Loris Vincenzi (http://www.slacky.eu) # All rights reserved. # # Heavily based on the Slackware 12.2 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. CWD=`pwd` TMP=${TMP:-/tmp/tgz} PKG=$TMP/package NAME=qdvdauthor VERSION=1.11.0 ARCH=${ARCH:-i486} BUILD=1sl if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" fi cd $TMP tar xzvf $CWD/$NAME-$VERSION.tar.gz cd $NAME-$VERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . CFLAGS="$SLKCFLAGS" \ ./configure qmake make cd qdvdauthor/plugins ./make.sh cd - # We need to do manual installs of these: mkdir -p $PKG/usr/bin cd bin cp configurator dvd-slideshow qdvdauthor qplayer qslideshow $PKG/usr/bin cd - mkdir -p $PKG/usr/share/qdvdauthor cp qdvdauthor/i18n/*.qm $PKG/usr/share/qdvdauthor # qdvdauthor specific stuff: mkdir -p $PKG/usr/share/qdvdauthor/html/en cp doc/html/en/audio_streams.html $PKG/usr/share/qdvdauthor/html/en/ cp doc/html/en/system_register.html $PKG/usr/share/qdvdauthor/html/en/ cp silence.mp2 $PKG/usr/share/qdvdauthor/ cp silence.ac3 $PKG/usr/share/qdvdauthor/ mkdir -p $PKG/usr/share/qdvdauthor/plugins/menuslide/backround cp qdvdauthor/plugins/menuslide/background00000.jpg $PKG/usr/share/qdvdauthor/plugins/menuslide/backround/ # make the addons (these are for reading exif data # not sure why the author doesnt use libexif or the like) # I'm going to spam / now :( cd addons ./make.sh install 2>&1 |tee $CWD/build-logs/make-qdvdauthor-addons.log cd - # since above spams our / well mv them to our PKG dir REAL=${REAL:-/usr/share/qdvdauthor/lib} mkdir -p $PKG/usr/share/qdvdauthor/lib mv ${REAL}/libjhead.so $PKG/usr/share/qdvdauthor/lib/ mv ${REAL}/libjhead.so.1 $PKG/usr/share/qdvdauthor/lib/ mv ${REAL}/libjhead.so.1.0 $PKG/usr/share/qdvdauthor/lib/ mv ${REAL}/libjhead.so.1.0.0 $PKG/usr/share/qdvdauthor/lib/ rm /usr/share/qdvdauthor/ -rf # Address plugins: cp qdvdauthor/plugins/plugins/* $PKG/usr/share/qdvdauthor/plugins/ mkdir -p $PKG/usr/share/qdvdauthor/plugins/simpledvd cp qdvdauthor/plugins/simpledvd/background.jpg $PKG/usr/share/qdvdauthor/plugins/simpledvd/ cp qdvdauthor/plugins/simpledvd/main.png $PKG/usr/share/qdvdauthor/plugins/simpledvd/ cp qdvdauthor/plugins/simpledvd/prev.png $PKG/usr/share/qdvdauthor/plugins/simpledvd/ cp qdvdauthor/plugins/simpledvd/next.png $PKG/usr/share/qdvdauthor/plugins/simpledvd/ mkdir -p $PKG/usr/share/qdvdauthor/plugins/complexdvd cp qdvdauthor/plugins/complexdvd/background.jpg $PKG/usr/share/qdvdauthor/plugins/complexdvd/ cp qdvdauthor/plugins/complexdvd/main.png $PKG/usr/share/qdvdauthor/plugins/complexdvd/ cp qdvdauthor/plugins/complexdvd/prev.png $PKG/usr/share/qdvdauthor/plugins/complexdvd/ # Install our buttons: cd $PKG/usr/share/qdvdauthor tar -xf $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 slideshow stuff ( don't know really where the right spot is, they don't specify this) tar -xf $CWD/alpha_trans.tar.bz2 chown root:root $PKG/usr/share/qdvdauthor/slideshow/ -R find $PKG/usr/share/qdvdauthor/buttons/ -type d -exec chmod 0755 {} \; find $PKG/usr/share/qdvdauthor/buttons/ -type f -exec chmod 0644 {} \; cd - mkdir -p $PKG/usr/doc/$NAME-$VERSION/SlackBuild cp -a CHANGELOG COPYING INSTALL README TODO doc $PKG/usr/doc/$NAME-$VERSION 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 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 cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null requiredbuilder -v -y -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi