diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2009-07-22 02:25:31 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2009-07-22 02:25:31 +0000 |
commit | 5491100afa473c45f96667ce6f89703d42e01503 (patch) | |
tree | 3341e9ea6b9672228ab1019b6b0cebbc97c142cd /dev/perl/perl-module-build | |
parent | 5158fb5c0ffc7fa2591d3ea639095816ca4f01fd (diff) | |
download | slackbuilds-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-module-build')
-rw-r--r-- | dev/perl/perl-module-build/Manifest | 23 | ||||
-rwxr-xr-x | dev/perl/perl-module-build/perl-module-build.SlackBuild | 74 |
2 files changed, 95 insertions, 2 deletions
diff --git a/dev/perl/perl-module-build/Manifest b/dev/perl/perl-module-build/Manifest new file mode 100644 index 00000000..dcdac718 --- /dev/null +++ b/dev/perl/perl-module-build/Manifest @@ -0,0 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +DIST Module-Build-0.2808.tar.gz 196525 MD5 b8e457b1a4b72c46bcec3d9bce87329b RMD160 eb156aef5b9bef9b56068abeb29f2596c33f92ec SHA1 cee04451c269a6f2fe09fb028423b7f829584e05 SHA256 1b49bb26aef78c4a90bdb01c0ece4b033cf6dac2ad5e95e8211b59f188bb1fc1 SHA512 a2830956a494cdb975f535eba5624d68d53079f27e74c617ec41467a1ff4ac60597becc4a08b1191a0d45113bd9c91032fbe1c117ad86afacba77c7ab7c005ec +MKBUILD perl-module-build.mkbuild 2370 MD5 6972ddb97204f8d86e0c68dad51e3219 RMD160 20e3c4d3cd09d7c5ad9606211ee849cdfc102f86 SHA1 ec720b27698e5e5a76407d18baec894e484002a5 SHA256 aaa477ec2824189a684afb3104c3397e3645331187da325a6f38979296efe19f SHA512 8f3eed823c6874c0b702c8fd6b05f7a0809857fa368cc314d9495f4ea18adfa6d5f1a50b729a4eea45c76138cb605a53853cc867256d96ff6cfd727923c4ec2a +SLACKBUILD perl-module-build.SlackBuild 7063 MD5 f1c367dae5296fd1168aae81a2677a3d RMD160 0ecdea255aa6cd4238feafd5fad595f47c904eeb SHA1 45a358907cf465ed988639829e821cf842ab61a1 SHA256 137cd1c4a9223f85ea964d897745902b408ad92388b5bd5fae52538f727b89b2 SHA512 4e0a84bd9ca59aff4cd81ce8257e4504dc8476489cbbd4df9a452404cd4c45e6e088b61370c90a41ea16a101d621c14e7ae7106852b4d7afd4c248730c79205f +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBCAAGBQJKY2C5AAoJEEHL93ESzgeioSYP/RtIxMbtGBXO5meWSYVHMv+E +mYadvF2Nf+Rmhv1rsdjfHjSXnco+8e6xjyxr5S6+Lie/7jCCxDe4X5ny5tgq4Z29 +LVQzWIL54VkRzLUJJWTrQVhni6V+KxLt6vWtF+G2olsihnr2iREQwSFiyLpzh0V6 +57iRnxoPOFUQsqAe3YrxTQX9u6ofeXmhS9vScPmFAOofmS8aAOxeo75v/Vgp5iWH +Ndszw/eiCjaLKBPsf+tZq6jhJYncM0LA3BtkeuSL7KPbVUpsjIzK0VEb6B18/l+r +/FCPRfClUZXqklnFZnodtoqbr1wH3THBZzZV5nxY+8jnu3oqEzDkRVJ46SGdp/Yu +o3w3yZUKr8rDAAh+PTfZzwVQd+dLTi9DttmqYomdGaA5SKO/7YBVUwLJg7ZWFxM1 +Wu9VGtKKGGLNfgmu9kcE6mAGu72UQlopbnf9rC8KxWjNZ90zFQTAFZrT7Z3GJnFi +Qjz5u6Pp5vPLF5UjngeGPXWQXqEC06r41U9rPpnLHGvGn8P/VahaOGZPMqAzpmmO +bldKHI44O5TQzqxpy4GLcTWfo0CRCySCOarnvMZM3nQL7YgeWTp70dOMaZxR5wOv +x1cfnQgFk0uKvcO9Kkmoz+Mangtg5Nv3V4bc+zQG+WQWQax1YCrXX4e9iV5svlG6 +v0VdwNSRvtaps9tWk5si +=jzUM +-----END PGP SIGNATURE----- diff --git a/dev/perl/perl-module-build/perl-module-build.SlackBuild b/dev/perl/perl-module-build/perl-module-build.SlackBuild index 9d410c20..0b64b63d 100755 --- a/dev/perl/perl-module-build/perl-module-build.SlackBuild +++ b/dev/perl/perl-module-build/perl-module-build.SlackBuild @@ -17,6 +17,7 @@ # slackbuild for perl-module-build, by Silvio Rhatto # requires: # tested: perl-module-build-0.2808 +# model: perl.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/perl/perl-module-build"} 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 |