aboutsummaryrefslogtreecommitdiff
path: root/dev/cpp/gtkmm/gtkmm.SlackBuild
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2008-12-24 15:40:31 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2008-12-24 15:40:31 +0000
commit025b7a3588b0ff0d6d91551e6db44d36b2c52553 (patch)
tree74bb7a1a548517cd14fc803654a09f57801cd442 /dev/cpp/gtkmm/gtkmm.SlackBuild
parent673f60870d307975f733f5e29f58f9cc35d150d2 (diff)
downloadslackbuilds-025b7a3588b0ff0d6d91551e6db44d36b2c52553.tar.gz
slackbuilds-025b7a3588b0ff0d6d91551e6db44d36b2c52553.tar.bz2
-ca gtkmm gtkmm: enabling manifest check
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2024 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'dev/cpp/gtkmm/gtkmm.SlackBuild')
-rwxr-xr-xdev/cpp/gtkmm/gtkmm.SlackBuild57
1 files changed, 57 insertions, 0 deletions
diff --git a/dev/cpp/gtkmm/gtkmm.SlackBuild b/dev/cpp/gtkmm/gtkmm.SlackBuild
index 138aa212..7195218a 100755
--- a/dev/cpp/gtkmm/gtkmm.SlackBuild
+++ b/dev/cpp/gtkmm/gtkmm.SlackBuild
@@ -91,6 +91,63 @@ tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TA
PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
cd "$PKG_SRC"
+# Check Manifest file
+if [ -e "$CWD/Manifest" ]; then
+
+ MANIFEST_LINES="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | wc -l`"
+
+ for ((MANIFEST_COUNT=1; MANIFEST_COUNT <= $MANIFEST_LINES; MANIFEST_COUNT++)); do
+
+ MANIFEST_LINE="`head -n $MANIFEST_COUNT $CWD/Manifest | 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
+
# Configure
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \