aboutsummaryrefslogtreecommitdiff
path: root/dev/lang
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-03-24 03:16:23 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-03-24 03:16:23 +0000
commitde6fc8d3cd1074e89cbcf4a3b5a0d0aa2d1f3d3c (patch)
tree046d72a6b1f58cb45e5bf05316e7367f33183319 /dev/lang
parentb813afbbb6725ce0c52633b292a4b51f2072ca61 (diff)
downloadslackbuilds-de6fc8d3cd1074e89cbcf4a3b5a0d0aa2d1f3d3c.tar.gz
slackbuilds-de6fc8d3cd1074e89cbcf4a3b5a0d0aa2d1f3d3c.tar.bz2
mldonkey: updating to 3.0.0
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2123 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'dev/lang')
-rw-r--r--dev/lang/ocaml/Manifest23
-rwxr-xr-xdev/lang/ocaml/ocaml.SlackBuild95
2 files changed, 106 insertions, 12 deletions
diff --git a/dev/lang/ocaml/Manifest b/dev/lang/ocaml/Manifest
new file mode 100644
index 00000000..30de06d3
--- /dev/null
+++ b/dev/lang/ocaml/Manifest
@@ -0,0 +1,23 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+DIST ocaml-3.10.0.tar.bz2 2786012 MD5 5b14fe7ef863ab8295c9b7d428d5e93c RMD160 19615743230f0215135eb966f1f08a6a828f9aa4 SHA1 5c7ee7dd5ac55bee2877ca0ace5ffb044df8efb5 SHA256 0d1d84e6ecdf3467fbb2143d773816ddaf9d74f8053007c53c1a9d1d59e815c6 SHA512 ce808e73b316a9bd43264ae1f62ef6545d7f907bd23bf63c5dcc09c0f81efc18ccc95c6ab1f2abdc3c9d7898e1475b997c365331a4dd4843e84a716b00a94867
+MKBUILD ocaml.mkbuild 2673 MD5 df09716156e96dd045bd49b1b4875824 RMD160 da9bf8afae92c882f49bac7799a41539ef015c6c SHA1 e66c2f09c1698b261e87612c01695bae7643f71d SHA256 73b157209f1b60bcbff48f6e7102eb063e05f23ba5d199af5826d1542248ff6c SHA512 0fcf919aada01bd7dd4d5e8f0ad0d3d933d81ed1679903916dbcd6119f4c31f7d9ce10ec8a3fe2a3f6c2a8a46ef1b188e5348424b4d31e463ed76533d6c5e23b
+SLACKBUILD ocaml.SlackBuild 7068 MD5 386ae12042276a8317800ff8dc4d9038 RMD160 017159ca02c1e56784b4c941dcde5f88fd0bfc83 SHA1 fa0ca3c9cb8c3c17b15482f60657d873778de4c3 SHA256 e7ddfb47dd3f592fb9e1a8b151319a3f57d0d3844563696c7cd1ed3012d2790a SHA512 af58b56775e305df790112c7545a7c284090722b782e2103920cae962d5adc03ecde38059313434adccd7c408e49e938f7deb9f3d98bb2953ef16e2224604bc1
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBAgAGBQJJyEr9AAoJEEHL93ESzgeiJDMP/jFQk3to1nDQ/+OBY1X2ym/E
+Y0NTohfqXQgOoezXJPsJuAY1QEaE/GYGnVdBDmN4kGVTGYAXRC5AdhzrwYiG1F3r
+TfvS+sR2oGbe/GyksynQ1g7jVTsBMEkdD3l8+zFwEH3N9yjp/UD7LIgBQjKO0t9E
+C9ZHPa1b8mTqS+hw2QPZVT8oceFYRVWd0NoHuOanUvwCuBlPqIxsMgnTNfdndpQg
+myjX49osfNbUpK4Wdh1BmxEF3qoxoq2S969eudSzEpH3uH/OU9fYhVzsvn8GH7rT
+wxqiNZ0EXETr2AqOOYf7o9HdCek7JygdKFn8XNWV/xUJSwgnQNedhLhQOxgt6qJC
+roCwlrBhV69GY0bi7lKAK5vrLLPp1uUARNR2QfYbepcdx4w5tSUeA7gFYnGP//V2
+okzT45fuoPvBi5qGaQ2yi4W2zh6UqXSGIFTTlQ5nIfZgDNapM2upczxINWc9kryz
+Dp5ATvaBIVzeaxX8RMRkDRV9zDu0pMtBH6mk58FSwKhoI+aFIx3bTKDFYcwp1tUW
+9jRROpxIvHF4cik9p35z7q4vzXMFy5Mdof0UYeucNPb8bGaiNi0SigQHORSO1WmK
+4yk53eTU2Hhq8X3JoxHVBqXJiA+5pdK/sqNpGl3sTyy35BqIpzwenBnp4J+GB2DE
+qLHUwMaaaP/w1bSeyKAx
+=ldCQ
+-----END PGP SIGNATURE-----
diff --git a/dev/lang/ocaml/ocaml.SlackBuild b/dev/lang/ocaml/ocaml.SlackBuild
index e0a27682..f151c7bd 100755
--- a/dev/lang/ocaml/ocaml.SlackBuild
+++ b/dev/lang/ocaml/ocaml.SlackBuild
@@ -10,13 +10,14 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place - Suite 330, Boston, MA 02111-1307, USA
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
#
# slackbuild for ocaml, by Alexandre Vieira de Souza
# requires:
# tested: ocaml-3.10.0
+# model: generic.mkSlackBuild $Rev: 796 $
#
# Look for slackbuildrc
@@ -38,6 +39,7 @@ SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
+SLACKBUILD_PATH=${SLACKBUILD_PATH:="dev/lang/ocaml"}
PREFIX=${PREFIX:=/usr}
PKG_WORK="$TMP/$SRC_NAME"
CONF_OPTIONS=${CONF_OPTIONS:=""}
@@ -47,16 +49,17 @@ NUMJOBS=${NUMJOBS:=""}
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
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2"
+ SLKCFLAGS="-O2 -fPIC"
LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
fi
# Set error codes (used by createpkg)
@@ -64,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
@@ -83,10 +87,76 @@ 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
-PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $8 }'`"
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
cd "$PKG_SRC"
# Configure
@@ -109,7 +179,7 @@ make install PREFIX="$PKG/$PREFIX" LIBDIR="$PKG/$LIBDIR" || exit $ERROR_INSTALL
)
# Install documentation
-DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING readme.*"
+DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*"
mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
for doc in $DOCS; do
if [ -f "$doc" ]; then
@@ -121,9 +191,9 @@ done
mkdir -p "$PKG/install" || exit $ERROR_MKDIR
cat << EODESC > "$PKG/install/slack-desc"
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
+# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
@@ -143,9 +213,10 @@ EODESC
# 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" ]; then
+if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then
rm -rf "$PKG_WORK" "$PKG"
fi