]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
atualizações ao mkbuild e ao modelo .mkSlackBuild
authorrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>
Sun, 21 Oct 2007 23:26:09 +0000 (23:26 +0000)
committerrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>
Sun, 21 Oct 2007 23:26:09 +0000 (23:26 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@450 04377dda-e619-0410-9926-eae83683ac58

trunk/mkbuild/generic.mkSlackBuild
trunk/mkbuild/model.mkbuild
trunk/mkbuild/sample-Pyrex-large.mkbuild
trunk/mkbuild/sample-Pyrex-small.mkbuild
trunk/src/mkbuild

index 7c8620c778e3bafd069080ff29dbb4e65e13ce9d..777deac4bd57bdbf874a5ad6fcc71bee7bbea79c 100644 (file)
@@ -4,7 +4,7 @@
 ## Version 0.8.1 - Luis ( luis at riseup d0t net)
 ##
 ###################################################
-<head> all
+<head> off
 #!/bin/bash
 #
 #  [[PROGRAM NAME]].SlackBuild is free software; you can redistribute
@@ -36,7 +36,7 @@ elif [ -f /etc/slackbuildrc ]; then
 fi
 </slackbuildrc>
 
-<set_variables> all
+<set_variables> off
 # Set variables
 CWD="$(pwd)"
 SRC_NAME="[[SOURCE NAME]]"
@@ -55,7 +55,7 @@ CONF_OPTIONS=${CONF_OPTIONS:="[[OTHER CONFIGURE ARGS]]"}
 NUMJOBS=${NUMJOBS:="[[NUMBER OF JOBS]]"}
 </set_variables>
 
-<slkflags> all
+<slkflags> off
 # Set system libraries' path and optmization flags based on $ARCH
 LIBDIR="$PREFIX/lib"
 
@@ -81,7 +81,7 @@ ERROR_TAR=37;       ERROR_MKPKG=38;     ERROR_GPG=39
 ERROR_PATCH=40;     ERROR_VCS=41;       ERROR_MKDIR=42
 </error_codes>
 
-<start_structure> all
+<start_structure> off
 # Clean up any leftovers of previous builds
 rm -rf "$PKG_SRC" 2> /dev/null
 rm -rf "$PKG" 2> /dev/null
@@ -136,14 +136,14 @@ fi
 gpg --verify "$SRC_DIR/$SRC.sig" "$SRC_DIR/$SRC" || exit $ERROR_GPG
 </gpg_signature_check>
 
-<untar_source> all
+<untar_source> off
 # Untar
 cd "$TMP"
 tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
 cd "$PKG_SRC"
 </untar_source>
 
-<path_source> off
+<patch_source> off
 # Patch source
 patches="[[PATCH FILES]]
          $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
@@ -155,7 +155,7 @@ for patch in $patches; do
     patch -Np[[NUMBER OF PREFIX SLASHES TO STRIP]] < "$CWD/patches/$patch" || exit $ERROR_PATCH
   fi
 done
-</path_source>
+</patch_source>
 
 <configure> off
 # Configure
@@ -165,12 +165,12 @@ CFLAGS="$SLKCFLAGS" \
   --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
 </configure>
 
-<make_package> all
+<make_package> off
 # Compile
 make $NUMJOBS || exit $ERROR_MAKE
 </make_package>
 
-<install_package> all
+<install_package> off
 # Install
 make install DESTDIR="$PKG" || exit $ERROR_INSTALL
 </install_package>
@@ -256,7 +256,7 @@ config path/to/config_file.new
 EOSCRIPT
 </postinstall_script>
 
-<build_package> all
+<build_package> off
 # Build the package
 cd "$PKG"
 makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
index 02877f873fdb0c1f246731892043a8e899dff670..3fb88c0efdb2cbd4c87f22013b13691470af25e2 100644 (file)
 #---------------------
 # SlackBuild Sections
 #---------------------
-# Default enable sections:
+# Default sections:
 #      head, set_variables, slkflags, start_structure, untar_source,
 #      make_package, install_package, build_package
 # Warning: don't remove '#>>' and "#<<" tags.
 #>> Start SlackBuild Sections:
-#all: head
+ on: head
  on: slackbuildrc
-#all: set_variables
+ on: set_variables
  on: slkflags
  on: error_codes
-#all: start_structure
+ on: start_structure
  on: download_source
-#off: md5sum_download_and_check_0
-#off: md5sum_download_and_check_1
-#off: gpg_signature_check
-#all: untar_source
-#off: path_source
+off: md5sum_download_and_check_0
+off: md5sum_download_and_check_1
+off: gpg_signature_check
+ on: untar_source
+off: patch_source
  on: configure
-#all: make_package
-#all: install_package
+ on: make_package
+ on: install_package
  on: strip_binaries
-#off: compress_manpages
-#off: compress_info_files
+off: compress_manpages
+off: compress_info_files
  on: install_documentation
  on: slackdesc
-#off: postinstall_script
-#all: build_package
+off: postinstall_script
+ on: build_package
  on: clean_builds
 #<< End SlackBuild Sections
 
index 4001238b3336ea3b23b83fa19aca00537441207e..bbcf7e6fe142a064297ab649f85401e8e9c96969 100644 (file)
 #---------------------
 # SlackBuild Sections
 #---------------------
-# Default enable sections:
+# Default sections:
 #      head, set_variables, slkflags, start_structure, untar_source,
 #      make_package, install_package, build_package
 # Warning: don't remove '#>>' and "#<<" tags.
 #>> Start SlackBuild Sections:
-#all: head
+ on: head
  on: slackbuildrc
-#all: set_variables
+ on: set_variables
  on: slkflags
  on: error_codes
-#all: start_structure
+ on: start_structure
  on: download_source
  on: md5sum_download_and_check_0
-#off: md5sum_download_and_check_1
-#off: gpg_signature_check
-#all: untar_source
-#off: path_source
+off: md5sum_download_and_check_1
+off: gpg_signature_check
+ on: untar_source
+off: path_source
  on: configure
-#all: make_package
-#all: install_package
+ on: make_package
+ on: install_package
  on: strip_binaries
-#off: compress_manpages
-#off: compress_info_files
+off: compress_manpages
+off: compress_info_files
  on: install_documentation
  on: slackdesc
-#off: postinstall_script
-#all: build_package
+off: postinstall_script
+ on: build_package
  on: clean_builds
 #<< End SlackBuild Sections
 
index 83dfca9c99a4a565ccff91cc9b30983cf45037ef..5dcd4b477889415c76b6d7287436d633f5423979 100644 (file)
 [[DOWNLOAD FOLDER URL]]="http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/Pyrex-0.9.5.1a.tar.gz"
 
 #
-# Default enable sections:
+# Default sections:
 #      head, set_variables, slkflags, start_structure, untar_source,
 #      make_package, install_package, build_package
 # Warning: don't remove '#>>' and "#<<" tags.
 #>> Start SlackBuild Sections:
+ on: head
  on: slackbuildrc
+ on: set_variables
  on: slkflags
  on: error_codes
+ on: start_structure
  on: download_source
+ on: md5sum_download_and_check_0
+ on: untar_source
  on: configure
+ on: make_package
+ on: install_package
  on: strip_binaries
  on: install_documentation
  on: slackdesc
+ on: build_package
  on: clean_builds
 #<< End SlackBuild Sections
 
index 172bc9c8b7ac11197857673a9e9fd6ee14c5392e..8572e775592c0a33c877dc52dfde708ab79fc58b 100755 (executable)
@@ -18,8 +18,8 @@
 #
 # Based in model generic.SlackBuild of Luiz
 #
-# Version 1.0.4
-PROG_VERSION=1.0.4
+# Version 1.0.5
+PROG_VERSION=1.0.5
 PROG_NAME=`basename $0`
 
 #--------------------------------------------------------------------
@@ -139,16 +139,10 @@ function set_parameters {
     # Use: set_parameters $@
     #           where $@ are the parameters input
     #
-    ALL_PAR=( $@ )      # all parameters
-    N_PAR=$#            # number of parameters
 
-    i=0                 # start counter
-
-    # analyze all the parameters
-    while [ $i -lt $N_PAR ]; do
-        # get parameter[i]
-        PAR=${ALL_PAR[$i]}
-        case $PAR in
+    # Parameters analyze
+    while [ "$1" ]; do
+        case $1 in
             '-c'|'--commit')
                 # Commit directory
                 COMMIT=$on
@@ -156,8 +150,9 @@ function set_parameters {
             '-n'|'--new')
                 # New mkbuild configure file
                 let i++
-                MKBUILD_NAME=${ALL_PAR[$i]}
+                MKBUILD_NAME=$2
                 [ ${MKBUILD_NAME:0:1} = "-" ] && mkbuild_error $ERROR_INPUT_PAR "--new <mkbuild_name>"
+                shift
             ;;
             '-d'|'--debug')
                 # Debug mode
