The script: ------------------------------ #!/bin/sh # Set initial variables CWD=`pwd` if [ "$TMP" == "" ]; then TMP=/tmp fi VERSION=0.7.2 PKG_VERSION=$VERSION ARCH=i686 BUILD=${BUILD:-1_bbl} APP=rtorrent PKG=$TMP/package-$APP if [ "$ARCH" == "i686" ]; then SLKFLAGS="-O2 -march=i686 -mtune=i686" fi # Clean up old files rm -rf $PKG mkdir -p $TMP $PKG rm -rf $TMP/$APP-$VERSION # Go to /tmp, unpack sources, copy them cd $TMP || exit 1 tar -xf $CWD/$APP-$VERSION.tar.gz cd $APP-$VERSION || exit 1 chown -R root:root . chmod -R u+w,go+r,a-s . CFLAGS="$SLKFLAGS" \ ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ make || exit make install DESTDIR=$PKG || exit mkdir -p $PKG/usr/doc/$APP-$VERSION cp -a BUGS Changes FAQ INSTALL LICENCE MANIFEST README TODO docs/ $PKG/usr/doc/$APP-$VERSION find $PKG/usr/doc/$APP-$VERSION -type f -exec chmod 644 {} \; cat $CWD/$APP.SlackBuild > $PKG/usr/doc/$APP-$VERSION/$APP.SlackBuild ( 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 ) if [ -d $PKG/usr/man ]; then ( cd $PKG/usr/man find . -type f -exec gzip -9 {} \; for i in `find . -type l` ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done ) fi if [ -d $PKG/usr/info ]; then gzip -9 $PKG/usr/info/*.info rm -f $PKG/usr/info/dir fi # Prepare install directory mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package cd $PKG /sbin/makepkg -l y -c n $TMP/$APP-$PKG_VERSION-$ARCH-$BUILD.tgz ------------------------------ The error: checking for C++ compiler default output file name... a.out checking whether the C++ compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for style of include used by make... GNU checking dependency style of g++... gcc3 checking build system type... Invalid configuration `make': machine `make' not recognized configure: error: /bin/sh ./config.sub make failed