]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
várias mudanças: lspkg, createpkg, mkbuild, common.sh, simplepkg.conf.new, generic...
authorrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>
Wed, 28 Nov 2007 17:36:31 +0000 (17:36 +0000)
committerrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>
Wed, 28 Nov 2007 17:36:31 +0000 (17:36 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@458 04377dda-e619-0410-9926-eae83683ac58

trunk/conf/simplepkg.conf.new
trunk/lib/common.sh
trunk/mkbuild/generic.mkSlackBuild
trunk/mkbuild/model.mkbuild
trunk/src/createpkg
trunk/src/lspkg
trunk/src/mkbuild

index b5eb5e77acb96242d537962ec40cd7c4d4aa1e79..465a78c13697864bc0e0d793e8178c07f246af23 100644 (file)
@@ -129,12 +129,18 @@ TEMPLATE_STORAGE_STYLE="own-folder"
 # Set SlackBuilds default directory from scripts
 SLACKBUILDS_DIR="/var/simplepkg/slackbuilds"
 
+# Set mkbuild default directory from parameters files
+MKBUILDS_DIR="/var/simplepkg/mkbuild"
+
+# Set SlackBuilds svn default repository
+SLACKBUILDS_SVN="svn://slack.sarava.org/slackbuilds"
+
+# Set mkbuilds svn default repository
+MKBUILDS_SVN="svn://slack.sarava.org/slackbuilds"
+
 # Set binaries default repository directory
 MAKEPKG_REPOS="/var/simplepkg/repos"
 
-# Set mkbuild default repository directory
-MKBUILD_REPOS="/var/simplepkg/mkbuild"
-
 # Set sources default directory
 SOURCE_DIR="/var/simplepkg/sources"
 
index 91f715ffcaf9c4cc593cd6fcafbefa8db4cca946..ef5d62a5786006f6cad21f467f423bfcec57de36 100644 (file)
@@ -689,6 +689,156 @@ function gen_meta {
 
 }
 
+# -----------------------------------------------
+#                 Error functions
+# -----------------------------------------------
+function error_codes {
+
+  # Slackbuilds error codes ** not change **
+  ERROR_WGET=31       # wget error
+  ERROR_MAKE=32       # make source error
+  ERROR_INSTALL=33    # make install error
+  ERROR_MD5=34        # md5sum error
+  ERROR_CONF=35       # ./configure error
+  ERROR_HELP=36       # dasable
+  ERROR_TAR=37        # tar error
+  ERROR_MKPKG=38      # makepkg error
+  ERROR_GPG=39        # gpg check error
+  ERROR_PATCH=40      # patch error
+  ERROR_VCS=41        # cvs error
+  ERROR_MKDIR=42      # make directory error
+  # Slackbuilds error codes ** not change **
+
+  # Commum error codes
+  ERROR_FILE_NOTFOUND=100                   # file not found
+
+  # Createpkg error codes
+  ERROR_CREATEPKG_INSTALLPKG=200            # installpkg error
+  ERROR_CREATEPKG_DEPENDENCY=201            # dependency error
+  ERROR_CREATEPKG_SLACKBUILD_NOTFOUND=202   # Script or package not found
+
+  # Mkbuild error codes
+  ERROR_MKBUILD_FILE_NOT_FOUND=500
+  ERROR_MKBUILD_CONSTRUCTION=501
+  ERROR_MKBUILD_PROGRAM=502
+  ERROR_MKBUILD_INPUT_PAR=503
+
+}
+
+function handle_error {
+
+  # This function deals with internal createpkg errors
+  # and also with non-zero exit codes from slackbuilds
+  # Input:    $1 - error code
+  # Output:   Error mensage
+  #
+  # check slackbuild exit status are:
+  #
+  # ERROR_WGET=31;      ERROR_MAKE=32;      ERROR_INSTALL=33
+  # ERROR_MD5=34;       ERROR_CONF=35;      ERROR_HELP=36
+  # ERROR_TAR=37;       ERROR_MKPKG=38      ERROR_GPG=39
+  # ERROR_PATCH=40;     ERROR_VCS=41;       ERROR_MKDIR=42
+  #
+
+  # we don't want to process when exit status = 0
+  [ "$1" == "0" ] && return
+
+  # Exit codes
+  case $1 in
+    #
+    # Slackbuilds errors
+    $ERROR_WGET)
+      eecho $error "$BASENAME: error downloading source/package for $2" ;;
+    $ERROR_MAKE)
+      eecho $error "$BASENAME: error compiling $2 source code" ;;
+    $ERROR_INSTALL)
+      eecho $error "$BASENAME: error installing $2" ;;
+    $ERROR_MD5)
+      eecho $error "$BASENAME: error on source code integrity check for $2" ;;
+    $ERROR_CONF)
+      eecho $error "$BASENAME: error configuring the source code for $2" ;;
+    $ERROR_HELP)
+      exit 0 ;; # its supposed to never happen here :P
+    $ERROR_TAR)
+      eecho $error "$BASENAME: error decompressing source code for $2" ;;
+    $ERROR_MKPKG)
+      eecho $error "$BASENAME: error creating package $2" ;;
+    $ERROR_GPG)
+      eecho $error "$BASENAME: error verifying GPG signature the source code for $2" ;;
+    $ERROR_PATCH)
+      eecho $error "$BASENAME: error patching the source code for $2" ;;
+    $ERROR_VCS)
+      eecho $error "$BASENAME: error downloading $2 source from version control system" ;;
+    $ERROR_MKDIR)
+      eecho $error "$BASENAME: make directory $2 error, aborting" ;;
+    #
+    # General errors
+    $ERROR_FILE_NOTFOUND)
+      eecho $error "$BASENAME: file $2 not found!" ;;
+    #
+    # Createpkg errors
+    $ERROR_CREATEPKG_INSTALLPKG)
+      eecho $error "$BASENAME: install package $2 error, aborting" ;;
+    $ERROR_CREATEPKG_DEPENDENCY)
+      eecho $error "$BASENAME: dependency solve error, aborting" ;;
+    $ERROR_CREATEPKG_SLACKBUILD_NOTFOUND)
+      eecho $error "$BASENAME: SlackBuild or package not found" ;;
+    #
+    # Mkbuild errors
+    $ERROR_MKBUILD_CONSTRUCTION)
+      eecho $error "$BASENAME: Construction error in $2 variable." ;;
+    $ERROR_MKBUILD_PROGRAM)
+      eecho $error "$BASENAME: Program logical error." ;;
+    $ERROR_MKBUILD_INPUT_PAR)
+      eecho $error "$BASENAME: Input parameter $2 error. See \"mkbuild --help\"." ;;
+    #
+    # Others errors
+    *)
+      eecho $error "$BASENAME: unknown error or user interrupt" ;;
+  esac
+
+  exit $1
+
+}
+
+# -----------------------------------------------
+#                 svn functions
+# -----------------------------------------------
+function build_repo {
+
+  # Checkout a new slackbuild working copy
+  # input: $1 - svn directory name
+  #        $2 - svn address
+  [ $# -ne 2 ] && exit 5
+  SVN_BASEDIR="`dirname $1`"
+  mkdir -p $SVN_BASEDIR || exit 4
+  cd $SVN_BASEDIR
+  svn checkout $2
+  cd $1
+
+}
+
+function check_repo {
+
+  # Verify if repository exist
+  # input: $1 - svn directory name
+  #        $2 - svn address
+  [ $# -ne 2 ] && exit 5
+  [ ! -d "$1" ] && build_repo $1 $2
+
+}
+
+function sync_repo {
+
+  # Synchronize repository
+  # input: $1 - svn directory name
+  #        $2 - svn address
+  [ $# -ne 2 ] && exit 5
+  cd $1
+  svn update || build_repo $1 $2
+
+}
+
 # -----------------------------------------------
 #                 misc functions
 # -----------------------------------------------
@@ -733,7 +883,6 @@ function color_select {
 
 }
 
-
 function eecho {
 
   # echoes a message
@@ -744,3 +893,14 @@ function eecho {
 
 }
 
+function is_number {
+
+    # Check if $1 is a number
+    local -i int
+    if [ $# -eq 0 ]; then
+        return 1
+    else
+        (let int=$1)  2>/dev/null
+        return $?       # Exit status of the let thread
+    fi
+}
index 72f891794d85f07a1070d1bc87c40658d8296caa..6e9e2220f9b054c2bb73aafe50cff0ab2f748e13 100644 (file)
@@ -50,7 +50,7 @@ TMP=${TMP:=/tmp}
 PKG=${PKG:=$TMP/package-$PKG_NAME}
 REPOS=${REPOS:=$TMP}
 PREFIX=${PREFIX:=[[PREFIX]]}
-PKG_SRC="$TMP/$SRC_NAME-$SRC_VERSION"
+PKG_WORK="$TMP/$SRC_NAME"
 CONF_OPTIONS=${CONF_OPTIONS:="[[OTHER CONFIGURE ARGS]]"}
 NUMJOBS=${NUMJOBS:="[[NUMBER OF JOBS]]"}
 </set_variables>
@@ -90,6 +90,8 @@ rm -rf "$PKG" 2> /dev/null
 mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
 mkdir -p "$PKG" || exit $ERROR_MKDIR
 mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
+
 </start_structure>
 
 <download_source> off
@@ -138,8 +140,9 @@ gpg --verify "$SRC_DIR/$SRC.sig" "$SRC_DIR/$SRC" || exit $ERROR_GPG
 
 <untar_source> off
 # Untar
-cd "$TMP"
+cd "$PKG_WORK"
 [[UNPACKER]] [[UNPACKER FLAGS]] "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC=`ls -l | awk '/^d/ { print $8 }'`
 cd "$PKG_SRC"
 </untar_source>
 
index c6953dbf911f43a0b4f51563ca1e9001aff9c84e..1e7fa693ab6fe3726f8789c62b5835cc929f02fd 100644 (file)
@@ -2,17 +2,17 @@
 # Personal variables
 #--------------------
 # Author name
-[[SLACKBUILD AUTHOR]]="Your name"
+[[SLACKBUILD AUTHOR]]="[[YOUR NAME]]"
 
 # Initials author name
-[[SLACKBUILD AUTHOR INITIALS]]="initials"
+[[SLACKBUILD AUTHOR INITIALS]]="[[YOUR SIGNATURE]]"
 
 #------------------------
 # Construction Variables
 #------------------------
 #
 # Complete URL address or URL base address ( without $SRC_NAME-$VERSION... )
-[[DOWNLOAD FOLDER URL]]="http://downloads.sourceforge.net/[[NAME]]/"
+[[DOWNLOAD FOLDER URL]]="[[DEFAULT URL]]/[[PACKAGE NAME]]/"
 
 # Source base name. if different from package name. Null ("") to default value.
 # Auto-set, get SRC_NAME from URL: http://.../$SRC_NAME-$VERSION.tar.$EXTENSION'
@@ -23,9 +23,9 @@
 [[PACKAGE NAME]]=""
 
 #
-# Source Name construction string
-# Default value is: $SRC_NAME-$VERSION.tar.$EXTENSION
-[[SOURCE NAME CONSTRUCTION STRING]]="$SRC_NAME-$VERSION.tar.$EXTENSION"
+# Package default ARCH
+# Default set is i486
+[[ARCH]]=""
 
 #
 # Package version.  Null ("") to auto-set.
 # Auto-set, get EXTENSION from URL: http://.../$SRC_NAME-$VERSION.tar.$EXTENSION'
 [[EXTENSION]]=""
 
+#
+# Source Name construction string
+# Default value is: $SRC_NAME-$VERSION.tar.$EXTENSION
+[[SOURCE NAME CONSTRUCTION STRING]]="$SRC_NAME-$VERSION.tar.$EXTENSION"
+
 #
 # Unpacker programa ("") to auto-set. Default "tar"
 # Unpacke Flags ("") to auto-set. Default flags to tar "--no-same-owner --no-same-permissions -xvf"
@@ -131,15 +136,15 @@ off: postinstall_script
 # Sections changes
 #------------------
 #>slackdesc
-[[NAME]]: [[NAME]] by Slack.Sarava
-[[NAME]]:
-[[NAME]]:
-[[NAME]]:
-[[NAME]]:
-[[NAME]]:
-[[NAME]]:
-[[NAME]]:
-[[NAME]]:
-[[NAME]]:
-[[NAME]]:
+[[PACKAGE NAME]]: [[PACKAGE NAME]] by Slack.Sarava
+[[PACKAGE NAME]]:
+[[PACKAGE NAME]]:
+[[PACKAGE NAME]]:
+[[PACKAGE NAME]]:
+[[PACKAGE NAME]]:
+[[PACKAGE NAME]]:
+[[PACKAGE NAME]]:
+[[PACKAGE NAME]]:
+[[PACKAGE NAME]]:
+[[PACKAGE NAME]]:
 #<slackdesc
index 03c25d02483fd1501aef17f198dd27f0e3c17746..2f647a7ddc03027a0b0e0f404e2fdc1d72dada0e 100644 (file)
 #               Createpkg functions
 #---------------------------------------------------
 
-CREATEPKG_VERSION="1.1.5"
-
-function error_codes {
-
-    # Slackbuilds error codes
-    ERROR_WGET=31       # wget error
-    ERROR_MAKE=32       # make source error
-    ERROR_INSTALL=33    # make install error
-    ERROR_MD5=34        # md5sum error
-    ERROR_CONF=35       # ./configure error
-    ERROR_HELP=36       # dasable
-    ERROR_TAR=37        # tar error
-    ERROR_MKPKG=38      # makepkg error
-    ERROR_GPG=39        # gpg check error
-    ERROR_PATCH=40      # patch error
-    ERROR_VCS=41        # cvs error
-    ERROR_MKDIR=42      # make directory error
-
-    # Createpkg error codes
-    ERROR_INSTPKG=200    # installpkg error
-    ERROR_DEPEN=201      # dependency error
-    SCRIPT_OR_PACKAGE_NOT_FOUND=202     # Script or package not found
-}
-
-function handle_error {
-
-    # This function deals with internal createpkg errors
-    # and also with non-zero exit codes from slackbuilds
-    # Input:    $1 - error code
-    # Output:   Error mensage
-    #
-    # check slackbuild exit status are:
-    #
-    # ERROR_WGET=31;      ERROR_MAKE=32;      ERROR_INSTALL=33
-    # ERROR_MD5=34;       ERROR_CONF=35;      ERROR_HELP=36
-    # ERROR_TAR=37;       ERROR_MKPKG=38      ERROR_GPG=39
-    # ERROR_PATCH=40;     ERROR_VCS=41;       ERROR_MKDIR=42
-    #
-    # thanks to rudsonalves at yahoo.com.br for this spec.
-
-    # we don't want to process when exit status = 0
-    [ "$1" == "0" ] && return
-
-    # Exit codes
-    case $1 in
-        2)  usage ;;
-        3)  eecho $alert "$BASENAME: could not update the repository $2" ;;
-        4)  eecho $alert "$BASENAME: could not create folder $2" ;;
-        5)  eecho $alert "$BASENAME: script not found for $2" ;;
-        $ERROR_WGET)
-            eecho $error "$BASENAME: error downloading source/package for $2" ;;
-        $ERROR_MAKE)
-            eecho $error "$BASENAME: error compiling $2 source code" ;;
-        $ERROR_INSTALL)
-            eecho $error "$BASENAME: error installing $2" ;;
-        $ERROR_MD5)
-            eecho $error "$BASENAME: error on source code integrity check for $2" ;;
-        $ERROR_CONF)
-            eecho $error "$BASENAME: error configuring the source code for $2" ;;
-        $ERROR_HELP)
-            exit 0 ;; # its supposed to never happen here :P
-        $ERROR_TAR)
-            eecho $error "$BASENAME: error decompressing source code for $2" ;;
-        $ERROR_MKPKG)
-            eecho $error "$BASENAME: error creating package $2" ;;
-        $ERROR_GPG)
-            eecho $error "$BASENAME: error verifying GPG signature the source code for $2" ;;
-        $ERROR_PATCH)
-            eecho $error "$BASENAME: error patching the source code for $2" ;;
-        $ERROR_VCS)
-            eecho $error "$BASENAME: error downloading $2 source from version control system" ;;
-        $ERROR_MKDIR)
-            eecho $error "$BASENAME: make directory $2 error, aborting" ;;
-        $ERROR_INSTPKG)
-            eecho $error "$BASENAME: install package $2 error, aborting" ;;
-        $ERROR_DEPEN)
-            eecho $error "$BASENAME: dependency solve error, aborting" ;;
-        *)  eecho $error "$BASENAME: unknown error or user interrupt" ;;
-        $SCRIPT_OR_PACKAGE_NOT_FOUND)
-            eecho $error "$BASENAME: SlackBuild or package not found" ;;
-    esac
-
-    exit $1
-
-}
-
-function build_repo {
-
-    # Checkout a new slackbuild working copy
-    BASEDIR="`dirname $SLACKBUILDS_DIR`"
-    mkdir -p $BASEDIR || handle_error 4 $BASEDIR
-    cd $BASEDIR
-    svn checkout $SVN
-    cd $SLACKBUILDS_DIR
-
-}
+CREATEPKG_VERSION="1.1.8"
 
 function usage {
 
@@ -134,6 +39,7 @@ function usage {
     eecho $commun "       createpkg --list/-l"
     eecho $commun "       createpkg --sync"
     eecho $commun "       createpkg --help/-h"
+    exit
 }
 
 function check_config {
@@ -150,7 +56,7 @@ function check_config {
     [ ! -e $MAKEPKG_REPOS ] && mkdir -p $MAKEPKG_REPOS
     #
     SLACKBUILDS_DIR=${SLACKBUILDS_DIR:=/var/slackbuilds}
-    SVN=${SVN:=svn://slack.sarava.org/slackbuilds}
+    #
     SYNC=${SYNC:=$no}
     SYNC=`convert_boolean $SYNC`
     BASEDIR="`dirname $SLACKBUILDS_DIR`"
@@ -180,14 +86,13 @@ function solve_dep {
             EXIT_CODE="$?"
 
             if [ "$EXIT_CODE" == "5" ]; then
-
                 # exit code 5 == slackbuild not found
                 # try to use simplaret
                 ARCH=$CREATE_ARCH simplaret --update
                 ARCH=$CREATE_ARCH simplaret --install $PACK
                 EXIT_CODE="$?"
                 if [ "$EXIT_CODE" != "0" ]; then
-                    handle_error $SCRIPT_OR_PACKAGE_NOT_FOUND $PACK
+                    handle_error $ERROR_CREATEPKG_SLACKBUILD_NOTFOUND $PACK
                 fi
 
             elif [ "$EXIT_CODE" != "0" ]; then
@@ -199,22 +104,6 @@ function solve_dep {
 
 }
 
-function check_repo {
-
-    # Verify if repository exist
-    [ ! -d "$SLACKBUILDS_DIR" ] && build_repo
-
-}
-
-function sync_repo {
-
-    # Synchronize repository
-    cd $SLACKBUILDS_DIR
-    svn update || build_repo
-    #simplaret --update
-
-}
-
 function find_slackbuild {
 
     # Find SlackBuild script in the repository
@@ -295,6 +184,7 @@ function load_parameters {
     MAKEPKG_REPOS="`eval_parameter MAKEPKG_REPOS /var/simplaret/repos`"
     SOURCE_DIR="`eval_parameter SOURCE_DIR /var/simplaret/sources`"
     SLACKBUILDS_DIR="`eval_parameter SLACKBUILDS_DIR /var/simplaret/slackbuilds`"
+    SLACKBUILDS_SVN="`eval_parameter SLACKBUILDS_DIR svn://slack.sarava.org/slackbuilds`"
 
     COLOR_MODE="`eval_parameter COLOR_MODE none`"
     CREATE_ARCH="`eval_parameter CREATE_ARCH $(default_arch)`"
@@ -323,7 +213,6 @@ set_constants
 
 # Load simplepkg.conf variables
 load_parameters
-#eval_config $BASENAME
 
 # Loading error codes
 error_codes
@@ -348,35 +237,35 @@ fi
 BASENAME="`basename $0`[$CREATEPKG_CHILD]"
 
 check_config
-check_repo
+check_repo $SLACKBUILDS_DIR $SLACKBUILDS_SVN
 
 INSTALL=$off
 NO_DEPS=$off
 
 case $1 in
     '--search'|'-s')
-        [ $# -ne 2 ] && handle_error 2   # two parameters is required
+        [ $# -ne 2 ] && usage   # two parameters is required
         find_slackbuild $2
         exit
     ;;
     '--info'|'-f')
-        [ $# -ne 2 ] && handle_error 2   # two parameters is required
+        [ $# -ne 2 ] && usage   # two parameters is required
         PKG_PATH=`find_slackbuild $2`
         info_builds
         exit
     ;;
     '--install'|'-i')
-        [ $# -ne 2 ] && handle_error 2   # two parameters is required
+        [ $# -ne 2 ] && usage   # two parameters is required
         PACKAGE="$2"
         INSTALL=$on
     ;;
     '--no-deps'|'-nd')
-        [ $# -ne 2 ] && handle_error 2   # two parameters is required
+        [ $# -ne 2 ] && usage   # two parameters is required
         NO_DEPS=$on
         PACKAGE="$2"
     ;;
     '--sync')
-        sync_repo
+        sync_repo $SLACKBUILDS_DIR $SLACKBUILDS_SVN
         exit 0
     ;;
     '--help'|'-h'|'')
@@ -391,20 +280,20 @@ case $1 in
         if [ "${1:0:1}" != "-" ]; then
             PACKAGE="$1"
         else
-            handle_error 2
+            usage
         fi
     ;;
 esac
 
 # Synchronize repository
-[ $SYNC -eq $yes ] && sync_repo
+[ $SYNC -eq $yes ] && sync_repo $SLACKBUILDS_DIR $SLACKBUILDS_SVN
 
 # Get SlackBuild script
 BUILD_SCRIPT="`find_slackbuild $PACKAGE`"
 
 # Check SlackBuild script found
 if [ -z "$BUILD_SCRIPT" ]; then
-    handle_error 5 $PACKAGE
+    handle_error $ERROR_CREATEPKG_SLACKBUILD_NOTFOUND $PACKAGE
 fi
 
 # Select one SlackBuild
index 01900f266e977d588a316d0af62fb710939e702d..c62399c108a0c9adedcb4fa5068724b64c596ce8 100755 (executable)
@@ -76,8 +76,10 @@ case $1 in
             else
                 if [ ! -z "$ROOT" ]; then
                     echo "$2: package not found on /$ROOT/var/log/packages"
+                    exit 1
                 else
                     echo "$2: package not found on /var/log/packages"
+                    exit 1
                 fi
             fi
         else
@@ -124,8 +126,10 @@ case $1 in
         else
             if [ ! -z "$ROOT" ]; then
                 echo "$1: package not found on /$ROOT/var/log/packages"
+                exit 1
             else
                 echo "$1: package not found on /var/log/packages"
+                exit 1
             fi
         fi
     ;;
index 0a024f192bc47ad2b4d93bae203ddb870de62b9a..fa8f828fb88f134d3ba347e88b47854b26bfb331 100755 (executable)
@@ -18,8 +18,8 @@
 #
 # Based in model generic.SlackBuild of Luiz
 #
-# Version 1.1.4
-PROG_VERSION=1.1.4
+# Version 1.1.8
+PROG_VERSION=1.1.8
 PROG_NAME=`basename $0`
 
 #--------------------------------------------------------------------
@@ -64,8 +64,12 @@ DESCRIPTION
         Program options:
         -h, --help
             this help mesage
-        -c, --commit
+        -cs, --commit-slackbuild
             commit SlackBuilds in local svn SlackBuild tree
+        -cm, --commit-mkbuild
+            commit .mkbuild in local svn mkbuild tree
+        -c, --commit-all
+            commit SlackBuild and .mkbuild files in local svn tree
         -n, --new <mkbuild_name>
             start a new mkbuild configure file
         -v, --version
@@ -97,42 +101,6 @@ COPYRIGHT
 " | less
 }
 
-function error_codes {
-
-    # Start error codes function
-    NULL_STRING=499
-    ERROR_FILE_NOT_FOUND=500
-    ERROR_CONSTRUCTION=501
-    ERROR_PROGRAM=502
-    ERROR_INPUT_PAR=503
-}
-
-function mkbuild_error {
-
-    # Error function
-    case $1 in
-        "$ERROR_FILE_NOT_FOUND")
-            echo "File $2 not found!"
-        ;;
-        "$ERROR_CONSTRUCTION")
-            echo "Construction error in $2 variable."
-        ;;
-        "$ERROR_PROGRAM")
-            echo "Program logical error."
-        ;;
-        "$ERROR_INPUT_PAR")
-            echo "Input parameter $2 error. See \"mkbuild --help\"."
-        ;;
-        "$NULL_STRING")
-            mkbuild_use
-        ;;
-        *)
-            echo "Unknow error!"
-        ;;
-    esac
-    exit $1
-}
-
 function set_parameters {
 
     # Get and set mkbuild variables with parameters input
@@ -143,15 +111,24 @@ function set_parameters {
     # Parameters analyze
     while [ "$1" ]; do
         case $1 in
-            '-c'|'--commit')
-                # Commit directory
-                COMMIT=$on
+            '-cs'|'--commit-slackbuild')
+                # Commit SlackBuild file
+                COMMIT_SLACKBUILD=$on
+            ;;
+            '-cm'|'--commit-mkbuild')
+                # commit mkbuild file
+                COMMIT_MKBUILD=$on
+            ;;
+            '-c'|'--commit-all')
+                # Commit SlackBuild and mkbuild file
+                COMMIT_SLACKBUILD=$on
+                COMMIT_MKBUILD=$on
             ;;
             '-n'|'--new')
                 # New mkbuild configure file
                 let i++
                 MKBUILD_NAME=$2
-                [ ${MKBUILD_NAME:0:1} = "-" ] && mkbuild_error $ERROR_INPUT_PAR "--new <mkbuild_name>"
+                [ ${MKBUILD_NAME:0:1} = "-" ] && handle_error $ERROR_MKBUILD_INPUT_PAR "--new <mkbuild_name>"
                 shift
             ;;
             '-d'|'--debug')
@@ -174,36 +151,36 @@ function set_parameters {
                 # Enter with author name
                 let i++
                 AUTHOR=$2
-                [ ${AUTHOR:0:1} = "-" ] && mkbuild_error $ERROR_INPUT_PAR AUTHOR
+                [ ${AUTHOR:0:1} = "-" ] && handle_error $ERROR_MKBUILD_INPUT_PAR AUTHOR
                 shift
             ;;
             '-ai'|'--author_initials')
                 # Enter with author name
                 let i++
                 AUTHOR_INITIALS=$2
-                [ ${AUTHOR_INITIALS:0:1} = "-" ] && mkbuild_error $ERROR_INPUT_PAR AUTHOR_INITIALS
+                [ ${AUTHOR_INITIALS:0:1} = "-" ] && handle_error $ERROR_MKBUILD_INPUT_PAR AUTHOR_INITIALS
                 shift
             ;;
             '-cs'|'--const_string')
                 # Enter with construction source name string
                 let i++
                 CONST_STRING=$2
-                [ ${CONST_STRING:0:1} = "-" ] && mkbuild_error $ERROR_INPUT_PAR CONST_STRING
+                [ ${CONST_STRING:0:1} = "-" ] && handle_error $ERROR_MKBUILD_INPUT_PAR CONST_STRING
                 shift
             ;;
             '-md'|'--model')
                 # Enter with SlackBuild model
                 let i++
                 MODEL=$2
-                [ ${MODEL:0:1} = "-" ] && mkbuild_error $ERROR_INPUT_PAR MODEL
+                [ ${MODEL:0:1} = "-" ] && handle_error $ERROR_MKBUILD_INPUT_PAR MODEL
                 shift
             ;;
             '-j'|'--jobs')
                 # Enter with SlackBuild model
                 let i++
                 NUMJOBS=$2
-                [ ${NUMJOBS:0:1} = "-" ] && mkbuild_error $ERROR_INPUT_PAR NUMJOBS
-                [ ! is_number $NUMJOBS ] &&  mkbuild_error $ERROR_INPUT_PAR NUMJOBS
+                [ ${NUMJOBS:0:1} = "-" ] && handle_error $ERROR_MKBUILD_INPUT_PAR NUMJOBS
+                [ ! is_number $NUMJOBS ] &&  handle_error $ERROR_MKBUILD_INPUT_PAR NUMJOBS
                 NUMJOBS="-j$NUMJOBS"
                 shift
             ;;
@@ -211,41 +188,41 @@ function set_parameters {
                 # Enter with SlackBuild model
                 let i++
                 PREFIX=$2
-                [ ${PREFIX:0:1} = "-" ] && mkbuild_error $ERROR_INPUT_PAR PREFIX
+                [ ${PREFIX:0:1} = "-" ] && handle_error $ERROR_MKBUILD_INPUT_PAR PREFIX
                 shift
             ;;
             '-pn'|'--pkg_name')
                 # Enter with package name
                 let i++
                 PKG_NAME=$2
-                [ ${PKG_NAME:0:1} = "-" ] && mkbuild_error $ERROR_INPUT_PAR PKG_NAME
+                [ ${PKG_NAME:0:1} = "-" ] && handle_error $ERROR_MKBUILD_INPUT_PAR PKG_NAME
                 shift
             ;;
             '-pv'|'pkg_version')
                 # Enter with package version
                 let i++
                 VERSION=$2
-                [ ${VERSION:0:1} = "-" ] && mkbuild_error $ERROR_INPUT_PAR VERSION
+                [ ${VERSION:0:1} = "-" ] && handle_error $ERROR_MKBUILD_INPUT_PAR VERSION
                 shift
             ;;
             '-sn'|'--src_name')
                 # Enter with source name
                 let i++
                 SRC_NAME=$2
-                [ ${SRC_NAME:0:1} = '-' ] && mkbuild_error $ERROR_INPUT_PAR SRC_NAME
+                [ ${SRC_NAME:0:1} = '-' ] && handle_error $ERROR_MKBUILD_INPUT_PAR SRC_NAME
                 shift
             ;;
             '-u'|'--url')
                 # Enter with url address
                 let i++
                 URL=$2
-                [ ${URL:0:1} = '-' ] && mkbuild_error $ERROR_INPUT_PAR URL
+                [ ${URL:0:1} = '-' ] && handle_error $ERROR_MKBUILD_INPUT_PAR URL
                 shift
             ;;
             *)
                 # mkbuild input file
                 MK_INPUT_FILE="${1//.mkbuild}.mkbuild"
-                [ ! -e $MK_INPUT_FILE ] && mkbuild_error $ERROR_FILE_NOT_FOUND $MK_INPUT_FILE
+                [ ! -e $MK_INPUT_FILE ] && handle_error $ERROR_FILE_NOTFOUND $MK_INPUT_FILE
             ;;
         esac
         shift
@@ -255,7 +232,7 @@ function set_parameters {
 function get_variable {
 
     # Get variable value from mkbuild file (MK_INPUT_FILE)
-    [ $# -ne 1 ] && mkbuild_error $ERROR_PROGRAM
+    [ $# -ne 1 ] && handle_error $ERROR_MKBUILD_PROGRAM
     [ -z $MK_INPUT_FILE ] && echo "Warning: no [mkbuild_file]." && return 0
 
     grep "^\[\[${1}\]\]" $MK_INPUT_FILE | cut -f2- -d= | sed -e 's/^"//' -e 's/"$//'
@@ -267,7 +244,7 @@ function edit_file {
     local STR_OLD
     local STR_NEW
 
-    [ $# -ne 3 ] && mkbuild_error $ERROR_PROGRAM
+    [ $# -ne 3 ] && handle_error $ERROR_MKBUILD_PROGRAM
     STR_OLD=$( echo $1 | sed 's/\//\\\//g' )
     STR_NEW=$( echo $2 | sed 's/\//\\\//g' )
     eval "sed 's/\[\[$STR_OLD\]\]/$STR_NEW/' $3 > $AUX_TMP"
@@ -280,7 +257,7 @@ function edit_file_full {
     local STR_OLD
     local STR_NEW
 
-    [ $# -ne 3 ] && mkbuild_error $ERROR_PROGRAM
+    [ $# -ne 3 ] && handle_error $ERROR_MKBUILD_PROGRAM
     STR_OLD=$( echo $1 | sed 's/\//\\\//g' )
     STR_NEW=$( echo $2 | sed 's/\//\\\//g' )
     eval "sed 's/$STR_OLD/$STR_NEW/' $3 > $AUX_TMP"
@@ -290,7 +267,7 @@ function edit_file_full {
 function start_build  {
 
     # Build initial sections
-    [ $# -ne 1 ] && mkbuild_error $ERROR_PROGRAM
+    [ $# -ne 1 ] && handle_error $ERROR_MKBUILD_PROGRAM
 
     edit_file "SLACKBUILD AUTHOR" "$AUTHOR" $1
     edit_file "SLACKBUILD AUTHOR INITIALS" $AUTHOR_INITIALS $1
@@ -301,7 +278,6 @@ function start_build  {
     edit_file "DECOMPRESSOR TEST FLAG" "$DECOMPRESSOR_TEST_FLAG" $1
     edit_file "PROGRAM URL" "$URL" $1
     edit_file "ARCH" "$ARCH" $1
-    [ `is_number $NUMJOBS` ] && NUMJOBS="-j${NUMJOBS}"
     edit_file "NUMBER OF JOBS" "$NUMJOBS" $1
     edit_file "VERSION" $VERSION $1
     edit_file "SOURCE NAME CONSTRUCTION STRING" "$CONST_STRING" $1
@@ -330,7 +306,7 @@ function set_status {
     # $1 - Section
     # $2 - Status
     # $3 - file
-    [ $# -ne 3 ] && mkbuild_error $ERROR_PROGRAM
+    [ $# -ne 3 ] && handle_error $ERROR_MKBUILD_PROGRAM
     if [ "`get_status $1 $3`" != "all" ]; then
         [ $VERBOSE -eq $on ] && echo "Section $1 $2"
         eval "sed 's/^<$1>.*$/<$1> $2/' $3" > $AUX_TMP
@@ -345,7 +321,7 @@ function get_status {
     # Get status from section
     # $1 - Section
     # $2 - file
-    [ $# -ne 2 ] && mkbuild_error $ERROR_PROGRAM
+    [ $# -ne 2 ] && handle_error $ERROR_MKBUILD_PROGRAM
     eval "sed '/^<$1>.*$/! d' $2"
 }
 
@@ -418,7 +394,7 @@ function slackdesc_edit {
 function section_change {
 
     # Change section lines
-    [ $# -ne 1 ] && mkbuild_error $ERROR_PROGRAM
+    [ $# -ne 1 ] && handle_error $ERROR_MKBUILD_PROGRAM
 
     # Copy first half
     eval "sed '1,/^<$1>/! d' $SLACKBUILD_TEMP > $AUX_TMP"
@@ -472,15 +448,12 @@ function commit_slackbuild {
         echo "Only root can commit SlackBuilds..."
         return 1
     fi
+    echo -e "\nCommit $SLACKBUILD"
 
     # check SlackBuilds directory
     [ ! -e $SLACKBUILDS_DIR ] && createpkg --sync
 
     # Get SlackBuild path
-    # Get SlackBuild path in parameter file
-    SLACKBUILD_PATH=`validate_parameter "$SLACKBUILD_PATH" "SLACKBUILD PATH" ""`
-    [ $VERBOSE -eq $on ] && echo "[[SLACKBUILD PATH]]=\"$SLACKBUILD_PATH\""
-
     # Get SlackBuild path in slackbuild local tree
     if [ -z $SLACKBUILD_PATH ]; then
         SLACKBUILD_PATH=`find $SLACKBUILDS_DIR -name $SLACKBUILD | xargs dirname` 2>/dev/null
@@ -517,17 +490,18 @@ function commit_mkbuild {
         echo "Only root can commit mkbuild..."
         return 1
     fi
+    echo -e "\nCommit $MK_INPUT_FILE"
 
     # check mkbuild directory
-    [ ! -e $MKBUILD_REPOS ] && createpkg --sync
+    [ ! -e $MKBUILDS_DIR ] && build_repo $MKBUILDS_DIR $MKBUILDS_SVN
 
     # Get mkbuild path in parameter file
     MKBUILD_PATH=`validate_parameter "$SLACKBUILD_PATH" "SLACKBUILD PATH" ""`
-    [ $VERBOSE -eq $on ] && echo "[[SLACKBUILD PATH]]=\"$SLACKBUILD_PATH\""
+    #[ $VERBOSE -eq $on ] && echo "[[SLACKBUILD PATH]]=\"$SLACKBUILD_PATH\""
 
     # Get mkbuild path in slackbuild local tree
     if [ -z $MKBUILD_PATH ]; then
-        MKBUILD_PATH=`find $MKBUILD_REPOS -name $MKBUILD_NAME | xargs dirname` 2>/dev/null
+        MKBUILD_PATH=`find $MKBUILDS_DIR -name $MK_INPUT_FILE | xargs dirname` 2>/dev/null
     fi
 
     # Get SlackBuild path in gentoo-portage tree
@@ -545,7 +519,7 @@ function commit_mkbuild {
     # check path
     [ ! -e $MKBUILD_PATH ] && svn_mkdir $MKBUILD_PATH
     # add SlackBuild
-    svn_add $MKBUILD_NAME $MKBUILD_PATH
+    svn_add $MK_INPUT_FILE $MKBUILD_PATH
 
     cd $WORK
 }
@@ -553,9 +527,8 @@ function commit_mkbuild {
 function svn_mkdir {
 
     # svn make directory
-    [ $# -ne 1 ] && mkbuild_error 0
+    [ $# -ne 1 ] && handle_error 0
 
-    echo "svn_mkdir $1  $2"
     DIR_LIST=`echo $1 | tr '/' ' '`
 
     DIR=""
@@ -568,7 +541,7 @@ function svn_mkdir {
 function svn_add {
 
     # svn add file
-    [ $# -ne 2 ] && mkbuild_error 0
+    [ $# -ne 2 ] && handle_error 0
 
     # copy file
     if [ -e $2/$1 ]; then
@@ -584,27 +557,17 @@ function svn_add {
 # ----------------------------------------------------------------
 # ------------------- general functions --------------------------
 
-function is_number {
-
-    # Check if $1 is a number
-    local -i int
-    if [ $# -eq 0 ]; then
-        return 1
-    else
-        (let int=$1)  2>/dev/null
-        return $?       # Exit status of the let thread
-    fi
-}
-
 function validate_parameter {
 
     # Validate parameter in .mkbuild file
+    [ $# -ne 3 ] && return 1
+
     if [ ! -z "$1" ]; then
         echo "$1"
     else
         local STRING="`get_variable "$2"`"
         if [ -z "$STRING" ]; then
-            [ ! -z "$3" ] && echo "$3" || return 1
+            echo "$3"
         else
             echo "$STRING"
         fi
@@ -628,7 +591,7 @@ function decompress_find {
             DECOMPRESSOR_TEST_FLAG="-t"
         ;;
         *)
-            mkbuild_error $ERROR_CONSTRUCTION "DECOMPRESSOR"
+            handle_error $ERROR_MKBUILD_CONSTRUCTION "DECOMPRESSOR"
         ;;
     esac
 }
@@ -636,8 +599,10 @@ function decompress_find {
 function load_parameters {
 
     # Load Createpkg parameters
-    MKBUILD_REPOS="`eval_parameter MAKEPKG_REPOS /var/simplaret/repos`"
     SLACKBUILDS_DIR="`eval_parameter SLACKBUILDS_DIR /var/simplaret/slackbuilds`"
+    MKBUILDS_DIR="`eval_parameter MKBUILDS_DIR /var/simplaret/mkbuilds`"
+    SLACKBUILDS_SVN="`eval_parameter SLACKBUILDS_DIR svn://slack.sarava.org/slackbuilds`"
+    MKBUILDS_SVN="`eval_parameter MKBUILDS_SVN svn://slack.sarava.org/mkbuilds`"
 
     COLOR_MODE="`eval_parameter COLOR_MODE none`"
 }
@@ -650,6 +615,7 @@ function load_parameters {
 # Common functions
 COMMON_SH="/usr/libexec/simplepkg/common.sh"
 SIMPLEPKG_CONF="/etc/simplepkg/simplepkg.conf"
+BASENAME="`basename $0`"
 WORK=`pwd`
 LANG=en_US
 
@@ -657,14 +623,15 @@ if [ -f "$COMMON_SH" ]; then
   source $COMMON_SH
 else
   echo "error: file $COMMON_SH not found. Check your $BASENAME installation"
-  mkbuild_error 0
+  handle_error 0
 fi
 
 # Start constants
 set_constants
 
 # Set commit off
-COMMIT=$off
+COMMIT_SLACKBUILD=$off
+COMMIT_MKBUILD=$off
 # Set verbose off
 VERBOSE=$off
 
@@ -681,33 +648,42 @@ SLACKDESC_LEN=78
 # Load error codes
 error_codes
 
-[ $# -eq 0 ] && mkbuild_error $NULL_STRING
+[ $# -eq 0 ] && mkbuild_use && exit 1
 
 # Configure input parameters
 set_parameters $@
 
 [ $VERBOSE -eq $on ] && echo -e "$PROG_NAME version $PROG_VERSION\n"
-
 if [ ! -z $MKBUILD_NAME ]; then
-    # Start new mkbuild config-file
+    # Create a new .mkbuild parameters-file
     cp $MODEL_DIR/model.mkbuild ${MKBUILD_NAME}.mkbuild
-    edit_file "NAME" "${MKBUILD_NAME}" ${MKBUILD_NAME}.mkbuild
-    edit_file "NAME" "${MKBUILD_NAME}" ${MKBUILD_NAME}.mkbuild
+    # Package Author
+    [ -z $AUTHOR ] && edit_file "YOUR NAME" "${AUTHOR}" ${MKBUILD_NAME}.mkbuild
+    # Package Author Signature
+    [ -z $AUTHOR_INITIAL ] && edit_file "YOUR SIGNATURE" "${AUTHOR_INITIAL}" ${MKBUILD_NAME}.mkbuild
+    # Change Default SourceForge URL
+    [ -z $URL ] && URL="http://downloads.sourceforge.net/[[PACKAGE NAME]]"
+    edit_file "DEFAULT URL" "${URL}" ${MKBUILD_NAME}.mkbuild
+    # Change Package Name
+    edit_file "PACKAGE NAME" "${MKBUILD_NAME}" ${MKBUILD_NAME}.mkbuild
+    edit_file "PACKAGE NAME" "${MKBUILD_NAME}" ${MKBUILD_NAME}.mkbuild
+
+    # Print .mkbuild name
     echo "${MKBUILD_NAME}.mkbuild"
 else
     # Get values
     # Author name
     AUTHOR=${AUTHOR:="`get_variable "SLACKBUILD AUTHOR"`"}
-    [ -z "$AUTHOR" ] && mkbuild_error $ERROR_CONSTRUCTION "SLACKBUILD AUTHOR"
+    [ -z "$AUTHOR" ] && handle_error $ERROR_MKBUILD_CONSTRUCTION "SLACKBUILD AUTHOR"
     [ $VERBOSE -eq $on ] && echo "[[SLACKBUILD AUTHOR]]=\"$AUTHOR\""
 
     # Author initials
     STR_MOUNT=`echo $AUTHOR | sed 's/ /\n/g' | sed 's/^\([A-Z]\).*/\1/' | sed ':i; $!N;  s/\n//; ti' | tr [A-Z] [a-z]`
-    AUTHOR_INITIALS="`validate_parameter "$AUTHOR_INITIALS" "SLACKBUILD AUTHOR INITIALS" "$STR_MOUNT"`" || mkbuild_error $ERROR_CONSTRUCTION "SLACKBUILD AUTHOR INITIALS"
+    AUTHOR_INITIALS="`validate_parameter "$AUTHOR_INITIALS" "SLACKBUILD AUTHOR INITIALS" "$STR_MOUNT"`" || handle_error $ERROR_MKBUILD_CONSTRUCTION "SLACKBUILD AUTHOR INITIALS"
     [ $VERBOSE -eq $on ] && echo "[[SLACKBUILD AUTHOR INITIALS]]=\"$AUTHOR_INITIALS\""
 
     # URL program
-    URL=`validate_parameter "$URL" "DOWNLOAD FOLDER URL" ""` || mkbuild_error $ERROR_CONSTRUCTION "URL"
+    URL=`validate_parameter "$URL" "DOWNLOAD FOLDER URL" ""` || handle_error $ERROR_MKBUILD_CONSTRUCTION "URL"
     [ $VERBOSE -eq $on ] && echo "[[URL]]=\"$URL\""
 
     STR_MOUNT="`echo $URL | rev | cut -c1-3 | rev | tr -d '.'`"
@@ -720,16 +696,16 @@ else
     [ $VERBOSE -eq $on ] && echo "[[DOWNLOAD FOLDER URL]]=\"$URL_BASE\""
 
     # Extension
-    EXTENSION=`validate_parameter "$EXTENSION" "EXTENSION" "$STR_MOUNT"` || mkbuild_error $ERROR_CONSTRUCTION "EXTENSION"
+    EXTENSION=`validate_parameter "$EXTENSION" "EXTENSION" "$STR_MOUNT"` || handle_error $ERROR_MKBUILD_CONSTRUCTION "EXTENSION"
     [ $VERBOSE -eq $on ] && echo "[[EXTENSION]]=\"$EXTENSION\""
 
     # Unpacker
-    UNPACKER=`validate_parameter "$UNPACKER" "UNPACKER" "tar"` || mkbuild_error $ERROR_CONSTRUCTION "UNPACKER"
+    UNPACKER=`validate_parameter "$UNPACKER" "UNPACKER" "tar"` || handle_error $ERROR_MKBUILD_CONSTRUCTION "UNPACKER"
     [ $VERBOSE -eq $on ] && echo "[[UNPACKER]]=\"$UNPACKER\""
 
     # Unpacker flags
-    [ "$UNPACKER"=="tar" ] && STR_MOUNT="--no-same-owner --no-same-permissions -xvf" || STRING=""
-    UNPACKER_FLAGS=`validate_parameter "$UNPACKER_FLAGS" "UNPACKER FLAGS" "$STR_MOUNT"` || mkbuild_error $ERROR_CONSTRUCTION "UNPACKER FLAGS"
+    [ "$UNPACKER" == "tar" ] && STR_MOUNT="--no-same-owner --no-same-permissions -xvf" || STR_MOUNT=""
+    UNPACKER_FLAGS=`validate_parameter "$UNPACKER_FLAGS" "UNPACKER FLAGS" "$STR_MOUNT"` || handle_error $ERROR_MKBUILD_CONSTRUCTION "UNPACKER FLAGS"
     [ $VERBOSE -eq $on ] && echo "[[UNPACKER_FLAGS]]=\"$UNPACKER_FLAGS\""
 
     # Build archteture
@@ -738,7 +714,7 @@ else
 
     # Source name
     STR_MOUNT=`echo $SOURCE_NAME | sed -r 's/(.*)-(.*)\.(.*\..*)$/\1/'`
-    SRC_NAME=`validate_parameter "$SRC_NAME" "SOURCE NAME" "$STR_MOUNT"` || mkbuild_error $ERROR_CONSTRUCTION "SOURCE NAME"
+    SRC_NAME=`validate_parameter "$SRC_NAME" "SOURCE NAME" "$STR_MOUNT"` || handle_error $ERROR_MKBUILD_CONSTRUCTION "SOURCE NAME"
     [ $VERBOSE -eq $on ] && echo "[[SOURCE NAME]]=\"$SRC_NAME\""
 
     # Package name
@@ -748,7 +724,7 @@ else
 
     # Version
     STR_MOUNT=`echo $SOURCE_NAME | sed -r 's/(.*)-(.*)\.(.*\..*)$/\2/'`
-    VERSION=`validate_parameter "$VERSION" "VERSION" $STR_MOUNT` || mkbuild_error $ERROR_CONSTRUCTION "VERSION"
+    VERSION=`validate_parameter "$VERSION" "VERSION" $STR_MOUNT` || handle_error $ERROR_MKBUILD_CONSTRUCTION "VERSION"
     [ $VERBOSE -eq $on ] && echo "[[VERSION]]=\"$VERSION\""
 
     # Construction source name string
@@ -760,10 +736,11 @@ else
     [ $VERBOSE -eq $on ] && echo "SOURCE_NAME=\"$SOURCE_NAME\""
 
     # Decompressor program and test flag
-    DECOMPRESSOR=`validate_parameter "$DECOMPRESSOR" "DECOMPRESSOR" ""` || decompress_find
+    DECOMPRESSOR=`validate_parameter "$DECOMPRESSOR" "DECOMPRESSOR" ""`
+    [ -z $DECOMPRESSOR ] && decompress_find
     [ $VERBOSE -eq $on ] && echo "[[DECOMPRESSOR]]=\"$DECOMPRESSOR\""
 
-    DECOMPRESSOR_TEST_FLAG=`validate_parameter "$DECOMPRESSOR_TEST_FLAG" "DECOMPRESSOR TEST FLAG" ""` || mkbuild_error $ERROR_CONSTRUCTION "DECOMPRESSOR TEST FLAG"
+    DECOMPRESSOR_TEST_FLAG=`validate_parameter "$DECOMPRESSOR_TEST_FLAG" "DECOMPRESSOR TEST FLAG" ""` || handle_error $ERROR_MKBUILD_CONSTRUCTION "DECOMPRESSOR TEST FLAG"
     [ $VERBOSE -eq $on ] && echo "[[DECOMPRESSOR TEST FLAG]]=\"$DECOMPRESSOR_TEST_FLAG\""
 
     # Documentations list
@@ -780,6 +757,7 @@ else
 
     # Number of jobs
     NUMJOBS=`validate_parameter "$NUMJOBS" "NUMBER OF JOBS" ""`
+    [ `is_number $NUMJOBS` ] && NUMJOBS="-j${NUMJOBS}"
     [ $VERBOSE -eq $on ] && echo "[[NUMBER OF JOBS]]=\"$NUMJOBS\""
 
     # Make slack-required file
@@ -790,8 +768,13 @@ else
     MODEL=`validate_parameter "$MODEL" "SLACKBUILD MODEL" "generic.mkSlackBuild"`
     [ $VERBOSE -eq $on ] && echo "[[SLACKBUILD MODEL]]=\"$MODEL\""
 
-    #
-    # Start build SlackBuild
+    # SlackBuild path
+    SLACKBUILD_PATH=`validate_parameter "$SLACKBUILD_PATH" "SLACKBUILD PATH" ""`
+    [ $VERBOSE -eq $on ] && echo "[[SLACKBUILD PATH]]=\"$SLACKBUILD_PATH\""
+
+    #--------------------------------------------------------------
+    #-                   Start build SlackBuild                   -
+    #--------------------------------------------------------------
     [ $VERBOSE -eq $on ] && echo -e "\nStart SlackBuild make"
     SLACKBUILD=${PKG_NAME}.SlackBuild
     SLACKBUILD_TEMP=$SLACKBUILD.tmp
@@ -829,7 +812,10 @@ else
     change_others_parameters
 
     # Commit SlackBuild
-    [ $COMMIT -eq $on ] && commit_slackbuild
+    [ $COMMIT_SLACKBUILD -eq $on ] && commit_slackbuild
+
+    # Commit mkbuild
+    [ $COMMIT_MKBUILD -eq $on ] && commit_mkbuild
 fi
 
 # Clear temporary files