aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/p2p/mldonkey/Manifest24
-rwxr-xr-xnet/p2p/mldonkey/mldonkey.SlackBuild82
-rw-r--r--net/p2p/mldonkey/slack-required1
3 files changed, 100 insertions, 7 deletions
diff --git a/net/p2p/mldonkey/Manifest b/net/p2p/mldonkey/Manifest
new file mode 100644
index 00000000..af059bc2
--- /dev/null
+++ b/net/p2p/mldonkey/Manifest
@@ -0,0 +1,24 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+DIST mldonkey-3.0.0.tar.bz2 2723830 MD5 d45b37f334a4008ed15343dfb2caf453 RMD160 c53efda6b513bbfd2dcd71804600b0906252e463 SHA1 8d3f1808578bb145655050c0224f512afe0266b5 SHA256 27235f1e3aeae7ddb392b2d9b0963d464f21539bcb15c85c576876b8ac63fb7f SHA512 93d8c21508f2a2340503d0c4b68acbf7d85316bc48d25f9c4da05d14480321288b3b260cb3eaf9416dbd699162f03239636f7b961430b9ece710378ea800a860
+MKBUILD mldonkey.mkbuild 4148 MD5 c3cf4f9ad95ca62dc543353c3f97b4a4 RMD160 dece0fcbc216aec9c9304b0beff97039421d3010 SHA1 2099621298c4413ea25aea392ac334bd2552c816 SHA256 3cfc8053e2455a65eb42625fb845391757a309b1d09d25a51b56481aae9a62e1 SHA512 d3d446c8c5620eca22401cc5e2357280191631a08605b3bb1cbed0c90a522b0faff10017f56396dfd8ebe88514b78d27097cedcb4aa232f88543ed6a08cb4ada
+SLACK-REQUIRED slack-required 112 MD5 9c48ff97a410927bb700607b6b3301e9 RMD160 f4cc818415a4bb35b56ac5180b7f431317e4e821 SHA1 9b6f67dda7adf86e109502fba8a5d56b313de483 SHA256 9dd006e4480d0eeb7e65e02d268fef501e4ee62493f6e26449a9650831055af5 SHA512 db4bc5edd07b65305c48f554028398fa5945513f77921fb65d58be034e6ef5d58628f18bd53e008b8f9d50e7ef99a523d953c99fa51b144bee9af97615253142
+SLACKBUILD mldonkey.SlackBuild 7139 MD5 c0832158bd3323de8e4c7bc6d219b4a9 RMD160 e35e9a58e51eff76d32997b43d63a5dd6a515763 SHA1 06fc4ea518150e5e605d82103b7385088ad2aa13 SHA256 e051a8efe4d2589d066d586f348afe6be880c57fcf19700e71893306a49fde06 SHA512 95a1ce4771aff948e7a984e9de69a320984396b82ed707d87a9799e32d029178a3e3247253e4497f2844c5c444cbefe43dd98ab063266f9df5c0f4aedad1bd7e
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBAgAGBQJJyFHDAAoJEEHL93ESzgeiN6oP/1aHAyiBUo17Cn1gWW7aQ6rg
+1WmdIUhm8qGXtuigMKLby/JW1/j3TtuLIJjrjILckLEla0iK7PnnMpXOLfgJvupM
+RViwnwMK/4pVMmbhCyUs3mTvYjD40NK87OIKb7IAf0tx0InCy2GFyUUB3rfPFt+H
+QWWp/c7ehM/hx+tmIq6xZnj9k364ujwe/qVbDyUhueEm0TqrMIxaUt0OdxOUmGx5
+Ga2vIp4izmCPOEMwHdF90spHGDf2NI9jHYj67m9m9OOJErftTKn5T8LTRXEK6mDB
+qPp2AHkBow4UVFEtHIYtC364rRbSpKgFsiJZgidX311FfzAzG70Tv5/zicBr9ysh
+vGQclIA1VOCJmgWJVDKVUk+soKXFEQvL/vmeqa+NoLVX6R9pxyl3dPFl/NkdM/C0
+ck96o1MfDJU9uI9ps/nCyOWmG6mYH2WyAOacdXVo1ClLDjAu0m/K9jaGKbzc2gck
+LuXffm7djkpPKjN5VWDAk/6c1O/ajv5MtkKY7iKm/qPxEKrLSamDpYAPLqyz3d2x
+9l1eBzUFYWeZM2GepWIICjNUKlyEc5TFDWqUwcA9Ia8+CMNqiJsXQqYC2lwkX1PY
+nhAsS2ao28kkXuRcxXQdSpjlbsdYxA8cAlLBfmoQpqUn9eP6a2dEmEZin1VaxyPa
+QyFPizQq1zIC7JE5p5XA
+=Pn6W
+-----END PGP SIGNATURE-----
diff --git a/net/p2p/mldonkey/mldonkey.SlackBuild b/net/p2p/mldonkey/mldonkey.SlackBuild
index e3b5c7e8..63b63fe2 100755
--- a/net/p2p/mldonkey/mldonkey.SlackBuild
+++ b/net/p2p/mldonkey/mldonkey.SlackBuild
@@ -15,8 +15,9 @@
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
#
# slackbuild for mldonkey, by Alexandre Vieira de Souza
-# requires: librsvg gd ocaml lablgtk
-# tested: mldonkey-2.9.2
+# requires:
+# tested: mldonkey-3.0.0
+# model: generic.mkSlackBuild $Rev: 796 $
#
# Look for slackbuildrc
@@ -31,13 +32,14 @@ CWD="$(pwd)"
SRC_NAME="mldonkey"
PKG_NAME="mldonkey"
ARCH=${ARCH:=i486}
-SRC_VERSION=${VERSION:=2.9.2}
+SRC_VERSION=${VERSION:=3.0.0}
PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1avs}
SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
+SLACKBUILD_PATH=${SLACKBUILD_PATH:="net/p2p/mldonkey"}
PREFIX=${PREFIX:=/usr}
PKG_WORK="$TMP/$SRC_NAME"
CONF_OPTIONS=${CONF_OPTIONS:=""}
@@ -47,9 +49,9 @@ NUMJOBS=${NUMJOBS:="-j4"}
LIBDIR="$PREFIX/lib"
if [ "$ARCH" = "i386" ]; then
- SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i386 -mtune=i686"
elif [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686"
elif [ "$ARCH" = "s390" ]; then
@@ -65,6 +67,7 @@ ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
+ERROR_MANIFEST=43;
# Clean up any leftovers of previous builds
rm -rf "$PKG_WORK" 2> /dev/null
@@ -84,6 +87,72 @@ if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -t "$SRC_DIR/$SRC" 2> /dev/null; then
wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
+# Check Manifest file
+if [ -e "$CWD/Manifest" ]; then
+
+ # Manifest signature checking
+ if grep -q -- "-----BEGIN PGP SIGNED MESSAGE-----" $CWD/Manifest; then
+ echo "Checking Manifest signature..."
+ gpg --verify $CWD/Manifest
+ if [ "$?" != "0" ]; then
+ exit $ERROR_MANIFEST
+ fi
+ fi
+
+ MANIFEST_LINES="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | wc -l`"
+
+ for ((MANIFEST_COUNT=1; MANIFEST_COUNT <= $MANIFEST_LINES; MANIFEST_COUNT++)); do
+
+ MANIFEST_LINE="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | head -n $MANIFEST_COUNT | tail -n 1`"
+ MANIFEST_FILE="`echo $MANIFEST_LINE | awk '{ print $2 }'`"
+ MANIFEST_FILE_TYPE="`echo $MANIFEST_LINE | awk '{ print $1 }'`"
+
+ if [ -e "$SRC_DIR/$MANIFEST_FILE" ]; then
+ MANIFEST_FILE="$SRC_DIR/$MANIFEST_FILE"
+ else
+ MANIFEST_FILE="`find $CWD -name $MANIFEST_FILE`"
+ fi
+
+ if [ ! -e "$MANIFEST_FILE" ] || [ -d "$MANIFEST_FILE" ]; then
+ continue
+ fi
+
+ echo "Checking Manifest for $MANIFEST_FILE_TYPE $MANIFEST_FILE integrity..."
+
+ SIZE_SRC="`wc -c $MANIFEST_FILE | awk '{ print $1 }'`"
+ SIZE_MANIFEST="`echo $MANIFEST_LINE | awk '{ print $3 }'`"
+
+ # Check source code size
+ if [ "$SIZE_SRC" != "$SIZE_MANIFEST" ]; then
+ echo "SIZE Manifest: $SIZE_MANIFEST; SIZE $SRC: $SIZE_SRC"
+ exit $ERROR_MANIFEST
+ else
+ echo "Size match."
+ fi
+
+ # Check source code integrity
+ for ALGO in md5 rmd160 sha1 sha256 sha512; do
+ if [ $ALGO = "rmd160" ]; then
+ ALGO_SRC="`openssl rmd160 $MANIFEST_FILE | awk '{ print $2 }'`"
+ else
+ ALGO_SRC="`"$ALGO"sum $MANIFEST_FILE | awk '{ print $1 }'`"
+ fi
+ ALGO="`echo $ALGO | tr '[:lower:]' '[:upper:]'`"
+ ALGO_MANIFEST=$(echo $MANIFEST_LINE | sed "s/.* $ALGO //" | awk '{ print $1 }')
+ if [ "$ALGO_SRC" != "$ALGO_MANIFEST" ]; then
+ echo "$ALGO Manifest: $ALGO_MANIFEST; $ALGO $SRC: $ALGO_SRC"
+ exit $ERROR_MANIFEST
+ else
+ echo "$ALGO match."
+ fi
+ done
+
+ done
+
+else
+ exit $ERROR_MANIFEST
+fi
+
# Untar
cd "$PKG_WORK"
tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
@@ -151,7 +220,8 @@ fi
# Build the package
cd "$PKG"
-makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+mkdir -p $REPOS/$SLACKBUILD_PATH
+makepkg -l y -c n "$REPOS/$SLACKBUILD_PATH/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
# Delete source and build directories if requested
if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then
diff --git a/net/p2p/mldonkey/slack-required b/net/p2p/mldonkey/slack-required
index ecea8d3a..c637a583 100644
--- a/net/p2p/mldonkey/slack-required
+++ b/net/p2p/mldonkey/slack-required
@@ -4,4 +4,3 @@
librsvg >= 2.4.0
gd >= 2.0.28
ocaml
-lablgtk