]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
minor changes at Manifest implementation
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Sun, 21 Dec 2008 16:08:21 +0000 (16:08 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Sun, 21 Dec 2008 16:08:21 +0000 (16:08 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@692 04377dda-e619-0410-9926-eae83683ac58

trunk/mkbuild/generic.mkSlackBuild
trunk/src/mkbuild

index a9173e83653e02a2b20747026609fc49b11e22ba..e3c27dc9a2f7964911c907cf53f07d240d38013f 100644 (file)
@@ -278,7 +278,7 @@ if [ -e "$CWD/Manifest" ]; then
       MANIFEST_FILE="`find $CWD -name $MANIFEST_FILE`"
     fi
 
-    if [ ! -e "$MANIFEST_FILE" ]; then
+    if [ ! -e "$MANIFEST_FILE" ] || [ -d "$MANIFEST_FILE" ]; then
       continue
     fi
 
index 72c970f22b256af0179c46e14231689a7fb54545..11532ac5bd4348fe2ed9bd2abec49ee71a1ea0b0 100755 (executable)
@@ -512,7 +512,7 @@ function make_slack_required {
 
 }
 
-function change_others_parameters {
+function change_other_parameters {
 
   # Change others parameters started by '[[' in .mkbuild file
   sed '1,/#>>/ ! d' $MKBUILD_NAME | grep -v '^#' | grep '^\[\[[A-Za-z]' | \
@@ -729,10 +729,15 @@ function file_metainfo {
   # get integrity file metainformation
   # usage: file_metainfo <file> <file_type>
 
-  local size algo sum="" file="$1" file_type="$2"
+  local size algo sum="" file="$1" file_type="`echo $2 | tr '[:lower:]' '[:upper:]'`"
 
-  if [ ! -e "$file" ] || [ -z "$file_type" ]; then
-    return 1
+  if [ -z "$file_type" ]; then
+    file_type="AUX"
+  fi
+
+  if [ ! -e "$file" ]; then
+    echo "$file_type `basename $file` " # end space is important
+    [ $VERBOSE -eq $on ] && echo "Adding blank information for $file on Manifest. Please fix this."
   fi
 
   for algo in md5 sha1 sha256 sha512 rmd160; do
@@ -745,15 +750,11 @@ function file_metainfo {
 
 function update_manifest_info {
 
-  # update Manifest meatinfo for a given file
+  # update Manifest metainfo for a given file
   # usage: update_manifest_info <file> <file_type>
 
   local tmpfile file="$1" file_type="`echo $2 | tr '[:lower:]' '[:upper:]'`"
 
-  if [ ! -e "$file" ]; then
-    return 1
-  fi
-
   if [ -z "$file_type" ]; then
     file_type="`file_extension $file | tr '[:lower:]' '[:upper:]'`"
   fi
@@ -802,6 +803,9 @@ function update_manifest {
     fi
   done
 
+  # Add source code information
+  update_manifest $CONST_STRING dist
+
 }
 
 # ----------------------------------------------------------------
@@ -1055,7 +1059,7 @@ if [ ! -z $MKBUILD_NAME ]; then
 
       # Others changes
       [ $VERBOSE -eq $on ] && echo -e "\nEdit others [[]] parameters ..."
-      change_others_parameters
+      change_other_parameters
 
       # Update Manifest file
       update_manifest