diff options
author | dsomero <xgizzmo@slackbuilds.org> | 2011-05-01 10:29:11 -0400 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2011-05-03 09:08:23 -0500 |
commit | d657a00a5a02a93b007601a521873e01027f6e46 (patch) | |
tree | 758df35b2a2bcbd4caa084ae9d46bed02262a363 | |
parent | 4852b32b67c89974b9d516de8cce8126b3f11098 (diff) | |
download | slackbuilds-d657a00a5a02a93b007601a521873e01027f6e46.tar.gz |
network/ctorrent: ARCH fixes and cleanup.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
-rw-r--r-- | network/ctorrent/ctorrent.SlackBuild | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/network/ctorrent/ctorrent.SlackBuild b/network/ctorrent/ctorrent.SlackBuild index 87685d7704..18edf4e438 100644 --- a/network/ctorrent/ctorrent.SlackBuild +++ b/network/ctorrent/ctorrent.SlackBuild @@ -22,21 +22,25 @@ # ----------------------------------------------------------------------------- # Slightly modified by the SlackBuilds.org project -# Exit on most errors -set -e - -# Essential variables: PRGNAM=ctorrent VERSION=${VERSION:-3.3.2} -PKGVERSION=dnh${VERSION} -ARCH=${ARCH:-i486} BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +PKGVERSION=dnh${VERSION} + +iif [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi -TAG=${TAG:-_SBo} # the "_SBo" is required CWD=$(pwd) -TMP=${TMP:-/tmp/SBo} # For consistency's sake, use this -PKG=$TMP/package-$PRGNAM # We build stuff here -OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} DOCS="AUTHORS ChangeLog* COPYING NEWS README* UserGuide VERSION" @@ -51,7 +55,8 @@ elif [ "$ARCH" = "x86_64" ]; then LIBDIRSUFFIX="64" fi -# Prepare build environment: +set -e + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP @@ -77,20 +82,16 @@ CXXFLAGS="$SLKCFLAGS" \ make make install DESTDIR=$PKG -# Add documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$PKGVERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$PKGVERSION || true cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$PKGVERSION/$PRGNAM.SlackBuild -# Strip binaries find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -# Add the slack-desc: mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -# Assemble the package: cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$PKGVERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |