diff options
Diffstat (limited to 'dev/perl/perl-array-compare')
-rw-r--r-- | dev/perl/perl-array-compare/Manifest | 24 | ||||
-rwxr-xr-x | dev/perl/perl-array-compare/perl-array-compare.SlackBuild | 78 |
2 files changed, 98 insertions, 4 deletions
diff --git a/dev/perl/perl-array-compare/Manifest b/dev/perl/perl-array-compare/Manifest new file mode 100644 index 00000000..e809053e --- /dev/null +++ b/dev/perl/perl-array-compare/Manifest @@ -0,0 +1,24 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +DIST Array-Compare-1.18.tar.gz 9266 MD5 ebca871a2e9c37b389232a6be6700373 RMD160 d22c6b08c30426e2bc1a5becc6fc982386ac22ba SHA1 2f802816f55b3a8715d9dbe653a89b9c2b0003c6 SHA256 909660a73e447c78c2b01fec3e401bc5ee3d521043a7379619e8ae2457c87b7d SHA512 8950056b3bbfdbed835e560e9f488c2ce385640ae6c2a737cec1ac2eb6281faf00332646215de76df6b6477805b226cfc86f14a7b60abfcdc003b4e90414a854 +MKBUILD perl-array-compare.mkbuild 2471 MD5 b38cddc6607f3206f207509bd1e5a8ed RMD160 bef050920483429454bc779e1ecfe9b981e614cf SHA1 c8a80d6cd55480c96e8aeb34dbae132a2ac043f2 SHA256 8a2f4555896ac1183317c12cda75b2f4778180859f6e11aee8000839867385c9 SHA512 2f15687f13454367cde2e911245ff701b3e6e2cb698eb837c72f1a800891d0100605b6c8c0a972f4cc958005e5021445d86354448f68553ff13f59a19df828af +SLACK-REQUIRED slack-required 95 MD5 eda62edb65b9f3f69ae1c11bf24b7818 RMD160 8a8040324799a7c3fba3c6910a77d86893bbc502 SHA1 884acb8cd90b68c894508c53cc1bf66f32ac13d5 SHA256 d8a8c840b3d5c642f0938a54c78bff5c0b9d8d6380dd25642e1620277f03d0d8 SHA512 7fe7d4119a3a492f44d90430737a9ea39803e78a94331d34952a1612311df31e16f9130a09aa6d2ca5050f6daba27310832577a4baef2661315c993b9001a006 +SLACKBUILD perl-array-compare.SlackBuild 7230 MD5 fa94d7cc5454a3bc4a047e10a42cb5e1 RMD160 3f3d60d455aa75e2f3fa8a3e46450b0ddb96b2a1 SHA1 488a581abb26898afbef1d39205260b30fee608f SHA256 49eacd8bd187e9400c17df35f891368f495d3a645a33281a341905992a7ec2ec SHA512 973edeb8b7f21a6ceb5ce65dcf8c3424406d920d038624365d68d223192454257a012d059d6fd04070a081e7497ea6396e47b2cfe3778aad5e67b113024fc8f1 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBCAAGBQJKY2E4AAoJEEHL93ESzgeitvcP/0ODzUT8sYxD4tLlz3z4jWjI +Ml9MzYtcfM6qtMpFi4EtF/tk3YyeNe1Zho75WOIzHgeRGgjgB1gpF7rm1FCjQEh7 +HxHUX4ED25sBGnrxnDBCYGvJlTHKIuJOQlwMgMvL9lOfcTYfpMoMLJrDIBIEt15y +InA1vX04HWvf12E0do8OInTWf9y5mvHWGXe9Zec0LX69ECZvOsD4399HZn2RHr8F +1E33FDGuGhT3QtFRhFi4eP9GUWM0n/eCyqYYFESXqzfRZEs+t+Bhn5b6+k3+n0ug +A5eCQEDNjDf8cYfBsc8ZB7/jUHHk0M2nY2DxbWm+7vA+DfelkGVUuQ9HFvk7EFvk +BlQfi/MzOoiaM4RisrGDTF51tcpdaMlLY8oecxuZeFdl2O5S5EycBsuOSTgVsXBX +QlwPb+a1eDuGB1AHrnap6XWuGpMngcO+5bqEVl7/8X60b3tJ5MDyLrX1gkpL2dU1 +Oo5ONWOeS2YG00a6vcypwnZ/usZg/dJR0jDYqQT6m02ETR197sKQUVS7Pdg3DKIb +esovSD73kVyr8Y6vhn0dLdJagZIm4QXMIyFukP4sJaEKMPRBrnhCr7dc4KkI3l6n +W9SozQl+En2jaq8EAtjvE+uk5MZF0bxCl66CRPpVMJLbcc5sM6xHXV0BU6PucNjN +p2WmzvkakNzMGdjqNeoZ +=1SjI +-----END PGP SIGNATURE----- diff --git a/dev/perl/perl-array-compare/perl-array-compare.SlackBuild b/dev/perl/perl-array-compare/perl-array-compare.SlackBuild index 07fd53df..fae359bb 100755 --- a/dev/perl/perl-array-compare/perl-array-compare.SlackBuild +++ b/dev/perl/perl-array-compare/perl-array-compare.SlackBuild @@ -15,8 +15,9 @@ # Place - Suite 330, Boston, MA 02111-1307, USA # # slackbuild for perl-array-compare, by Silvio Rhatto -# requires: perl-module-build -# tested: perl-array-compare-1.15 +# requires: +# tested: perl-array-compare-1.18 +# model: perl.mkSlackBuild $Rev: 796 $ # # Look for slackbuildrc @@ -31,13 +32,14 @@ CWD="$(pwd)" SRC_NAME="Array-Compare" PKG_NAME="perl-array-compare" ARCH=${ARCH:=i486} -SRC_VERSION=${VERSION:=1.15} +SRC_VERSION=${VERSION:=1.18} 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-array-compare"} 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 @@ -154,7 +223,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 |