diff options
Diffstat (limited to 'network/rtorrent/rtorrent.SlackBuild')
-rw-r--r-- | network/rtorrent/rtorrent.SlackBuild | 73 |
1 files changed, 34 insertions, 39 deletions
diff --git a/network/rtorrent/rtorrent.SlackBuild b/network/rtorrent/rtorrent.SlackBuild index 27560bd1a4..b0a836f118 100644 --- a/network/rtorrent/rtorrent.SlackBuild +++ b/network/rtorrent/rtorrent.SlackBuild @@ -1,37 +1,38 @@ #!/bin/sh # Slackware build script for rtorrent -# Written by Tom Fitzhenry <tom@fitzhenry.name> 2007/08/22 -# -# Updated by Andrew Brouwers, abrouwers@gmail.com +# Written by Brian Kysela <brian.kysela@gmail.com> 2009-11-04 -APP=rtorrent -VERSION=0.8.0 +PRGNAM=rtorrent +VERSION=0.8.5 ARCH=${ARCH:-i486} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} CWD=$(pwd) TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$APP +PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -DOCS="AUTHORS COPYING INSTALL README TODO doc/rtorrent.rc" - if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" fi +set -e + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -rm -rf $TMP/$APP-$VERSION -cd $TMP || exit 1 -tar xvf $CWD/$APP-$VERSION.tar.gz || exit 1 -cd $APP-$VERSION || exit 1 +rm -rf $TMP/$PRGNAM-$VERSION +cd $TMP +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . @@ -39,35 +40,29 @@ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --localstatedir=/var \ - --mandir=/usr/man + --mandir=/usr/man \ + --build=$ARCH-slackware-linux -make || exit 1 -make install DESTDIR=$PKG || exit 1 +make +make install DESTDIR=$PKG -mkdir -p $PKG/usr/doc/$APP-$VERSION -cp -a $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 +gzip -9 $PKG/usr/man/man?/*.? -mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -( 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 -) +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + AUTHORS COPYING INSTALL NEWS README TODO \ + $PKG/usr/doc/$PRGNAM-$VERSION +find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \; +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM-SlackBuild -# Compress man pages if they exist -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 +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$APP-$VERSION-$ARCH-$BUILD$TAG.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |