summaryrefslogtreecommitdiff
path: root/network/mldonkey/mldonkey.SlackBuild
diff options
context:
space:
mode:
authorGrissiom <chaos.proton@gmail.com>2010-05-12 17:43:48 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-12 17:43:48 +0200
commit85e9068e57285c43fcf8d166c56b4926287ecc73 (patch)
tree1d33fce44bda3b2ba666eb5e31459f193a822dfc /network/mldonkey/mldonkey.SlackBuild
parent95f6209c0503d0788519d550681fc69ea13a9d60 (diff)
downloadslackbuilds-85e9068e57285c43fcf8d166c56b4926287ecc73.tar.gz
network/mldonkey: Updated for version 3.0.0
Diffstat (limited to 'network/mldonkey/mldonkey.SlackBuild')
-rw-r--r--network/mldonkey/mldonkey.SlackBuild67
1 files changed, 43 insertions, 24 deletions
diff --git a/network/mldonkey/mldonkey.SlackBuild b/network/mldonkey/mldonkey.SlackBuild
index 62d491384d..18c482b105 100644
--- a/network/mldonkey/mldonkey.SlackBuild
+++ b/network/mldonkey/mldonkey.SlackBuild
@@ -2,7 +2,11 @@
# Slackware build script for mldonkey
-# Copyright (c) 2008, Antonio Hernández Blas <hba.nihilismus@gmail.com>
+# This script is originally written by Antonio Hernandez Blas and is
+# currently maintained by Grissiom.
+
+# Copyright (c) 2008, Antonio Hernandez Blas <hba.nihilismus@gmail.com>
+# Copyright (c) 2009, Grissiom <chaos.proton@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -21,74 +25,89 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-set -e
-
PRGNAM=mldonkey
-VERSION=2.9.4
+VERSION=3.0.0
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+GUIOPT=${GUIOPT:-no}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -jxvf $CWD/$PRGNAM-$VERSION.tar.bz2
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
-
-if [ -n "$GUIOPT" ]; then
- if [ "$GUIOPT" = 'oldgui' ]; then
- GUIOPT='--enable-gui=oldgui'
- elif [ "$GUIOPT" = 'newgui1' ]; then
- GUIOPT='--enable-gui=newgui1'
- elif [ "$GUIOPT" = 'newgui2' ]; then
- GUIOPT='--enable-gui=newgui2'
- else
- unset -v GUIOPT
- fi
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# OCaml 3.10/3.11 don't work with gtk1, so ingnore the gtk1 choses and let
+# configure to choose a proper lib.
+if [ "$GUIOPT" = 'yes' ]; then
+ GUIOPT='--enable-gui'
+else
+ GUIOPT='--disable-gui'
fi
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --enable-batch \
+ --build=$ARCH-slackware-linux \
$GUIOPT
make
make install DESTDIR=$PKG
( 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
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
)
-if [ -n "$GUIOPT" ]; then
+if [ "$GUIOPT" = 'yes' ]; then
mkdir -p $PKG/usr/share/{applications,pixmaps}
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
fi
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a distrib/*.txt docs $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ distrib/*.txt docs ChangeLog \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
-if [ -n "$GUIOPT" ]; then
- cat $CWD/doinst.sh > $PKG/install/doinst.sh
-fi
+[ "$GUIOPT" = "yes" ] && cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz