#!/bin/sh # Heavily based on the Slackware 11.0 SlackBuild # http://www.nero.com # Packager Andrea Sciucca ( gohanz at infinito.it) # http://www.slacky.it CWD=`pwd` TMP=${TMP:-/tmp/tgz} PKG=$TMP/package/nerolinux NAME=nerolinux VERSION=3.0.0.0-beta ARCH=${ARCH:-i686} BUILD=2as SOURCE=http://ftp7.de.nero.com/software/NeroLINUX/$NAME-$VERSION-x86.rpm if [ ! -e $NAME-$VERSION-x86.rpm ]; then wget -c $SOURCE fi if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi cd $TMP rpm2cpio $CWD/$NAME-$VERSION-x86.rpm | cpio -i --make-directories 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" cp -a -r usr $PKG mkdir -p $PKG/usr/share/pixmaps cp -a $CWD/nero.jpg $PKG/usr/share/pixmaps cat << EOF > $PKG/usr/share/applications/$NAME.desktop [Desktop Entry] Type=Application Encoding=UTF-8 Name=NeroLinux GenericName=Cd Burning Exec=nero Icon=/usr/share/pixmaps/nero.jpg Categories=Application;AudioVideo Terminal=false Type=Application EOF mkdir -p $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 ( cd $PKG/usr/share/doc/nero cp -a * $PKG/usr/doc/$NAME-$VERSION rm -r $PKG/usr/share/doc ) ( 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 ) cd $PKG find . -perm 700 -exec chmod 755 {} \; requiredbuilder -y -v -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-3.0.0.0_beta-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi