aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-12-21 22:22:48 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-12-21 22:22:48 +0000
commit4994ee1e3547cb264b3b501c9b78b34ed3fbded5 (patch)
tree86f77b8b53f20bf5d57ba2fb66a9afe400294859
parenta9f211d4244900b0c0dc932893a3849a33891b96 (diff)
downloadsimplepkg-4994ee1e3547cb264b3b501c9b78b34ed3fbded5.tar.gz
simplepkg-4994ee1e3547cb264b3b501c9b78b34ed3fbded5.tar.bz2
minor fixes
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@701 04377dda-e619-0410-9926-eae83683ac58
-rw-r--r--trunk/mkbuild/generic.mkSlackBuild11
-rwxr-xr-xtrunk/src/mkbuild12
2 files changed, 14 insertions, 9 deletions
diff --git a/trunk/mkbuild/generic.mkSlackBuild b/trunk/mkbuild/generic.mkSlackBuild
index 192023d..507384e 100644
--- a/trunk/mkbuild/generic.mkSlackBuild
+++ b/trunk/mkbuild/generic.mkSlackBuild
@@ -269,9 +269,13 @@ fi
# Check Manifest file
if [ -e "$CWD/Manifest" ]; then
- grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | while read MANIFEST_LINE; do
+ MANIFEST_LINES="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | wc -l`"
+ for ((MANIFEST_COUNT=1; MANIFEST_COUNT <= $MANIFEST_LINES; MANIFEST_COUNT++)); do
+
+ MANIFEST_LINE="`head -n $MANIFEST_COUNT $CWD/Manifest | tail -n 1`"
MANIFEST_FILE="`echo $MANIFEST_LINE | awk '{ print $2 }'`"
+
if [ -e "$SRC_DIR/$MANIFEST_FILE" ]; then
MANIFEST_FILE="$SRC_DIR/$MANIFEST_FILE"
else
@@ -282,7 +286,7 @@ if [ -e "$CWD/Manifest" ]; then
continue
fi
- SIZE_SRC="`wc -c $MANIFEST_FILE`"
+ SIZE_SRC="`wc -c $MANIFEST_FILE | awd '{ print $1 }'`"
SIZE_MANIFEST="`echo $MANIFEST_LINE | awk '{ print $3 }'`"
# Check source code size
@@ -294,10 +298,11 @@ if [ -e "$CWD/Manifest" ]; then
# 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 $1 }'`"
+ 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"
diff --git a/trunk/src/mkbuild b/trunk/src/mkbuild
index 9ab57a6..6e4e8de 100755
--- a/trunk/src/mkbuild
+++ b/trunk/src/mkbuild
@@ -795,6 +795,11 @@ function update_manifest {
update_manifest_info $WORK/slack-required
fi
+ # Add source code information
+ DIST_SRC_NAME="`eval "echo $CONST_STRING"`" # we need this to strip some escape strings
+ DIST_SRC_NAME="`eval "echo $DIST_SRC_NAME"`" # twice does the job
+ update_manifest_info $DIST_SRC_NAME dist
+
# Update patches
for i in `find $WORK | grep -E '(.diff$|.diff.gz$|.diff.bz2$|.patch$|.patch.gz$|.patch.bz2$)\*{0,1}$'`; do
if [ ! -d "$WORK/$i" ]; then
@@ -804,16 +809,11 @@ function update_manifest {
# Update miscelaneous information
for i in `find $WORK | grep -E -v '(SlackBuild|old|slack-required|.mkbuild$|.tmp$|Manifest$)\*{0,1}$'`; do
- if [ ! -d "$WORK/$i" ]; then
+ if [ ! -d "$WORK/$i" ] && [ "`basename $i`" != "$DIST_SRC_NAME" ]; then
update_manifest_info $i misc
fi
done
- # Add source code information
- DIST_SRC_NAME="`eval "echo $CONST_STRING"`" # we need this to strip some escape strings
- DIST_SRC_NAME="`eval "echo $DIST_SRC_NAME"`" # twice does the job
- update_manifest_info $DIST_SRC_NAME dist
-
}
# ----------------------------------------------------------------