From d1e71d2f08c4713c66c95abaae2fdff7e08e8fe7 Mon Sep 17 00:00:00 2001 From: rudson Date: Sat, 6 Sep 2008 23:11:24 +0000 Subject: git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@525 04377dda-e619-0410-9926-eae83683ac58 --- trunk/mkbuild/generic.mkSlackBuild | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'trunk/mkbuild') diff --git a/trunk/mkbuild/generic.mkSlackBuild b/trunk/mkbuild/generic.mkSlackBuild index a9b07ef..49b9e71 100644 --- a/trunk/mkbuild/generic.mkSlackBuild +++ b/trunk/mkbuild/generic.mkSlackBuild @@ -137,24 +137,20 @@ PKG_SRC="$PWD/$SND_DIR" cd "$PKG_SRC" - off -MD5SUM_SRC="$(md5sum "$SRC_DIR/$SRC" | cut -d " " -f 1)" + off MD5SUM_URL="[[MD5SUM CODE]]" -[ "$MD5SUM_SRC" == "$MD5SUM_URL" ] || exit $ERROR_MD5 - +if [ ${#MD5SUM_URL} -eq 32 ]; then + MD5SUM_SRC="$(md5sum "$SRC_DIR/$SRC" | cut -c-32 )" + [ "$MD5SUM_SRC" == "$MD5SUM_URL" ] || exit $ERROR_MD5 - off # Download source's MD5 checksum if necessary and check it if [ ! -s "$SRC_DIR/$SRC.[[MD5SUM EXTENSION]]" ]; then wget "$URL.[[MD5SUM EXTENSION]]" -O "$SRC_DIR/$SRC.[[MD5SUM EXTENSION]]" || exit $ERROR_WGET fi -MD5SUM_SRC="$(md5sum "$SRC_DIR/$SRC" | cut -d " " -f 1)" -MD5SUM_URL="$(grep "$SRC[ \t]*$" "$SRC_DIR/$SRC.[[MD5SUM EXTENSION]]" | cut -d " " -f 1)" - -[ "$MD5SUM_SRC" == "$MD5SUM_URL" ] || exit $ERROR_MD5 - +md5sum -c "$SRC_DIR/$SRC.[[MD5SUM EXTENSION]]" || exit $ERROR_MD5 + off # Import minimized signing key from @@ -244,6 +240,15 @@ if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then fi + off +# Set permissions +chown -R root:root . +find . \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + + off # Configure CFLAGS="$SLKCFLAGS" \ @@ -406,7 +411,7 @@ makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERRO off # Delete source and build directories if requested -if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then +if [ "$CLEANUP" == "yes" ]; then rm -rf "$PKG_WORK" "$PKG" fi -- cgit v1.2.3