diff options
Diffstat (limited to 'trunk/mkbuild')
-rw-r--r-- | trunk/mkbuild/generic.mkSlackBuild | 27 |
1 files changed, 16 insertions, 11 deletions
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" </svn_source> -<md5sum_download_and_check_0> off -MD5SUM_SRC="$(md5sum "$SRC_DIR/$SRC" | cut -d " " -f 1)" +<md5sum_check> off MD5SUM_URL="[[MD5SUM CODE]]" -[ "$MD5SUM_SRC" == "$MD5SUM_URL" ] || exit $ERROR_MD5 -</md5sum_download_and_check_0> +if [ ${#MD5SUM_URL} -eq 32 ]; then + MD5SUM_SRC="$(md5sum "$SRC_DIR/$SRC" | cut -c-32 )" + [ "$MD5SUM_SRC" == "$MD5SUM_URL" ] || exit $ERROR_MD5 -<md5sum_download_and_check_1> 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_download_and_check_1> +md5sum -c "$SRC_DIR/$SRC.[[MD5SUM EXTENSION]]" || exit $ERROR_MD5 +</md5sum_check> <gpg_signature_check> off # Import minimized signing key from @@ -244,6 +240,15 @@ if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then fi </patch_source> +<files_permissions> 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 {} \; +</files_permissions> + <configure> off # Configure CFLAGS="$SLKCFLAGS" \ @@ -406,7 +411,7 @@ makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERRO <clean_builds> off # Delete source and build directories if requested -if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then +if [ "$CLEANUP" == "yes" ]; then rm -rf "$PKG_WORK" "$PKG" fi </clean_builds> |