aboutsummaryrefslogtreecommitdiff
path: root/trunk/mkbuild
diff options
context:
space:
mode:
authorrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>2008-09-06 23:11:24 +0000
committerrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>2008-09-06 23:11:24 +0000
commitd1e71d2f08c4713c66c95abaae2fdff7e08e8fe7 (patch)
tree06971a7eea61a07c83ef9dbe99d8196623e4fbca /trunk/mkbuild
parent789512e4d8ca59fa20093675b7af9bd8ca03df2f (diff)
downloadsimplepkg-d1e71d2f08c4713c66c95abaae2fdff7e08e8fe7.tar.gz
simplepkg-d1e71d2f08c4713c66c95abaae2fdff7e08e8fe7.tar.bz2
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@525 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/mkbuild')
-rw-r--r--trunk/mkbuild/generic.mkSlackBuild27
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>