summaryrefslogtreecommitdiffstats
path: root/network/mldonkey/mldonkey.SlackBuild
diff options
context:
space:
mode:
author core2010-05-11 20:01:38 +0200
committer Robby Workman2010-05-11 20:01:38 +0200
commitf0b25c44065a37762a0b3211d44f5d4c9b9a35ca (patch)
treeffd2ac8a8f742d118aa45340bbfee4ef94441dff /network/mldonkey/mldonkey.SlackBuild
parent242de53c147f4fe93881e1258eef9beb243b0d5a (diff)
downloadslackbuilds-f0b25c44065a37762a0b3211d44f5d4c9b9a35ca.tar.gz
network/mldonkey: Added to 12.0 repository
Diffstat (limited to 'network/mldonkey/mldonkey.SlackBuild')
-rw-r--r--network/mldonkey/mldonkey.SlackBuild76
1 files changed, 76 insertions, 0 deletions
diff --git a/network/mldonkey/mldonkey.SlackBuild b/network/mldonkey/mldonkey.SlackBuild
new file mode 100644
index 0000000000..1b274c2043
--- /dev/null
+++ b/network/mldonkey/mldonkey.SlackBuild
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+# Slackware build script for mldonkey
+# Written by core (eroc@linuxmail.org)
+
+set -e
+
+PRGNAM=mldonkey
+VERSION=2.8.7
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar -jxvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+chown -R root:root . || true
+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
+fi
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ $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
+)
+
+if [ -n "$GUIOPT" ]; 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
+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
+
+cd $PKG
+/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz