summaryrefslogtreecommitdiffstats
path: root/deps/libktorrent/libktorrent.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xdeps/libktorrent/libktorrent.SlackBuild (renamed from kde/kwebkitpart/kwebkitpart.SlackBuild)57
1 files changed, 34 insertions, 23 deletions
diff --git a/kde/kwebkitpart/kwebkitpart.SlackBuild b/deps/libktorrent/libktorrent.SlackBuild
index 31c64b3..6354521 100755
--- a/kde/kwebkitpart/kwebkitpart.SlackBuild
+++ b/deps/libktorrent/libktorrent.SlackBuild
@@ -1,9 +1,8 @@
#!/bin/sh
-# Copyright 2010 Eric Hameleers, Eindhoven, The Netherlands
-# Copyright 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2009, 2011 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
-
+#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
@@ -22,35 +21,45 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PKGNAM=kwebkitpart
+PKGNAM=libktorrent
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
+NUMJOBS=${NUMJOBS:--j6}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-# Set the config option variables if they are not already set:
-if [ -r ../KDE.options ]; then
- . ../KDE.options
-fi
-
-# The global options may be overridden here (if needed):
-if [ -r ./local.options ]; then
- . ./local.options
-fi
-
-# Avoid a version number in .la files:
-if [ -d /usr/lib${LIBDIRSUFFIX}/qt ]; then
- QTDIR=/usr/lib${LIBDIRSUFFIX}/qt
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
-echo "Building $PKGNAM-$VERSION..."
-tar xvf $CWD/../src/extragear/$PKGNAM-$VERSION.tar.?z* || exit 1
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
cd $PKGNAM-$VERSION || exit 1
-
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -63,9 +72,12 @@ cd build
QTDIR=/usr/lib${LIBDIRSUFFIX}/qt \
PATH=$QTDIR/bin:$PATH \
cmake \
+ $KDE_OPT_ARGS \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
+ -DMAN_INSTALL_DIR=/usr/man \
+ -DSYSCONF_INSTALL_DIR=/etc \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
..
make $NUMJOBS || make || exit 1
@@ -76,13 +88,12 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
-cp -a \
- COPYING.LIB README TODO \
+cp -a AUTHORS* COPYING* ChangeLog README* \
$PKG/usr/doc/$PKGNAM-$VERSION
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz