#!/bin/sh CWD=`pwd` TMP=/tmp PKG=$TMP/package-cdrtools VERSION=2.01.01a46 VER=2.01.01 ZISOFSTOOLS=1.0.8 ARCH=alpha BUILD=1 TARGET=$ARCH-alphaslack-linux rm -rf $PKG mkdir -p $PKG/usr ( cd $TMP rm -rf cdrtools-$VER tar xjf $CWD/cdrtools-$VERSION.tar.bz2 cd cdrtools-$VER chown -R root.root . find . -perm 775 -exec chmod 755 {} \; find . -perm 664 -exec chmod 644 {} \; zcat $CWD/cdrtools.ins_base.diff.gz | patch -p1 --verbose || exit 1 make || exit 1 make install mkdir -p $PKG/usr/doc/cdrtools-$VERSION cp -a AN-* BUILD COMPILE COPYING INSTALL README* $PKG/usr/doc/cdrtools-$VERSION chown -R root.root $PKG/usr/doc/cdrtools-$VERSION/* find $PKG/usr/doc/cdrtools-$VERSION -type f -exec chmod 644 {} \; ( cd mkisofs mkdir -p $PKG/usr/doc/cdrtools-$VERSION/mkisofs cp -a COPYING ChangeLog README* TODO $PKG/usr/doc/cdrtools-$VERSION/mkisofs chown root.root $PKG/usr/doc/cdrtools-$VERSION/mkisofs/* chmod 644 $PKG/usr/doc/cdrtools-$VERSION/mkisofs/* ) ( cd cdda2wav mkdir -p $PKG/usr/doc/cdrtools-$VERSION/cdda2wav cp -a FAQ Frontends GPL HOWTOUSE NEEDED OtherProgs README THANKS TODO Changelog $PKG/usr/doc/cdrtools-$VERSION/cdda2wav chown root.root $PKG/usr/doc/cdrtools-$VERSION/cdda2wav/* chmod 644 $PKG/usr/doc/cdrtools-$VERSION/cdda2wav/* ) # These don't need to be in the package, IMHO. rm -rf $PKG/usr/lib $PKG/usr/include $PKG/usr/man/man5 $PKG/usr/man/man1/cdda2ogg.1 # Fix permissions: cd $PKG find . -type d -exec chmod 755 {} \; chown root.bin -R $PKG/usr/bin chown root.bin -R $PKG/usr/sbin chown root.root -R $PKG/usr/doc find $PKG/usr/man -type f -exec chmod 644 {} \; find $PKG/usr/man -type f -exec chown root.root {} \; find $PKG/usr/man -type f -exec gzip -9 {} \; ( cd $PKG/usr/bin ; ln -sf mkisofs mkhybrid ) # Next big hole? ;) rm -r $PKG/usr/sbin rm -f $PKG/usr/doc/cdrtools-$VERSION/README.rscsi # Add the mkzftree tool for zisofs: cd $TMP rm -rf zisofs-tools-$ZISOFSTOOLS tar xjf $CWD/zisofs-tools-$ZISOFSTOOLS.tar.bz2 cd zisofs-tools-$ZISOFSTOOLS chown -R root.root . find . -perm 775 -exec chmod 755 {} \; find . -perm 664 -exec chmod 644 {} \; ./configure \ --prefix=/usr \ --build=$TARGET make || exit 1 cat mkzftree > $PKG/usr/bin/mkzftree chown root.bin $PKG/usr/bin/mkzftree chmod 755 $PKG/usr/bin/mkzftree cat mkzftree.1 | gzip -9c > $PKG/usr/man/man1/mkzftree.1.gz mkdir -p $PKG/usr/doc/zisofs-tools-$ZISOFSTOOLS cp -a CHANGES COPYING INSTALL README zisofs.magic $PKG/usr/doc/zisofs-tools-$ZISOFSTOOLS ( cd $PKG/usr/share ; mv doc ../doc/cdrtools-$VERSION ) ( cd $PKG find . -type f | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . -type f | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/cdrtools-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/cdrtools.build.log