diff options
Diffstat (limited to 'media')
-rw-r--r-- | media/libs/libexif-gtk/Manifest | 4 | ||||
-rwxr-xr-x | media/libs/libexif-gtk/libexif-gtk.SlackBuild | 87 |
2 files changed, 78 insertions, 13 deletions
diff --git a/media/libs/libexif-gtk/Manifest b/media/libs/libexif-gtk/Manifest new file mode 100644 index 00000000..c09ab61e --- /dev/null +++ b/media/libs/libexif-gtk/Manifest @@ -0,0 +1,4 @@ +DIST libexif-gtk-0.3.5.tar.bz2 290624 MD5 0ecdba41f3e0f20a11b8555bd2dd2a07 SHA1 76eb91b635c6097fe541ec8a2b14b3a9d844993d SHA256 a92356343386a6574da747fb25c266fd121b47b3f7f97e9ec1a0940f00fcd096 SHA512 db576bb1a7ab0bc90103c5774739b6f0290899c51a2197ce893f8648671cb22277801d58bf07f703b124f6464ab96f8f82bc112d9d271a2cd77be1ece1fc4c60 RMD160 6d755c4e915a1d6cebe25d499cced6026d08c897 +MKBUILD libexif-gtk.mkbuild 2781 MD5 e466fe26dce065fdaaa745ccdbfd244a SHA1 b7e103e129777f62249274502f6c0916786f5072 SHA256 c26d002f1c4b546df092c526da71def3affd2e64dcdab5f100d6d84be3f61a8b SHA512 72ef57a3655fb5d234ed8e838fdc15c06c46e89fad4a2b50c7f7993be535520a61595a3a932f858dedf90624da685361cb7123821b63bb441dec2b3424135863 RMD160 38d1dd2d8a36cd91494c09b9b8ac70f679127116 +PATCH libexif-gtk_0.3.5-3.diff.gz 2925 MD5 5795c1b58924e37d6d5a3eaa36ef958f SHA1 336e87a7a620ea8fb39f2851f5bc1634c094b8d0 SHA256 17692ab256a04ad8ad0358d4cb0f052b5c909f5850cf9e7da8cd1feb6926bdbf SHA512 b85f3c5dd4ba87b6397df183778d45e2aa3c7f75792dff4627a9d772230f446e7b25d499824be9503c7e669be6eb8193b53e2ac95b8068957165782258f9c301 RMD160 af66561cf09998a7799703bcb343ee2e6e8d87f8 +SLACKBUILD libexif-gtk.SlackBuild 8015 MD5 38d1683d90449b4dfbde33d10db44323 SHA1 83aeb1ec25a62ac1dec6e3cdc9df7df2e9fcff17 SHA256 6c88923f2647eb4304d3f2e1dfa7424ed1c366b278a34d06eb2745b6efa1e5bb SHA512 c84e9472573b8ca9bc77d7f8c8ae62c31c0ed1c03161d43f8348846329352cf072655af67a9a231a6b6b362a6266c29adf03e48717460166d74a604f8cf7b9d3 RMD160 e430d3b7a73e92e7e1c518dea26ab4ddb8f7d1b5 diff --git a/media/libs/libexif-gtk/libexif-gtk.SlackBuild b/media/libs/libexif-gtk/libexif-gtk.SlackBuild index 0d683aed..abe03ef2 100755 --- a/media/libs/libexif-gtk/libexif-gtk.SlackBuild +++ b/media/libs/libexif-gtk/libexif-gtk.SlackBuild @@ -65,6 +65,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_WORK" 2> /dev/null @@ -84,6 +85,73 @@ if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -t "$SRC_DIR/$SRC" 2> /dev/null; then wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi +# Download patches +if echo http://ftp.de.debian.org/debian/pool/main/libe/libexif-gtk/libexif-gtk_0.3.5-3.diff.gz | grep -q -v "PATCH URLS"; then + for patch_url in http://ftp.de.debian.org/debian/pool/main/libe/libexif-gtk/libexif-gtk_0.3.5-3.diff.gz; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + done +fi + +# 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="`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 @@ -91,10 +159,11 @@ PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" cd "$PKG_SRC" # Patch source -patches=" +patches=" http://ftp.de.debian.org/debian/pool/main/libe/libexif-gtk/libexif-gtk_0.3.5-3.diff.gz $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" for patch in $patches; do + patch="`basename $patch`" if [ -f "$CWD/$patch" ]; then patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH elif [ -f "$CWD/patches/$patch" ]; then @@ -103,15 +172,7 @@ for patch in $patches; do gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH elif [ -f "$CWD/patches/$patch.gz" ]; then gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH - fi -done - -if echo http://ftp.de.debian.org/debian/pool/main/libe/libexif-gtk/libexif-gtk_0.3.5-3.diff.gz | grep -q -v "PATCH URLS"; then - for patch_url in http://ftp.de.debian.org/debian/pool/main/libe/libexif-gtk/libexif-gtk_0.3.5-3.diff.gz; do - patch="`basename $patch_url`" - if [ ! -s "$SRC_DIR/$patch" ]; then - wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET - fi + elif [ -f "$SRC_DIR/$patch" ]; then if [ "`basename $patch .gz`" != "$patch" ]; then gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH elif [ "`basename $patch .bz2`" != "$patch" ]; then @@ -119,8 +180,8 @@ if echo http://ftp.de.debian.org/debian/pool/main/libe/libexif-gtk/libexif-gtk_0 else patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH fi - done -fi + fi +done # Configure CFLAGS="$SLKCFLAGS" \ @@ -180,6 +241,6 @@ cd "$PKG" makepkg -l y -c n "$REPOS/$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 |