@@ -178,72 +173,82 @@ function set_parameters {
             '-a'|'--author')
                 # Enter with author name
                 let i++
-                AUTHOR=${ALL_PAR[$i]}
+                AUTHOR=$2
                 [ ${AUTHOR:0:1} = "-" ] && mkbuild_error $ERROR_INPUT_PAR AUTHOR
+                shift
             ;;
             '-ai'|'--author_initials')
                 # Enter with author name
                 let i++
-                AUTHOR_INITIALS=${ALL_PAR[$i]}
+                AUTHOR_INITIALS=$2
                 [ ${AUTHOR_INITIALS:0:1} = "-" ] && mkbuild_error $ERROR_INPUT_PAR AUTHOR_INITIALS
+                shift
             ;;
             '-cs'|'--const_string')
                 # Enter with construction source name string
                 let i++
-                CONST_STRING=${ALL_PAR[$i]}
+                CONST_STRING=$2
                 [ ${CONST_STRING:0:1} = "-" ] && mkbuild_error $ERROR_INPUT_PAR CONST_STRING
+                shift
             ;;
             '-md'|'--model')
                 # Enter with SlackBuild model
                 let i++
-                MODEL=${ALL_PAR[$i]}
+                MODEL=$2
                 [ ${MODEL:0:1} = "-" ] && mkbuild_error $ERROR_INPUT_PAR MODEL
+                shift
             ;;
             '-j'|'--jobs')
                 # Enter with SlackBuild model
                 let i++
-                NUMJOBS=${ALL_PAR[$i]}
+                NUMJOBS=$2
                 [ ${NUMJOBS:0:1} = "-" ] && mkbuild_error $ERROR_INPUT_PAR NUMJOBS
                 [ ! is_number $NUMJOBS ] &&  mkbuild_error $ERROR_INPUT_PAR NUMJOBS
                 NUMJOBS="-j$NUMJOBS"
+                shift
             ;;
             '--prefix')
                 # Enter with SlackBuild model
                 let i++
-                PREFIX=${ALL_PAR[$i]}
+                PREFIX=$2
                 [ ${PREFIX:0:1} = "-" ] && mkbuild_error $ERROR_INPUT_PAR PREFIX
+                shift
             ;;
             '-pn'|'--pkg_name')
                 # Enter with package name
                 let i++
-                PKG_NAME=${ALL_PAR[$i]}
+                PKG_NAME=$2
                 [ ${PKG_NAME:0:1} = "-" ] && mkbuild_error $ERROR_INPUT_PAR PKG_NAME
+                shift
             ;;
             '-pv'|'pkg_version')
                 # Enter with package version
                 let i++
-                VERSION=${ALL_PAR[$i]}
+                VERSION=$2
                 [ ${VERSION:0:1} = "-" ] && mkbuild_error $ERROR_INPUT_PAR VERSION
+                shift
             ;;
             '-sn'|'--src_name')
                 # Enter with source name
                 let i++
-                SRC_NAME=${ALL_PAR[$i]}
+                SRC_NAME=$2
                 [ ${SRC_NAME:0:1} = '-' ] && mkbuild_error $ERROR_INPUT_PAR SRC_NAME
+                shift
             ;;
             '-u'|'--url')
                 # Enter with url address
                 let i++
-                URL=${ALL_PAR[$i]}
+                URL=$2
                 [ ${URL:0:1} = '-' ] && mkbuild_error $ERROR_INPUT_PAR URL
+                shift
             ;;
             *)
                 # mkbuild input file
-                MK_INPUT_FILE="${PAR//.mkbuild}.mkbuild"
+                MK_INPUT_FILE="${1//.mkbuild}.mkbuild"
                 [ ! -e $MK_INPUT_FILE ] && mkbuild_error $ERROR_FILE_NOT_FOUND $MK_INPUT_FILE
             ;;
         esac
-        let i++
+        shift
     done
 }