network/mldonkey: Updated for version 3.0.0

This commit is contained in:
Grissiom 2010-05-12 17:43:48 +02:00 committed by Robby Workman
parent 95f6209c05
commit 85e9068e57
6 changed files with 66 additions and 55 deletions

View File

@ -1,14 +1,14 @@
MLDonkey is an open source, free software multi-network
peer-to-peer application.
MLDonkey is an open source, free software multi-network peer-to-peer
application.
MLDonkey requires "ocaml" to be builded, and also requires
"lablgtk" if you want to enable its GUI. There's a SlackBuild
at SlackBuilds.org for each one.
MLDonkey requires "ocaml" to build and also requires "lablgtk2" if you
want to enable its GUI. It will try to download lablgtk2 and ocaml from
the web and build it locally if they are not found on your system, so
you'll want to have them installed already.
By default, this SlackBuild is going to build MLdonkey without
its GUI. If you want to enable MLDonkey's GUI, you'll have to
enable it with the GUIOPT variable, which can have 'oldgui',
'newgui1' or 'newgui2' as values. For example, if you want to
build mldonkey with "oldgui" then execute the build script
as follows:
GUIOPT=oldgui ./mldonkey.SlackBuild
By default, this SlackBuild is going to build MLdonkey without its GUI.
If you want to enable MLDonkey's GUI, you'll have to enable it with the
GUIOPT variable like this: GUIOPT=yes ./mldonkey.SlackBuild
Without a GUI, you can control mldonkey via connecting to localhost:4080
with your web browser.

View File

@ -1,10 +1,4 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
( if [ -x usr/bin/update-desktop-database ]; then
usr/bin/update-desktop-database -q usr/share/applications
fi
)
( if [ -x usr/bin/update-mime-database ]; then
usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
fi
)

View File

@ -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 .
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 {} \;
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
# 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

View File

@ -1,11 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Name=MLDonkey GUI
GenericName=MLDonkey GUI
Comment=The MLDonkey GUI
Exec=mldonkey_gui
Icon=mldonkey.png
Icon=mldonkey
Terminal=false
Type=Application
Categories=Qt;KDE;Network;
Categories=Network;

View File

@ -1,8 +1,8 @@
PRGNAM="mldonkey"
VERSION="2.9.4"
VERSION="3.0.0"
HOMEPAGE="http://mldonkey.sourceforge.net"
DOWNLOAD="http://downloads.sourceforge.net/mldonkey/mldonkey-2.9.4.tar.bz2"
MD5SUM="b3b5e0679f6d65c290bfb32f264b1de6"
MAINTAINER="Antonio Hernández Blas"
EMAIL="hba.nihilismus@gmail.com"
APPROVED="Michiel"
DOWNLOAD="http://downloads.sourceforge.net/mldonkey/mldonkey-3.0.0.tar.bz2"
MD5SUM="d45b37f334a4008ed15343dfb2caf453"
MAINTAINER="Grissiom"
EMAIL="chaos.proton@gmail.com"
APPROVED="rworkman"

View File

@ -9,7 +9,7 @@
mldonkey: MLDonkey (A multi-platform multi-network peer-to-peer client)
mldonkey:
mldonkey: MLDonkey is an open source, free software multi-network
mldonkey: peer-to-peer application.
mldonkey: peer-to-peer application.
mldonkey:
mldonkey: Homepage: http://mldonkey.sourceforge.net
mldonkey: