#!/bin/sh # All comments and suggestions to Alak Trakru # CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-unrar VERSION=3.2.2 ARCH=i386 BUILD=1 if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi rm -rf $PKG mkdir -p $PKG cd $TMP tar xzvf $CWD/unrarsrc-$VERSION.tar.gz cd unrar # cp makefile.unix Makefile CFLAGS="-O2 -march=i386 -mcpu=i686" make mkdir -p $PKG/usr/bin cp unrar $PKG/usr/bin mkdir -p $PKG/usr/doc/unrar-$VERSION cp -a license.txt readme.txt \ $PKG/usr/doc/unrar-$VERSION chmod 644 $PKG/usr/doc/unrar-$VERSION/* chown root.root $PKG/usr/doc/unrar-$VERSION/* find $PKG -type f | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded gzip -9 $PKG/usr/man/*/* mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/unrar-$VERSION-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/unrar rm -rf $PKG fi