#!/bin/sh # Heavily based on the Slackware 11.0 SlackBuild # http://k9copy.free.fr # Modified by exeterdad - Vector Linux # Packager exeterdad - Vector Linux # Required: Hal, Dbus, Dbus-Qt3, LibDvDNav, LibDvDread # Required: DvDAuthor, LibDvDcss, Vamps, Mplayer. CWD=`pwd` TMP=${TMP:-/tmp/tgz} PKG=$TMP/package/k9copy NAME=k9copy VERSION=1.1.1.3 TARGET=i486 ARCH=i585 BUILD=1vl58 VL_PACKAGER=exeterdad if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi cd $TMP echo -e "\E[0;32m+--------------------------------------+\E[0;0m" echo -e "\E[0;32m| Unpacking $NAME-$VERSION to temp dir |\E[0;0m" echo -e "\E[0;32m+--------------------------------------+\E[0;0m" tar xvzf $CWD/$NAME-1.1.1-3.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-1.1.1-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 . ./configure --prefix=/opt/kde \ --disable-debug \ --program-prefix="" \ --program-suffix="" \ $TARGET-slackware-linux echo -e "\E[0;32m+-------------------------------+\E[0;0m" echo -e "\E[0;32m| Running Make Now |\E[0;0m" echo -e "\E[0;32m+-------------------------------+\E[0;0m" make echo -e "\E[0;32m+-------------------------------+\E[0;0m" echo -e "\E[0;32m| Intalling to temp dir |\E[0;0m" echo -e "\E[0;32m+-------------------------------+\E[0;0m" make install DESTDIR=$PKG mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \ $PKG/usr/doc/$NAME-$VERSION # included .desktop file only for kde users. Will make a more suitable one. mkdir -p $PKG/usr/share/applications cat >> $PKG/usr/share/applications/k9copy.desktop << "EOF" [Desktop Entry] Encoding=UTF-8 Type=Application Name=k9copy Exec=k9copy -caption "%c" %i %m %u Comment=DVD9 to DVD5 backup tool GenericName=Video DVD Backup Comment[fr]=Backup de DVD9 en DVD5 GenericName[fr]=Backup de DVD Video MimeTypes= Terminal=false Icon=/opt/kde/share/icons/hicolor/48x48/apps/k9copy.png DocPath=k9copy/index.html Categories=Qt;KDE;AudioVideo;DiscBurning; X-KDE-StartupNotify=true EOF # Don't need two .desktop files in menus rm -rf $PKG/opt/kde/share/applnk echo -e "\E[0;32m+-------------------------------+\E[0;0m" echo -e "\E[0;32m| Stripping Binaries |\E[0;0m" echo -e "\E[0;32m+-------------------------------+\E[0;0m" ( 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 ) # # append build information to the end of the slack-desc file # cat >> $CWD/slack-desc << EOF #---------------------------------------- BUILDDATE: `date` PACKAGER: $VL_PACKAGER HOST: `uname -srm` DISTRO: `cat /etc/vector-version` CFLAGS: $CFLAGS CONFIGURE: `awk "/\.\/configure\ /" $TMP/$NAME-1.1.1-3/config.log` EOF 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 echo -e "\E[0;32m+-------------------------------+\E[0;0m" echo -e "\E[0;32m| Making dependancies list |\E[0;0m" echo -e "\E[0;32m+-------------------------------+\E[0;0m" requiredbuilder -v -y -s $CWD $PKG echo -e "\E[0;32m+-------------------------------+\E[0;0m" echo -e "\E[0;32m| Making a Vector Linux Package |\E[0;0m" echo -e "\E[0;32m+-------------------------------+\E[0;0m" makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tlz if [ "$1" = "--cleanup" ]; then rm -rfv $TMP fi