aboutsummaryrefslogtreecommitdiff
path: root/dev/perl/perl-test-warn
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-test-warn
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-test-warn')
-rw-r--r--dev/perl/perl-test-warn/Manifest23
-rwxr-xr-xdev/perl/perl-test-warn/perl-test-warn.SlackBuild74
2 files changed, 95 insertions, 2 deletions
diff --git a/dev/perl/perl-test-warn/Manifest b/dev/perl/perl-test-warn/Manifest
new file mode 100644
index 00000000..a2880ec2
--- /dev/null
+++ b/dev/perl/perl-test-warn/Manifest
@@ -0,0 +1,23 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST Test-Warn-0.10.tar.gz 9624 MD5 17557bbc8eefadf9f088ae4ab73e9976 RMD160 0042a0c411406ff38d233f0c2eeee7bcb2a68fcc SHA1 d2ee498519f1b144de04763fe5bb916ce30e56d2 SHA256 52f8bf1cd3f23fffeabd6619e95dda81484b099ef2c8a0d3cd77a4960e6caac1 SHA512 77040d3e53d9cb9482aaaf974f0313e0d843e202d588a79f5aa77fe8e0a576f7d915cca32ef0162a83c66e590b84c7391584cf82a4685b1c2b45ab486afb89cd
+MKBUILD perl-test-warn.mkbuild 2333 MD5 e3618c1de3fa4498a84315f1001fb654 RMD160 0ff61dc23f452d3c6378d22057e7cce620aa14cb SHA1 70aa9f3b243f7e038f044869b89e8e689fc1e0c3 SHA256 60f5024ff86213148b132fc7f890aa07975a53b68467c76c3af48313b2b11304 SHA512 2f94e8f536e69db9670fb6e0783d516f8c045ad6fa0c883a4afc54662f791bf1b761c85236efe1778fc41ecf62c8e9850ab08e5888624396a6af00147d3a0d73
+SLACKBUILD perl-test-warn.SlackBuild 7012 MD5 57e34f39a76981ae1fa7cedf1d4021b4 RMD160 7718fb5d4644cd40e7a1d5b86c51799f8c1de3ef SHA1 6cd52ca97d0bb95ecf7e727c91635aca64367fe4 SHA256 792a7731367051b0f5715b62489fe7a6cecf8fa43ea59f6b65a650e08f263f24 SHA512 4d11246c3cb9149fd252a58d792618b1823ec6af92c9253e10264f78cc8e129bb08302d665a073d512f10a894d92369da74c4f13dba6f738b1da3e17807392f4
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBCAAGBQJKY2F5AAoJEEHL93ESzgeiYC8P+wYlx/Xk3XdPYgbAAXVpb4br
+DoG6WbTSTaW9Y4KncN5xrJwyHZzypFtJraKxJfMAoJG7WwUAvz6khW6lVEkeFyXd
+Xv4IqkgA2sIelV/baNcsl3VKqf6mTr7vltRIwsxqwrPrjJC2FcQbgPWr391Ph9Tq
+yweYxAi5Bwl61vbSY8v8PEgM5e6hYrHPAmQL1JasiqH+TAQULc6wj1Vz1dMYb7Hj
+rERlk46JFOhKfaUxgzks3HS08hjjz6IfvHV4xTIO3hMc6agG4Qu87l1ECT5aFINR
+tckyigNrM+7Qsr+tUPOy7omch6y+oiISiMWkrMMq98pq9s1/QGWxhGqksZUEEkjG
+a0mWSCrpcOmE4WejCyIIa+snSCU3CepUS0Lw4Ggw/jWgvb7ld5QdrJAUxjv8ifW3
+Mg4HcQicuZDtxFiNCU1DrvJBDC4JeyEp2krqYfKisaIX+JgkghMEjAcRFXkuRzZt
+lf222iYBtCyA/em/ffymO8qjb7TZqHDvzfsGD2mPRYG1fVbE9JZ5yXU56GIB/vuT
+I3N+HSoNa4YUfXKFl99gem+z7N7CC4o9+KXx8Drx8FU9m9p7lw9DhbX+tsDMmRWk
+UNdhTOGL4JKNd3JMkX8glNyJxiZLvNGjHuUgYW53pVKjxy+1xehxC19rVRvedH5m
+IGoUBN/3y0MT8GNOt611
+=139T
+-----END PGP SIGNATURE-----
diff --git a/dev/perl/perl-test-warn/perl-test-warn.SlackBuild b/dev/perl/perl-test-warn/perl-test-warn.SlackBuild
index e718a392..bc4700af 100755
--- a/dev/perl/perl-test-warn/perl-test-warn.SlackBuild
+++ b/dev/perl/perl-test-warn/perl-test-warn.SlackBuild
@@ -17,6 +17,7 @@
# slackbuild for perl-test-warn, by Silvio Rhatto
# requires:
# tested: perl-test-warn-0.10
+# 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-test-warn"}
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