aboutsummaryrefslogtreecommitdiff
path: root/dev/perl/perl-convert-uulib
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-09-16 02:23:49 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-09-16 02:23:49 +0000
commit8feb8716fd9ad21b5507407986073235446bb003 (patch)
treec81a310eb5fb1ad29f38ffb8c6abc1e88d1b54c8 /dev/perl/perl-convert-uulib
parent36d20148a5e3fdf56178c4e9c603d5c574c5cd40 (diff)
downloadslackbuilds-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-uulib')
-rw-r--r--dev/perl/perl-convert-uulib/Manifest23
-rwxr-xr-xdev/perl/perl-convert-uulib/perl-convert-uulib.SlackBuild78
2 files changed, 97 insertions, 4 deletions
diff --git a/dev/perl/perl-convert-uulib/Manifest b/dev/perl/perl-convert-uulib/Manifest
new file mode 100644
index 00000000..e0919ef3
--- /dev/null
+++ b/dev/perl/perl-convert-uulib/Manifest
@@ -0,0 +1,23 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST Convert-UUlib-1.3.tar.gz 236231 MD5 d84df933e1cdda551e6acbae2dee86ad RMD160 51165cd29d3e05d14b4d44dc7e0d7044bbe302ef SHA1 46f9e5a1a4aff9a9707b9e8a7f09f03021202215 SHA256 0454f11383268db33fa0438f681b0fe3e43e91a441ee424548e80b1012ee579c SHA512 e9626aed04faed65d030c2ee9068626f1c679c231bf99de00aab2b25bdc32aca50b150a4c5bccaafe4095f34220f3fa6c78b4240ec98dc1ea184c97485e8056e
+MKBUILD perl-convert-uulib.mkbuild 2412 MD5 f44f0ab20844bd4d2ce8b8669ae59550 RMD160 bbb1ab322456204f9ef04a93198e66f6c056897a SHA1 6bfbcd6c397aa901e024003caba3d19a6733cc08 SHA256 d627a6af7217104aa29e065f7ae86de866cd6629c335973e618f67af6deb3170 SHA512 6b70c04ae45aa0479c30aba9cca990295a98b74822a895d1686850477dd305552a6c4b231ba882b00cad0b498bf927b97db766ddc72b0bb5334dced573eed80e
+SLACKBUILD perl-convert-uulib.SlackBuild 7106 MD5 a6727d1ef34030c7bd49fdd76418dd54 RMD160 6065e670fe503986eae74ed87db47de3780d3d10 SHA1 1349cc10c6f7ae5d19b6b3e1c57749eb84fbaf4e SHA256 fccfc70051740d7d3f72921c5174a8cea2c8cbb831f573ee9618b35d77572be2 SHA512 3b852527f1787026be1f5bc395edc0e1136a81811e97dafbfd63d6209d8641920e14833602ae4ba4128f6864233e60fab022520539b2628bd951baef1cdba7dc
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBCAAGBQJKr+kkAAoJEEHL93ESzgeiuvUP/3sEBP+7CYnhRFFjNh9RTXWJ
+3Fp6VFdCv9lhqY5PM1WORpPwF2FSx+MQov0+O2EwrdfVi9RMESSH6e1zkPaCDqLf
+0spzwwlyiWfKDIaCdd09aZLZHAxc57oDAnd2icECTiPpzqGwaDT67AXi0Hh68VSw
+Yv0Ked+c0yVXQ0Wy/zT1CqxpEiRhKtE8bGghSaDIoD/E8p6SlGQtjQPNdduyHKbV
+JY1CMO1YpNI09SARej4HQeI90s2Ol1TjhcDzUUaBY7eAJtvas2keimKf4LA5C7pg
+CRIPC5JDPbkiS4tkMNKOo4RUItIxLrp2YrrBp29CfmYHjTEep0Y7tAaV4Dx1KN1c
+c18WRQCEga3tdRrAkiy2yasrktU3iy8t/EJDrV5CvAaByTh/Tkid8TtevS1E+0vJ
+rRy1h/DYuFt76dgsZUW6NlL8eBvZUw+bvC0i2oahSXGR31Xik4sfZWtkA8EePAvp
+xgasDEcW5YRLVRt+lR1v8YfjViZMcMDQwZ/aw1imWtTwjmlTx5l2WRmX2onrWygx
+o3bb5wjZcKVzHNDfyCxi26QL2Z6etfEI68FN4HOPDlt5BNOyYgoCxsJdBijGr7kQ
+TbgnDYeAcTC4vbB++qA2kG8DKmhHhCiVweU34MGDfYm1D1Ra66PHd/d9KIIIgwqn
+6oESSzVoWE8YgTApXUOn
+=340n
+-----END PGP SIGNATURE-----
diff --git a/dev/perl/perl-convert-uulib/perl-convert-uulib.SlackBuild b/dev/perl/perl-convert-uulib/perl-convert-uulib.SlackBuild
index a62d21bb..7d8df761 100755
--- a/dev/perl/perl-convert-uulib/perl-convert-uulib.SlackBuild
+++ b/dev/perl/perl-convert-uulib/perl-convert-uulib.SlackBuild
@@ -16,7 +16,8 @@
#
# slackbuild for perl-convert-uulib, by Silvio Rhatto
# requires:
-# tested: perl-convert-uulib-1.09
+# tested: perl-convert-uulib-1.3
+# model: perl.mkSlackBuild $Rev: 796 $
#
# Look for slackbuildrc
@@ -31,13 +32,14 @@ CWD="$(pwd)"
SRC_NAME="Convert-UUlib"
PKG_NAME="perl-convert-uulib"
ARCH=${ARCH:=i486}
-SRC_VERSION=${VERSION:=1.09}
+SRC_VERSION=${VERSION:=1.3}
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-convert-uulib"}
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