aboutsummaryrefslogtreecommitdiff
path: root/app/backup/gibak
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-03-30 02:01:31 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-03-30 02:01:31 +0000
commitfd0994f67f0e8e17c1d0323ecb4811a3c836a9f1 (patch)
treea3703f25224e0c25e53c241fe7b62dfa25b74328 /app/backup/gibak
parentc38ef39e1ee2d4add13b05ac2d1b2fb3e70c8287 (diff)
downloadslackbuilds-fd0994f67f0e8e17c1d0323ecb4811a3c836a9f1.tar.gz
slackbuilds-fd0994f67f0e8e17c1d0323ecb4811a3c836a9f1.tar.bz2
omake: added patch for 0.9.8.5_3
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2130 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'app/backup/gibak')
-rw-r--r--app/backup/gibak/Manifest24
-rwxr-xr-xapp/backup/gibak/gibak.SlackBuild76
2 files changed, 97 insertions, 3 deletions
diff --git a/app/backup/gibak/Manifest b/app/backup/gibak/Manifest
new file mode 100644
index 00000000..e92a1fc2
--- /dev/null
+++ b/app/backup/gibak/Manifest
@@ -0,0 +1,24 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+DIST gibak-0.3.0.tar.gz 24380 MD5 e3c14b5c1fe92cdcb3effd58c68e0793 RMD160 682c0801b30018c475ae5cc63c1854ee4fe0cec4 SHA1 04c161fc42411d2909dc1790ad003543dd28b3d6 SHA256 a270398ef509303af93f2945acf82c98d3479a3bbe70b907116859ced9855478 SHA512 5b8f7aa12e3e35ae8cf340b60c4e8c50ea05e50208f854e3992c616dac747468ca07cc5e27e38906286a2bbddd7ae204d94666d33acd72f8371ec5c5329146dd
+MKBUILD gibak.mkbuild 2856 MD5 a30b067b88270e0978d4c2cdab80dcd1 RMD160 513a24353ce217433efd9b6616abb52df17367c1 SHA1 da4a5333272041ce725d1044e913ff520b94b1cd SHA256 4823d9d646f323b19a5903e7571ea072ec13f9e02521de238f8f3e4583b7af03 SHA512 185e9720b2bbe617b8a4c135edb6c38cf82030d9f21f0ae37f47487295425de419494a26dc3955d263e01e7422380e5efbfa75456618bbb903df6a7b76df7400
+SLACK-REQUIRED slack-required 75 MD5 9c64c59ab90a0365bd2ea7938d8d688d RMD160 ecd5d8c4ffa5d9c6e904cf41178a0f1bb64839b7 SHA1 80057abb760f840ac7e2e293ccef068e1e7e75ff SHA256 581ee7d788727c2241c408b413e7330ad5f35f1f8267e7f592a1ade9bdd3cb59 SHA512 bd299ac407ccee73417f83d6aaeefaa94d39086320ae05b351516bc706a7a6f1f39c8c61333022fdff8ae9096d9cd40e1b0059c630dec810ee7677f7faa114fc
+SLACKBUILD gibak.SlackBuild 7085 MD5 19bd7517f0c315dad373d21edf34cbd6 RMD160 dfc73d68b9a99fb46cfb2e0bc313607c783c95f0 SHA1 b51b98a41b71e132847a85b2cca7480b641e26a4 SHA256 221822428a7df466db491e5d8efa6c5e36ebaf7f48bd66a33e49fcc3001ca084 SHA512 89ebe1fcf00b587d0b370f222522a9ae0cc9de818cd44010beafdaf4d804f8dae1b3cf224e1447a1f93b8429029170b58bd5ec25b71c28a22b0144048a799c30
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBAgAGBQJJ0CdrAAoJEEHL93ESzgeiGBsP/004wGnfZ+qVPSbaFvORMY3f
+55J+9LiBx6VhHLYlaJv1ZX2tHKYe91zI8wEWX7PUYotL3Ad1/nxMqUpeHR/QbPws
+7Ve9+tSSAyDFO4DYuLIhQMQIH/MwAvqyPVkFNAV2hzwFmcQAP9QHiLZm77GrVFgT
+i6IUHcIgw2C/nPxLCIW2ejh3VU3Gku3p6w4qFTG3p62Sdhw6E6evHfxLAeu1mbPe
+u2sAiWoFVZFJ6YM7ZjXGut8nTwm+BmOGeZCHJ0k7gSBugbyiTX2fBddDF2xagwFA
+fBlj3uRoVbPu76WIXBV5vohE/IapkExaAGJWYfFOJMiBPQ5yBs3Y7ObynBDyxAfc
+ak9YcfH1R8zKeAJcDmQ1yZwr1g6n/C5N3PHIZ3x0l3yf8+Eu1N2+R6Fn1ZSzkRCS
+6bHIFXUsgZ4tQwoCfQANKCUblxUJnBRaljCdmp16QE7B7qMnyh/sVmzwIEYUoCcU
+b5PRwLoCf2UmWQwmn0iMOVvnUZXyoe/Sr3vtA2S832YWKlS/sXrkUYx0/Vdzjee2
+sYHYzdINnY4psamiDm4DvLwAL2wIdSsZlqpQA74R57illXvpYSehMLFrknu5O3/g
+2mcQ1mKinahvRJbguJW5QIXF63vJlZutjdlLEM2Xx2ppxl22KyYG+3nRNOJQGdRM
+NU436y5wZRaKyT1YHWOI
+=XMxM
+-----END PGP SIGNATURE-----
diff --git a/app/backup/gibak/gibak.SlackBuild b/app/backup/gibak/gibak.SlackBuild
index f01d6ce0..58e91bed 100755
--- a/app/backup/gibak/gibak.SlackBuild
+++ b/app/backup/gibak/gibak.SlackBuild
@@ -17,6 +17,7 @@
# slackbuild for gibak, by Silvio Rhatto
# requires: omake
# tested: gibak-0.3.0
+# model: generic.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:="app/backup/gibak"}
PREFIX=${PREFIX:=/usr}
PKG_WORK="$TMP/$SRC_NAME"
CONF_OPTIONS=${CONF_OPTIONS:=""}
@@ -47,9 +49,9 @@ NUMJOBS=${NUMJOBS:=""}
LIBDIR="$PREFIX/lib"
if [ "$ARCH" = "i386" ]; then
- SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i386 -mtune=i686"
elif [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686"
elif [ "$ARCH" = "s390" ]; then
@@ -65,6 +67,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 +87,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 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
+
# Untar
cd "$PKG_WORK"
tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
@@ -150,7 +219,8 @@ fi
# 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" ] || [ "$1" = "--cleanup" ]; then