diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2009-05-04 15:39:46 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2009-05-04 15:39:46 +0000 |
commit | 8ec26aba4f25173589b041792dd0b0b01397a1e5 (patch) | |
tree | a14ee40640bba591992c3a6c6ca154835c200f4f /media/video/cinelerra/cinelerra.SlackBuild | |
parent | f4b5164186bb445931c0abc9eb2e475b7d1b795f (diff) | |
download | slackbuilds-8ec26aba4f25173589b041792dd0b0b01397a1e5.tar.gz slackbuilds-8ec26aba4f25173589b041792dd0b0b01397a1e5.tar.bz2 |
cinelerra: fixing patch name
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2191 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'media/video/cinelerra/cinelerra.SlackBuild')
-rwxr-xr-x | media/video/cinelerra/cinelerra.SlackBuild | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/media/video/cinelerra/cinelerra.SlackBuild b/media/video/cinelerra/cinelerra.SlackBuild index 511fd10d..fbcd36df 100755 --- a/media/video/cinelerra/cinelerra.SlackBuild +++ b/media/video/cinelerra/cinelerra.SlackBuild @@ -99,6 +99,72 @@ cp -a $SRC_DIR/* . PKG_SRC="$PWD/$SND_DIR" cd "$PKG_SRC" +# 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 rmd160 sha1 sha256 sha512; 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 + # Patch source patches=" [[PATCH URLS]] $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff |