n/ctorrent: Updated for Slackware-13.0.

slackware-14.2
Damien Goutte-Gattat 13 years ago
parent b55bef036f
commit faaaa833c4
  1. 21
      n/ctorrent/ctorrent.SlackBuild

@ -35,15 +35,16 @@ ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-http://ovh.dl.sourceforge.net/sourceforge/dtorrent/$ARCHIVE}
# Built package infos
NAMETGZ=${NAMETGZ:-ctorrent}
BUILD=${BUILD:-1GGD}
NAMEPKG=${NAMEPKG:-ctorrent}
BUILD=${BUILD:-2GGD}
ARCH=${ARCH:-i486}
TARGET=${TARGET:-i486}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMETGZ}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
@ -63,6 +64,9 @@ case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
;;
*)
CPUOPT="-O2"
;;
@ -70,7 +74,8 @@ esac
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget "$WGET"
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha1sum -c $ARCHIVE.sha1
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
@ -83,11 +88,11 @@ cd $NAME
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure --prefix=/usr
make -j 3
make -j $JOBS
make install DESTDIR=$PKG
# Strip binaries
find $PKG | xargs file | grep "ELF 32-bit LSB" | cut -d : -f 1 | \
find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \
xargs strip --strip-unneeded 2> /dev/null
# Install the documentation
@ -104,7 +109,7 @@ cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMETGZ-$VERSION-$ARCH-$BUILD.tgz
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"

Loading…
Cancel
Save