diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2009-09-16 02:23:49 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2009-09-16 02:23:49 +0000 |
commit | 8feb8716fd9ad21b5507407986073235446bb003 (patch) | |
tree | c81a310eb5fb1ad29f38ffb8c6abc1e88d1b54c8 /dev/perl/perl-convert-tnef | |
parent | 36d20148a5e3fdf56178c4e9c603d5c574c5cd40 (diff) | |
download | slackbuilds-8feb8716fd9ad21b5507407986073235446bb003.tar.gz slackbuilds-8feb8716fd9ad21b5507407986073235446bb003.tar.bz2 |
amavisd-new: adding amavisd-new (thanks to x-doctor) and updating dependencies
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2241 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'dev/perl/perl-convert-tnef')
-rw-r--r-- | dev/perl/perl-convert-tnef/Manifest | 23 | ||||
-rwxr-xr-x | dev/perl/perl-convert-tnef/perl-convert-tnef.SlackBuild | 74 |
2 files changed, 95 insertions, 2 deletions
diff --git a/dev/perl/perl-convert-tnef/Manifest b/dev/perl/perl-convert-tnef/Manifest new file mode 100644 index 00000000..873fb56d --- /dev/null +++ b/dev/perl/perl-convert-tnef/Manifest @@ -0,0 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +DIST Convert-TNEF-0.17.tar.gz 12173 MD5 31cddf42fae9495b4a686b17ec68d7e0 RMD160 4f0f0b15f2784c46fda28b49f2a7c6d2fffe427b SHA1 c88cbda33e2bb5b12b36d7e8a1824dbad4080d30 SHA256 4efe969f24300f2485982941c396dca336081fe08f33f82938f55242efde9478 SHA512 832ba3c8f2be318d8f4a5afd101e602d5f5117d8375b0ef7291d063843f5d98581800eae937689f089853fe545f47dfca9fd106aac37d1923ba772aa39ce7707 +MKBUILD perl-convert-tnef.mkbuild 2363 MD5 415991cb294d369ef02e31f1790f38f8 RMD160 1cfe72927c7eb7b4d804bbf2f024c12354c50b17 SHA1 38c87c2a340a2f69445b6790ebe10928cc25ecff SHA256 7e2d4e85356bb76a604881391ef702d401e28d8ff8f5c78c350025862e7975ec SHA512 b53af2f2ab9f53b3def4b3c03c065cbc30342b8342a404366d0d8c4035dba463b7ba2b9fc9cc4f210899cebab7db8b92f19a8e8b8a49acb1fce52fe407ce9c64 +SLACKBUILD perl-convert-tnef.SlackBuild 7054 MD5 999f7d22089999646c4b646a313bbd03 RMD160 b2c615eb326c8f4e238b05cf9e96e8366e87a66a SHA1 1665cffb29f525bfdd3cba2bff397bcab9c27ec2 SHA256 240fc4e51d32428d82b90ea5de2a886dd2cde78d0e2c103025ada1fe28486157 SHA512 0422e5ecf45a839ee14ea242ac794db97b1b827ad8fb12161098dbddeb17bc1a63e54c5e780b717d4c3aba2c74144ef1bee85c9e5a4e969dac003e1ad6826b74 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBCAAGBQJKr+h7AAoJEEHL93ESzgeic/8P/07Otee+us0iyavgn8yk6j90 +TmGrtjCDxUflPUZDzIhb/Ee0V2QtaDAwoLU/z9vUyUViN0TiOd8i7IdyxzTJQpZ4 +e3PnjZ81JXEfzJZroFR0VThxZkWx3ZRtfwWR3FSs2uk/QvreR8/+qQEtzQzZE6eJ +3s/pbmvnDcdKRxiZhnIDtzNOTHR+3itslunJWsF9DiI5yW7F6gECxQ/2xCbW15JT +EwzLddJ/JrO7gFvkkErn4S9CYRLOt3+ExKmKA6jbTlQyd28KA9AxxYYYS2dhJu4T +RJMAbkDyodJFWgNu+T9ln2fATHxHsSykxmAXh42mL6f2ECJskb/pukpEqUSS5xj2 +Pft3S0VYO92Hi6OYyG7h/ZGXhcIfkNLzVz7egOA1SOCsteW0IlsW3epKsAlIV5sb +JF0RKKYSvCvcs+hojEE2JsYElk7rBRH/CBdaNToaGs1WRlLMcZfRdPcGwdIN6Cz3 +y4BJ2jqggRuxthBYMVmydwIUyfP8wq1CNpMH2CZvELMi72qOtPGKIaLD+vyZgmgv +juzX+MVSpCUnKvhdiwueOiTD0nEzry3EiYozu47xzSqHJf17RpDq6UqEAIzYAVfj +qROUqwWwlucEII8h4qUHo4gp7FLrjC6yDS23DlXHW4c3z9tGtOk31CqRKlfm3RfZ +lVB4Z2tkwE0c+UkuIU23 +=xkxw +-----END PGP SIGNATURE----- diff --git a/dev/perl/perl-convert-tnef/perl-convert-tnef.SlackBuild b/dev/perl/perl-convert-tnef/perl-convert-tnef.SlackBuild index 9b4bed4a..bc19c0f4 100755 --- a/dev/perl/perl-convert-tnef/perl-convert-tnef.SlackBuild +++ b/dev/perl/perl-convert-tnef/perl-convert-tnef.SlackBuild @@ -17,6 +17,7 @@ # slackbuild for perl-convert-tnef, by Silvio Rhatto # requires: # tested: perl-convert-tnef-0.17 +# 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-convert-tnef"} 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 |