aboutsummaryrefslogtreecommitdiff
path: root/dev/perl/perl-mime-base64
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-07-22 02:25:31 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-07-22 02:25:31 +0000
commit5491100afa473c45f96667ce6f89703d42e01503 (patch)
tree3341e9ea6b9672228ab1019b6b0cebbc97c142cd /dev/perl/perl-mime-base64
parent5158fb5c0ffc7fa2591d3ea639095816ca4f01fd (diff)
downloadslackbuilds-5491100afa473c45f96667ce6f89703d42e01503.tar.gz
slackbuilds-5491100afa473c45f96667ce6f89703d42e01503.tar.bz2
newsbeuter: adding newsbeuter; wyrd: adding wyrd; remind: adding remind; ddclient: adding ddclient; inadyn: adding inadyn
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2230 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'dev/perl/perl-mime-base64')
-rw-r--r--dev/perl/perl-mime-base64/Manifest23
-rwxr-xr-xdev/perl/perl-mime-base64/perl-mime-base64.SlackBuild78
2 files changed, 97 insertions, 4 deletions
diff --git a/dev/perl/perl-mime-base64/Manifest b/dev/perl/perl-mime-base64/Manifest
new file mode 100644
index 00000000..b2263347
--- /dev/null
+++ b/dev/perl/perl-mime-base64/Manifest
@@ -0,0 +1,23 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST MIME-Base64-3.08.tar.gz 16429 MD5 b898218bb588360b34d13c162299a17e RMD160 714f635ce3164eaf12e76ab1fe3abf99b7510dcb SHA1 5e292446b11ae68eb9809609abde67e53fb5fa15 SHA256 b13ec98c03b168ca28c9390727a9edcbe2c5d489ff2505a7eb20c5cc1c72410d SHA512 0c2fae9a3d7c1cb79ac21922c44a8302770bed498d8f9a46f669de9b2de19719c4e4b871561b0082346ca6acdaa97e4a94ce7196aeea01185a97bb1e1e7d1df8
+MKBUILD perl-mime-base64.mkbuild 2357 MD5 780066b21c6e81a7af90e6b311dd7f63 RMD160 4e510c76519e95be1e6ce872055e98b3acb2b8e0 SHA1 6a77cc8740d23e96c90f4bc8f9fa347019450de4 SHA256 5b4c5159482ce2850598e7064790c526a199cd6d188d14085987b7fa3751dac2 SHA512 f90c3c6ac229195f36da7f6318a18884e2cb054d2c5a30e356d2fe57900004cf70102452774cb717930e405e8e3990af3ced4eb338a8ec67a4fd11f80758f177
+SLACKBUILD perl-mime-base64.SlackBuild 7044 MD5 2032a2aa369fe4378e29924b3c463969 RMD160 2e8c839bdd2576b92afe0155208943638c68d6a6 SHA1 56ee60d64b936bcbe527e144743cc6d4083b196a SHA256 69a598ee34fd8fec253a8b1d3ac869f1cc259bdf31f15588e5062fdcbe97b870 SHA512 e43354cccb58b3acab5b0d9ed68b082404ebd14555242026be7fb661c524906e69209f2a218ba855a337e656eb065e3ca12c6c4b031895c20a8fdd2fae9696c9
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBCAAGBQJKY2HUAAoJEEHL93ESzgeiW6EQAIPd5ue32pfYdSGwUzz3FbXa
+13iuvQ0h0dVXDGCrSJcfMfcQZgSOqwBiNucDBdKtAdTYl3aITddQh5Qkk1xjNDvw
+1QIWmKypJiH//s5+kAyshh4LCU3DfAXqC62D6FgWNK2lhR8OOBi2i9G5IdyyxZDo
+/x51m24DpbQxXMiOV+2GEYqQnUCHE92Y6J2Jf+eJJ+ivu6EAvc7vk9Pkq5ie/e3E
+wfroNe56V9FAvdY/l0PJq9k4rlPmIZIq3MDgbtF6oO8mGjBvx4/3tIXR0hSH3igi
+Xzlz3AZiJQX9HBfh96mjqYGVw4aJbXGEDdz8+NF6FnEUyzk5gxx2RMyebBhGaFfk
+z+JDkVYpEVJ0ZkmvsP0MnXZutXWK41veZO1z76eLzYZE3lPxuNzqs0VM0SK02U1V
+ScC7WgR2LhAfRNc2IGoMHvkwisdDIrdBKka3mMUGIL9PbkJmyefTQql1wl9TU/F9
+8alaVbCB13aNAAHpi5ehF7UhrLM+Fmwsx0ixVlZk333VqKT4x9o7c+l6EIvSCaI7
+RPz6jUnn2n67NUb2PgbCALzO4gUmmfGBN7Hag6Szrn0Bos0rsH1vb/Q0OBFMqnrs
+ha7Vd2sPTpAAnmXTin6eY2YIA2YvqH19J70DnqKM2GND7efYte5Er2NTbYrdyr7o
+bLHEz8m1IYsNNWAm3wBp
+=ZHka
+-----END PGP SIGNATURE-----
diff --git a/dev/perl/perl-mime-base64/perl-mime-base64.SlackBuild b/dev/perl/perl-mime-base64/perl-mime-base64.SlackBuild
index bdee9c1c..6ba6d7bd 100755
--- a/dev/perl/perl-mime-base64/perl-mime-base64.SlackBuild
+++ b/dev/perl/perl-mime-base64/perl-mime-base64.SlackBuild
@@ -16,7 +16,8 @@
#
# slackbuild for perl-mime-base64, by Silvio Rhatto
# requires:
-# tested: perl-mime-base64-3.07
+# tested: perl-mime-base64-3.08
+# model: perl.mkSlackBuild $Rev: 796 $
#
# Look for slackbuildrc
@@ -31,13 +32,14 @@ CWD="$(pwd)"
SRC_NAME="MIME-Base64"
PKG_NAME="perl-mime-base64"
ARCH=${ARCH:=i486}
-SRC_VERSION=${VERSION:=3.07}
+SRC_VERSION=${VERSION:=3.08}
PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
+SLACKBUILD_PATH=${SLACKBUILD_PATH:="dev/perl/perl-mime-base64"}
PREFIX=${PREFIX:=/usr}
PKG_WORK="$TMP/$SRC_NAME"
CONF_OPTIONS=${CONF_OPTIONS:=""}
@@ -64,6 +66,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_SRC" 2> /dev/null
@@ -83,6 +86,72 @@ if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -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 sha1 sha256 sha512 rmd160; 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
@@ -148,9 +217,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