aboutsummaryrefslogtreecommitdiff
path: root/trunk
diff options
context:
space:
mode:
Diffstat (limited to 'trunk')
-rw-r--r--trunk/conf/simplepkg.conf.new28
-rw-r--r--trunk/install/doinst.sh2
-rw-r--r--trunk/lib/common.sh74
-rw-r--r--trunk/mkbuild/generic.mkSlackBuild.new (renamed from trunk/conf/generic.mkSlackBuild.new)54
-rw-r--r--trunk/mkbuild/sample-Pyrex-large.mkbuild156
-rw-r--r--trunk/mkbuild/sample-Pyrex-small.mkbuild43
-rwxr-xr-xtrunk/simplepkg.SlackBuild13
-rw-r--r--trunk/src/createpkg146
-rwxr-xr-xtrunk/src/mkbuild144
9 files changed, 504 insertions, 156 deletions
diff --git a/trunk/conf/simplepkg.conf.new b/trunk/conf/simplepkg.conf.new
index 50ea4ad..70aa70b 100644
--- a/trunk/conf/simplepkg.conf.new
+++ b/trunk/conf/simplepkg.conf.new
@@ -34,7 +34,7 @@ SIMPLARET_DOWNLOAD_FROM_NEXT_REPO="1"
# Wheter delete also patches when simplaret --purge is called;
# to enable it, set to "1" or "yes"
-SIMPLARET_PURGE_PATCHES="1"
+SIMPLARET_PURGE_PATCHES="0"
# Whether delete each package rigth after its installation;
# to enable it, set to "1" or "yes"
@@ -55,11 +55,11 @@ PASSIVE_FTP="1"
# Http retrieval tool;
# available parameters are "wget" or "curl"
-HTTP_TOOL="curl"
+HTTP_TOOL="wget"
# Ftp retrieval tool;
# available parameters are "wget", "curl" or "ncftpget"
-FTP_TOOL="curl"
+FTP_TOOL="wget"
# Set connection timeout in seconds
CONNECT_TIMEOUT="20"
@@ -127,26 +127,28 @@ TEMPLATE_STORAGE_STYLE="own-folder"
# MKBUILD AND CREATEPKG SECTION
#---------------------------------------------------------------------
# Set SlackBuilds default directory from scripts
-SLACKBUILDS_DIR="/var/slackbuilds"
+SLACKBUILDS_DIR="/var/simplaret/slackbuilds"
# Set binaries default repository directory
-#MAKEPKG_REPOS="/var/createpkg"
+MAKEPKG_REPOS="/var/simplaret/repos"
# Set sources default directory
-#SOURCE_DIR="/var/sources"
+SOURCE_DIR="/var/simplaret/sources"
# Set color style
# possible values are: color,gray, none
-#COLOR_MODE="none"
+COLOR_MODE="none"
+
+# Createpkg architecture
+CREATE_ARCH="i486"
+
+# Remove build files
+CREATE_CLEANUP="yes"
# Remove old packages from repository tree by createpkg
-# 0 enable
-# 1 desable
-#REMOVE_OLD_PACKAGE=1
+REMOVE_OLD_PACKAGE="off"
# Move package to SlackBuilds-like tree
-# 0 enable
-# 1 desable
-#MOVE_BIN_PACKAGE=1
+MOVE_BIN_PACKAGE="off"
#---------------------------------------------------------------------
diff --git a/trunk/install/doinst.sh b/trunk/install/doinst.sh
index a61648e..a9d11ce 100644
--- a/trunk/install/doinst.sh
+++ b/trunk/install/doinst.sh
@@ -1,3 +1,3 @@
( if [ ! -f "etc/simplepkg/simplepkg.conf" ]; then mv etc/simplepkg/simplepkg.conf.new etc/simplepkg/simplepkg.conf; fi )
( if [ ! -f "etc/simplepkg/repos.conf" ]; then mv etc/simplepkg/repos.conf.new etc/simplepkg/repos.conf; fi )
-( if [ ! -f "etc/simplepkg/generic.mkslackbuild" ]; then mv etc/simplepkg/generic.mkSlackBuild.new etc/simplepkg/generic.mkSlackBuild; fi )
+( if [ ! -f "etc/simplepkg/defaults/mkbuild/generic.mkSlackBuild" ]; then mv etc/simplepkg/defaults/mkbuild/generic.mkSlackBuild.new etc/simplepkg/defaults/mkbuild/generic.mkSlackBuild; fi )
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh
index 8d2bb2f..6ebd38a 100644
--- a/trunk/lib/common.sh
+++ b/trunk/lib/common.sh
@@ -5,7 +5,7 @@
#
# Uses some functions from pkgtools, which license is:
#
-# Copyright 1999 Patrick Volkerding, Moorhead, Minnesota, USA
+# Copyright 1999 Patrick Volkerding, Moorhead, Minnesota, USA
# Copyright 2001, 2002, 2003 Slackware Linux, Inc., Concord, California, USA
# All rights reserved.
#
@@ -175,6 +175,18 @@ function eval_parameter {
}
+function set_constants {
+
+ # Set common constants
+ # on/off
+ on=1
+ off=0
+ # yes/no
+ yes=1
+ no=0
+
+}
+
function eval_boolean_parameter {
# get a boolean parameter from the configuration
@@ -184,11 +196,17 @@ function eval_boolean_parameter {
# get the value
value="`eval_parameter $1 $2`"
+ convert_boolean $value
+
+}
+
+function convert_boolean {
+
# force case insensitiveness
- value="`echo $value | tr '[:upper:]' '[:lower:]'`"
+ local value="`echo $1 | tr '[:upper:]' '[:lower:]'`"
# convert it to wheter 0 or 1
- if [ "$value" == "yes" ] || [ "$value" == "1" ]; then
+ if [ "$value" == "yes" ] || [ "$value" == "1" ] || [ "$value" == "on" ]; then
echo 1
else
echo 0
@@ -257,6 +275,7 @@ function eval_config {
# now we place "patches" on the top of ROOT_PRIORITY
ROOT_PRIORITY="patches `echo $ROOT_PRIORITY | sed -e 's/patches//'`"
+
else
echo $1 error: config file $CONFIG not found
exit 1
@@ -271,7 +290,7 @@ function eval_config {
fi
if [ -z "$ARCH" ]; then
- ARCH="$DEFAULT_ARCH"
+ ARCH="$DEFAULT_ARCH"
fi
if [ -z "$VERSION" ]; then
@@ -527,7 +546,7 @@ function copy_template_files {
# usage: copy_template_files <jail-path>
if [ -d "$1" ]; then
- if [ -d "$TEMPLATE_BASE.d" ]; then
+ if [ -d "$TEMPLATE_BASE.d" ]; then
echo "Copying template files to $1..."
if use_svn && [ -d "$TEMPLATE_BASE.d/.svn" ]; then
rsync -av --exclude=.svn $TEMPLATE_BASE.d/ $1/
@@ -572,7 +591,6 @@ function svn_add_meta {
}
function gen_filelist {
-
# generate FILELIST.TXT
# usage: gen_filelist
@@ -710,3 +728,47 @@ function slash {
}
+function color_select {
+
+ # Select color mode: gray, color or none (*)
+ # commun - Communication
+ # messag - Commum messages
+ # error - Error messages
+ # normal - turn off color
+ case "$1" in
+ 'gray')
+ commun="\033[37;1m"
+ messag="\033[37;1m"
+ error="\033[30;1m"
+ alert="\033[37m"
+ normal="\033[m"
+ ;;
+ 'color')
+ commun="\033[34;1m" # green
+ messag="\033[32;1m" # blue
+ error="\033[31;1m" # red
+ alert="\033[33;1m" # yellow
+ normal="\033[m" # normal
+ ;;
+ *)
+ commun=""
+ messag=""
+ error=""
+ alert=""
+ normal=""
+ ;;
+ esac
+
+}
+
+
+function eecho {
+
+ # echoes a message
+ # usage: eecho <message-type> <message>
+ # message-type can be: commun, messag, error, normal
+
+ echo -e "${1}${2}${normal}"
+
+}
+
diff --git a/trunk/conf/generic.mkSlackBuild.new b/trunk/mkbuild/generic.mkSlackBuild.new
index 6b5473e..7c8620c 100644
--- a/trunk/conf/generic.mkSlackBuild.new
+++ b/trunk/mkbuild/generic.mkSlackBuild.new
@@ -7,14 +7,27 @@
<head> all
#!/bin/bash
#
-# SlackBuild for [[PROGRAM NAME]]
-# [[PROGRAM URL]]
+# [[PROGRAM NAME]].SlackBuild is free software; you can redistribute
+# it and/or modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the License,
+# or any later version.
#
-# Author: [[SLACKBUILD AUTHOR]]
+# [[PROGRAM NAME]].SlackBuild is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# slackbuild for [[PROGRAM NAME]], by [[SLACKBUILD AUTHOR]]
+# requires: [[REQUIRES]]
+# tested: [[PROGRAM NAME]]-[[VERSION]]
#
</head>
-<slackbuildrc> all
+<slackbuildrc> off
# Look for slackbuildrc
if [ -f ~/.slackbuildrc ]; then
source ~/.slackbuildrc
@@ -38,8 +51,8 @@ PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
PREFIX=${PREFIX:=[[PREFIX]]}
PKG_SRC="$TMP/$SRC_NAME-$SRC_VERSION"
-CONF_OPTIONS=${CONF_OPTIONS:=[[OTHER CONFIGURE ARGS]]}
-NUMJOBS=${NUMJOBS:="-j4"}
+CONF_OPTIONS=${CONF_OPTIONS:="[[OTHER CONFIGURE ARGS]]"}
+NUMJOBS=${NUMJOBS:="[[NUMBER OF JOBS]]"}
</set_variables>
<slkflags> all
@@ -60,7 +73,7 @@ elif [ "$ARCH" = "x86_64" ]; then
fi
</slkflags>
-<error_codes> on
+<error_codes> off
# Set error codes (used by createpkg)
ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
@@ -79,9 +92,9 @@ mkdir -p "$PKG" || exit $ERROR_MKDIR
mkdir -p "$REPOS" || exit $ERROR_MKDIR
</start_structure>
-<download_source> on
+<download_source> off
# Dowload source if necessary
-SRC="$SRC_NAME-$SRC_VERSION.tar.[[SOURCE EXTENSION]]"
+SRC="[[SOURCE NAME CONSTRUCTION STRING]]"
URL="[[DOWNLOAD FOLDER URL]]/$SRC"
if [ ! -s "$SRC_DIR/$SRC" ] || ! [[DECOMPRESSOR]] [[DECOMPRESSOR TEST FLAG]] "$SRC_DIR/$SRC" 2> /dev/null; then
@@ -89,7 +102,14 @@ if [ ! -s "$SRC_DIR/$SRC" ] || ! [[DECOMPRESSOR]] [[DECOMPRESSOR TEST FLAG]] "$S
fi
</download_source>
-<md5sum_download_and_check> off
+<md5sum_download_and_check_0> off
+MD5SUM_SRC="$(md5sum "$SRC_DIR/$SRC" | cut -d " " -f 1)"
+MD5SUM_URL="[[MD5SUM CODE]]"
+
+[ "$MD5SUM_SRC" == "$MD5SUM_URL" ] || exit $ERROR_MD5
+</md5sum_download_and_check_0>
+
+<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
@@ -99,7 +119,7 @@ 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>
+</md5sum_download_and_check_1>
<gpg_signature_check> off
# Import minimized signing key from
@@ -137,12 +157,12 @@ for patch in $patches; do
done
</path_source>
-<configure> on
+<configure> off
# Configure
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
- --prefix="$PREFIX" --libdir="$LIBDIR" "$CONF_OPTIONS" || exit $ERROR_CONF
+ --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
</configure>
<make_package> all
@@ -155,7 +175,7 @@ make $NUMJOBS || exit $ERROR_MAKE
make install DESTDIR="$PKG" || exit $ERROR_INSTALL
</install_package>
-<strip_binaries> on
+<strip_binaries> off
# Strip binaries
( cd "$PKG"
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
@@ -192,14 +212,14 @@ if [ -d "$PKG/$PREFIX/info" ]; then
fi
</compress_info_files>
-<install_documentation> on
+<install_documentation> off
# Install documentation
DOCS="[[DOCUMENTATION FILES]]"
mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
cp -a $DOCS "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
</install_documentation>
-<slackdesc> on
+<slackdesc> off
# Add package description (slack-desc)
mkdir -p "$PKG/install" || exit $ERROR_MKDIR
cat << EODESC > "$PKG/install/slack-desc"
@@ -242,7 +262,7 @@ cd "$PKG"
makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
</build_package>
-<clean_builds> on
+<clean_builds> off
# Delete source and build directories if requested
if [ "$CLEANUP" == "yes" ]; then
rm -rf "$PKG_SRC" "$PKG"
diff --git a/trunk/mkbuild/sample-Pyrex-large.mkbuild b/trunk/mkbuild/sample-Pyrex-large.mkbuild
new file mode 100644
index 0000000..e052eb3
--- /dev/null
+++ b/trunk/mkbuild/sample-Pyrex-large.mkbuild
@@ -0,0 +1,156 @@
+#--------------------
+# Personal variables
+#--------------------
+# Author name
+[[SLACKBUILD AUTHOR]]="Rudson R. Alves"
+
+# Initials author name
+[[SLACKBUILD AUTHOR INITIALS]]="rra"
+
+#------------------------
+# Construction Variables
+#------------------------
+#
+# 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'
+[[SOURCE NAME]]="Pyrex"
+
+# Package name. Null ("") to auto-set
+# Auto-set, get PKG_NAME from URL downcase(SRC_NAME): http://.../$SRC_NAME-$VERSION.tar.$EXTENSION'
+[[PACKAGE NAME]]=""
+
+#
+# Source Name construction string
+# Default value is: $SRC_NAME-$VERSION.tar.$EXTENSION
+#[[SOURCE NAME CONSTRUCTION STRING]]="SOURCE NAME CONSTRUCTION STRING"
+[[SOURCE NAME CONSTRUCTION STRING]]="$SRC_NAME-$VERSION.tar.$EXTENSION"
+
+#
+# Complete URL address or URL base address ( without $SRC_NAME-$VERSION... )
+#[[DOWNLOAD FOLDER URL]]="http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/Pyrex-0.9.5.1a.tar.gz"
+[[DOWNLOAD FOLDER URL]]="http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/"
+
+#
+# Package version. Null ("") to auto-set.
+# Auto-set, get VERSION from URL: http://.../$SRC_NAME-$VERSION.tar.$EXTENSION'
+[[VERSION]]="0.9.5.1a"
+
+#
+# Package extension. Null ("") to auto-set
+# Auto-set, get EXTENSION from URL: http://.../$SRC_NAME-$VERSION.tar.$EXTENSION'
+[[EXTENSION]]="gz"
+
+#
+# Dependency list input
+# Enter string: "dependency_1 [condiction_1] [versio_1]: dependency_2 [condiction_2] [versio_2]"
+# Example:
+[[SLACK REQUIRED]]="dep1 >= 1.1.1: dep2 >= 2.2.2:dep3:dep4:dep5 = 1.0"
+#[[SLACK_REQUIRED]]=""
+
+#
+# Decompress program
+# gz, tgz, bz2, set null ("") to auto-set
+# Auto-set, get DECOMPRESSOR from URL EXTENSION: http://.../$SRC_NAME-$VERSION.tar.$EXTENSION'
+[[DECOMPRESSOR]]=""
+
+#
+# Decompress check flag
+# gz, tgz, bz2, set null ("") to auto-set
+[[DECOMPRESSOR TEST FLAG]]=""
+
+#
+# Documentation files. Null ("") to auto-set commom doc-files:
+# NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING readme.*
+[[DOCUMENTATION FILES]]=""
+
+#
+# ./configure options
+[[OTHER CONFIGURE ARGS]]=""
+
+#
+# PREFIX. Default /usr
+[[PREFIX]]="/usr"
+
+#
+# Number of jobs
+[[NUMBER OF JOBS]]="-j7"
+
+#---------------------
+# Others changes
+#---------------------
+#[[PATCH FILES]]=""
+[[MD5SUM CODE]]="5a1bb7c76162a987a1d5040ea2d1f670"
+#[[MD5SUM EXTENSION]]=""
+#[[SIGNING KEY]]=""
+#[[SIGNING KEY URL]]=""
+#[[PATCH FILES]]=""
+
+# SlackBuild model
+[[SLACKBUILD MODEL]]="generic.mkSlackBuild"
+
+# SlackBuild PATH in Slack.Sarava tree
+[[SLACKBUILD PATH]]="dev/python/pyrex"
+
+#---------------------
+# SlackBuild Sections
+#---------------------
+# Default enable 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: slackbuildrc
+#all: set_variables
+ on: slkflags
+ on: error_codes
+#all: 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
+ on: configure
+#all: make_package
+#all: install_package
+ on: strip_binaries
+#off: compress_manpages
+#off: compress_info_files
+ on: install_documentation
+ on: slackdesc
+#off: postinstall_script
+#all: build_package
+ on: clean_builds
+#<< End SlackBuild Sections
+
+#------------------
+# Sections changes
+#------------------
+#>slackdesc
+pyrex: Pyrex by Slack.Sarava
+pyrex:
+pyrex: Pyrex is a language specially designed for writing Python extension
+pyrex: modules. Its designed to bridge the gap between the nice, high-level,
+pyrex: easy-to-use world of Python and the messy, low-level world of C.
+pyrex:
+pyrex:
+pyrex:
+pyrex:
+pyrex:
+pyrex:
+#<slackdesc
+
+#------------ test section: untar_source -----------------
+#>untar_source
+# Untar program
+
+# Change to temp dir
+cd "$TMP"
+
+# Uncompress e untar source
+gunzip "$SRC_DIR/$SRC" | tar --no-same-owner --no-same-permissions -xvf || exit $ERROR_TAR
+
+# Change to source dir
+cd "$PKG_SRC"
+#<untar_source
diff --git a/trunk/mkbuild/sample-Pyrex-small.mkbuild b/trunk/mkbuild/sample-Pyrex-small.mkbuild
new file mode 100644
index 0000000..953f67b
--- /dev/null
+++ b/trunk/mkbuild/sample-Pyrex-small.mkbuild
@@ -0,0 +1,43 @@
+#--------------------
+# Personal variables
+#--------------------
+# Author name
+[[SLACKBUILD AUTHOR]]="Adalberto Simão Nader"
+
+#
+# Complete URL address or URL base address ( without $SRC_NAME-$VERSION... )
+[[DOWNLOAD FOLDER URL]]="http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/Pyrex-0.9.5.1a.tar.gz"
+
+#
+# Default enable 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: slackbuildrc
+ on: slkflags
+ on: error_codes
+ on: download_source
+ on: configure
+ on: strip_binaries
+ on: install_documentation
+ on: slackdesc
+ on: clean_builds
+#<< End SlackBuild Sections
+
+#------------------
+# Sections changes
+#------------------
+#>slackdesc
+pyrex: Pyrex by Slack.Sarava
+pyrex:
+pyrex: Pyrex is a language specially designed for writing Python extension
+pyrex: modules. Its designed to bridge the gap between the nice, high-level,
+pyrex: easy-to-use world of Python and the messy, low-level world of C.
+pyrex:
+pyrex:
+pyrex:
+pyrex:
+pyrex:
+pyrex:
+#<slackdesc
diff --git a/trunk/simplepkg.SlackBuild b/trunk/simplepkg.SlackBuild
index a9e90e8..9f5feec 100755
--- a/trunk/simplepkg.SlackBuild
+++ b/trunk/simplepkg.SlackBuild
@@ -6,13 +6,13 @@
PACKAGE="simplepkg"
PACK_DIR="package-$PACKAGE"
BUILD=${BUILD:=1rha}
-VERSION="0.5pre22"
+VERSION="0.6"
ARCH="noarch"
LIBEXEC="/usr/libexec/$PACKAGE"
BINDIR="/usr/bin"
BINARY_LIST="simplaret repos lspkg mkbuild"
SBINDIR="/usr/sbin"
-SBINARY_LIST="exec-slackbuild mkjail templatepkg jail-update jail-commit metapkg rebuildpkg createpkg exec-slackbuild"
+SBINARY_LIST="mkjail templatepkg jail-update jail-commit metapkg rebuildpkg createpkg exec-slackbuild"
LIB_LIST="common.sh"
DOC_DIR="/usr/doc"
DOC_LIST="COPYING TODO CHANGELOG README README.pt_BR README.simplaret README.simplaret.pt_BR"
@@ -47,14 +47,13 @@ for file in $DOC_LIST; do
cp doc/$file $PACK_DIR/$DOC_DIR/$PACKAGE-$VERSION/
done
-mkdir -p $PACK_DIR/etc/$PACKAGE/{defaults,templates}
+mkdir -p $PACK_DIR/etc/$PACKAGE/{defaults/mkbuild,templates}
rsync -av --exclude=.svn templates/* $PACK_DIR/etc/$PACKAGE/defaults/templates/
chmod +x $PACK_DIR/etc/$PACKAGE/defaults/templates/vserver/vserver.s/*.sh
chmod +x $PACK_DIR/etc/$PACKAGE/defaults/templates/vserver-legacy/vserver-legacy.s/*.sh
-cp conf/simplepkg.conf.new $PACK_DIR/etc/$PACKAGE
-cp conf/repos.conf.new $PACK_DIR/etc/$PACKAGE
-cp conf/generic.mkSlackBuild.new $PACK_DIR/etc/$PACKAGE
-cp utils/exec-slackbuild $PACK_DIR/$SBINDIR/
+cp conf/simplepkg.conf.new $PACK_DIR/etc/$PACKAGE/
+cp conf/repos.conf.new $PACK_DIR/etc/$PACKAGE/
+cp mkbuild/generic.mkSlackBuild.new $PACK_DIR/etc/$PACKAGE/defaults/mkbuild/
if [ -f "$PACK_DIR/usr/sbin/jail-upgrade" ]; then
cd $PACK_DIR/usr/sbin && ln -s jail-upgrade vserver-upgrade
diff --git a/trunk/src/createpkg b/trunk/src/createpkg
index a80b033..373c8cc 100644
--- a/trunk/src/createpkg
+++ b/trunk/src/createpkg
@@ -31,7 +31,7 @@
# Createpkg functions
#---------------------------------------------------
-CREATEPKG_VERSION="1.0.4.1"
+CREATEPKG_VERSION="1.1.1"
function error_codes {
@@ -55,16 +55,6 @@ function error_codes {
SCRIPT_OR_PACKAGE_NOT_FOUND=202 # Script or package not found
}
-function eecho {
-
- # echoes a message
- # usage: eecho <message-type> <message>
- # message-type can be: commun, messag, error, normal
-
- echo -e "${1}${2}${normal}"
-
-}
-
function handle_error {
# This function deals with internal createpkg errors
@@ -140,7 +130,7 @@ function build_repo {
function usage {
- # Help mensage
+ # Help message
eecho $commun "Createpkg version $CREATEPKG_VERSION\n"
eecho $commun "Usage: createpkg [--install/-i] package-name"
eecho $commun " createpkg --no-deps/-np package-name"
@@ -155,14 +145,15 @@ function check_config {
# check the configuration
TMP=${TMP:=/tmp};
- REPOS=${REPOS:=$TMP};
+ REPOS=${REPOS:=$MAKEPKG_REPOS};
# Create $TMP and $REPOS if need
[ ! -e $TPM ] && mkdir $TMP
[ ! -e $REPOS ] && mkdir $REPOS
#
SLACKBUILDS_DIR=${SLACKBUILDS_DIR:=/var/slackbuilds}
SVN=${SVN:=svn://slack.sarava.org/slackbuilds}
- SYNC=${SYNC:=no}
+ SYNC=${SYNC:=$no}
+ SYNC=`convert_boolean $SYNC`
BASEDIR="`dirname $SLACKBUILDS_DIR`"
}
@@ -184,7 +175,7 @@ function solve_dep {
if [ $CHECK -ne 0 ]; then
# Check package in SlackBuilds tree
eecho $messag "$BASENAME: processing $PACKAGE dependency $PACK"
- SYNC=no CREATEPKG_CHILD=$CREATEPKG_CHILD createpkg --install $PACK
+ SYNC=$no CREATEPKG_CHILD=$CREATEPKG_CHILD createpkg --install $PACK
# check if the package was built and installed
EXIT_CODE="$?"
@@ -193,8 +184,8 @@ function solve_dep {
# exit code 5 == slackbuild not found
# try to use simplaret
- ARCH=$DEFAULT_ARCH simplaret --update
- ARCH=$DEFAULT_ARCH simplaret --install $PACK
+ 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
@@ -220,7 +211,7 @@ function sync_repo {
# Synchronize repository
cd $SLACKBUILDS_DIR
- svn update || build_repo
+ exit # svn update || build_repo
#simplaret --update
}
@@ -299,37 +290,19 @@ function list_builds {
}
-function color_select {
-
- # Select color mode: gray, color or none (*)
- # commun - Communication
- # messag - Commum messages
- # error - Error messages
- # normal - turn off color
- case "$1" in
- 'gray')
- commun="\033[37;1m"
- messag="\033[37;1m"
- error="\033[30;1m"
- alert="\033[37m"
- normal="\033[m"
- ;;
- 'color')
- commun="\033[34;1m" # green
- messag="\033[32;1m" # blue
- error="\033[31;1m" # red
- alert="\033[33;1m" # yellow
- normal="\033[m" # normal
- ;;
- *)
- commun=""
- messag=""
- error=""
- alert=""
- normal=""
- ;;
- esac
+function load_parameters {
+
+ # Load Createpkg 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`"
+
+ COLOR_MODE="`eval_parameter COLOR_MODE none`"
+ CREATE_ARCH="`eval_parameter CREATE_ARCH $(default_arch)`"
+ CREATE_CLEANUP="`eval_boolean_parameter CREATE_CLEANUP $yes`"
+ REMOVE_OLD_PACKAGE="`eval_boolean_parameter REMOVE_OLD_PACKAGE $off`"
+ MOVE_BIN_PACKAGE="`eval_boolean_parameter MOVE_BIN_PACKAGE $off`"
}
#---------------------------------------------------
@@ -338,17 +311,24 @@ function color_select {
# Common functions
COMMON="/usr/libexec/simplepkg/common.sh"
SIMPLEPKG_CONF="/etc/simplepkg/simplepkg.conf"
+BASENAME="`basename $0`"
+
+if [ -f "$COMMON" ]; then
+ source $COMMON
+else
+ echo "error: file $COMMON found, check your $BASENAME installation"
+ mk_exit 0
+fi
+
+set_constants
+
+# Load simplepkg.conf variables
+load_parameters
+#eval_config $BASENAME
# Loading error codes
error_codes
-# First load simplepkg helper functions
-source $COMMON && source $SIMPLEPKG_CONF
-if [ $? -ne 0 ]; then
- eecho $error "error: file $COMMON not found, check your $BASENAME installation"
- exit 1
-fi
-
# Load slackbuildrc definitions
if [ -f ~/.slackbuildrc ]; then
source ~/.slackbuildrc
@@ -357,11 +337,11 @@ else
fi
# Select color mode: gray, color or none (*)
-color_select $COLOR
+color_select $COLOR_MODE
# This is used to show how many children process we have
if [ -z "$CREATEPKG_CHILD" ]; then
- CREATEPKG_CHILD="1"
+ CREATEPKG_CHILD=1
else
let CREATEPKG_CHILD++
fi
@@ -371,6 +351,9 @@ BASENAME="`basename $0`[$CREATEPKG_CHILD]"
check_config
check_repo
+INSTALL=$off
+NO_DEPS=$off
+
case $1 in
'--search'|'-s')
[ $# -ne 2 ] && handle_error 2 # two parameters is required
@@ -386,11 +369,11 @@ case $1 in
'--install'|'-i')
[ $# -ne 2 ] && handle_error 2 # two parameters is required
PACKAGE="$2"
- INSTALL="1"
+ INSTALL=$on
;;
'--no-deps'|'-nd')
[ $# -ne 2 ] && handle_error 2 # two parameters is required
- NO_DEPS="1"
+ NO_DEPS=$on
PACKAGE="$2"
;;
'--sync')
@@ -415,7 +398,7 @@ case $1 in
esac
# Synchronize repository
-[ "$SYNC" == "yes" ] && sync_repo
+[ $SYNC -eq $yes ] && sync_repo
# Get SlackBuild script
BUILD_SCRIPT="`find_slackbuild $PACKAGE`"
@@ -460,7 +443,7 @@ elif [ -f "$SCRIPT_BASE/slack-required" ]; then
SLACK_REQUIRED="$SCRIPT_BASE/slack-required"
fi
-if [ ! -z "$SLACK_REQUIRED" -a "$NO_DEPS" != "1" ]; then
+if [ ! -z "$SLACK_REQUIRED" -a $NO_DEPS -ne $on ]; then
# this routine checks for dependencies in package's slack-required
( grep '^[^#]' $SLACK_REQUIRED | while read dep; do
if [ ! -z "$dep" ]; then
@@ -485,17 +468,48 @@ eecho $messag "$BASENAME: processing $SCRIPT_NAME"
# Change to script base directory
cd $SCRIPT_BASE
-# Execute SlackBuild script with variables protection
-( INTERACT=no sh ./$SCRIPT_NAME )
+# Make MAKEPKG_REPOS
+[ ! -e $MAKEPKG_REPOS ] && mkdir -p $MAKEPKG_REPOS
+
+# Run SlackBuild script
+(
+ SRC_DIR=${SRC_DIR:=$SOURCE_DIR} \
+ SRC=${SRC_DIR:=$SOURCE_DIR} \
+ ARCH=${ARCH:=$CREATE_ARCH} \
+ COLOR=${COLOR:=$COLOR_MODE} \
+ REPOS=${REPOS:=$MAKEPKG_REPOS} \
+ CLEANUP=${CLEANUP:=$CREATE_CLEANUP} \
+ INTERACT=no sh ./$SCRIPT_NAME
+)
# Check if package was built
handle_error $? $PACKAGE
-PKG_TGZ="`ls -1 -c $REPOS/$PACKAGE-*-*-*.tgz | head -n 1`"
+# Get package name
+PKG_NAME="`ls -1 -c $MAKEPKG_REPOS/$PACKAGE-*-*-*.tgz | head -n 1 | xargs basename`"
-if [ "$INSTALL" == "1" ]; then
+# Select repository directory
+[ $MOVE_BIN_PACKAGE -eq $on ] && NEW_REPOS=$MAKEPKG_REPOS/$( echo ${SCRIPT_BASE#$SLACKBUILDS_DIR/} ) || NEW_REPOS=$MAKEPKG_REPOS
+
+# Create repository directory
+[ ! -e $NEW_REPOS ] && mkdir -p $NEW_REPOS 2>/dev/null
+
+# Remove old packages from repository tree
+[ $REMOVE_OLD_PACKAGE -eq $on ] && rm $NEW_REPOS/$PACKAGE-*-*-*.tgz 2>/dev/null
+
+# Move package to SlackBuilds-like tree
+[ $MOVE_BIN_PACKAGE -eq $on ] && mv $MAKEPKG_REPOS/$PKG_NAME $NEW_REPOS/
+
+# Install package
+if [ "$INSTALL" -eq $on ]; then
# as we dont have the full package file name, we'll
# use the newer file name that matches our wildcard:
- upgradepkg --install-new $PKG_TGZ
+ upgradepkg --install-new $NEW_REPOS/$PKG_NAME
fi
+
+# Update repository FILELIST.TXT, ...
+(
+ cd $MAKEPKG_REPOS
+ gen_filelist
+)
diff --git a/trunk/src/mkbuild b/trunk/src/mkbuild
index fce2533..60566dd 100755
--- a/trunk/src/mkbuild
+++ b/trunk/src/mkbuild
@@ -1,16 +1,26 @@
#!/bin/bash
#
-# Script para gerar SlackBuild
-# Por Rudson R. Alves
+# mkbuild: SlackBuild scripts maker
+# feedback: rudsonaalves at yahoo.com.br | gpl
#
-# Este script auxilia a criação de SlackBuilds, com o modelo
-# do Luiz do Sarava Linux
+# mkbuild is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or any later version.
#
-# SlackBuilds são scripts utilizados no Slackware para gerar
-# pacotes tgz.
+# mkbuild is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
-# Version 0.9.8
-PROG_VERSION=0.9.8
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place - Suite 330, Boston, MA 02111-1307, USA
+#
+#
+# Based in model generic.SlackBuild of Luiz
+#
+# Version 1.0.0
+PROG_VERSION=1.0.0
+PROG_NAME=`basename $0`
#--------------------------------------------------------------------
# Functions
@@ -58,6 +68,8 @@ DESCRIPTION
commit SlackBuilds in local svn tree
-v, --version
program version
+ -V, --verbose
+ print debug information
EXAMPLES
mkbuild --prefix /usr/local pyrex.mkbuild
@@ -109,6 +121,9 @@ function mkbuild_error {
"$ERROR_INPUT_PAR")
echo "Input parameter $2 error. See \"mkbuild --help\"."
;;
+ "$NULL_STRING")
+ mkbuild_use
+ ;;
*)
echo "Unknow error!"
;;
@@ -116,36 +131,25 @@ function mkbuild_error {
exit $1
}
-function is_number {
-
- # Check if argument 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 set_parameters {
# Get and set mkbuild variables with parameters input
# Use: set_parameters $@
# where $@ are the parameters input
#
- ALL_PAR=( $@ ) # carrega todos os parâmetros
- N_PAR=$# # carrega o número de parâmetros
+ ALL_PAR=( $@ ) # all parameters
+ N_PAR=$# # number of parameters
- i=0 # inicia o contador
- # Checa todos os parâmetros passados
+ i=0 # start counter
+
+ # analyze all the parameters
while [ $i -lt $N_PAR ]; do
# get parameter[i]
PAR=${ALL_PAR[$i]}
case $PAR in
'-c'|'--commit')
# Commit directory
- COMMIT=1
+ COMMIT=$on
;;
'-d'|'--debug')
# Debug mode
@@ -157,7 +161,11 @@ function set_parameters {
;;
'-v'|'--version')
# Show program version
- echo -e "\nmkbuild version $PROG_VERSION\n" && exit 0
+ echo -e "\n$PROG_NAME version $PROG_VERSION\n" && exit 0
+ ;;
+ '-V' | '--verbose')
+ # Enable verbose mode
+ VERBOSE=1
;;
'-a'|'--author')
# Enter with author name
@@ -237,7 +245,7 @@ function get_variable {
[ $# -ne 1 ] && mkbuild_error $ERROR_PROGRAM
[ -z $MK_INPUT_FILE ] && echo "Warning: no [mkbuild_file]." && return 0
- grep "^\[\[${1}\]\]" $MK_INPUT_FILE | cut -f2 -d\"
+ grep "^\[\[${1}\]\]" $MK_INPUT_FILE | cut -f2- -d= | tr -d '\"'
}
function edit_file {
@@ -298,6 +306,7 @@ function clear_files {
# Remove temporary files
rm $AUX_TMP 2>/dev/null
rm $SLACKBUILD_TEMP 2>/dev/null
+ chmod 755 *.SlackBuild
}
function set_status {
@@ -349,7 +358,7 @@ function build_slackbuild {
function section_edit {
- # Edit sections by change you values
+ # Edits a section substituting its content
[ -z $MK_INPUT_FILE ] && return 0
SECTION_LIST=`grep '^#>[a-z]' $MK_INPUT_FILE | cut -c3-`
@@ -417,9 +426,9 @@ function make_slack_required {
done
}
-function change_others_fields {
+function change_others_parameters {
- # Change others fields started by '[[' in .mkbuild file
+ # Change others parameters started by '[[' in .mkbuild file
grep '\[\[[A-Za-z]' $MK_INPUT_FILE | while read i; do
CHANGE="`echo $i | sed 's/\[\[\(.*\)\]\]=\"\(.*\)\"/\1/'`"
VALUE="`echo $i | sed 's/\[\[\(.*\)\]\]=\"\(.*\)\"/\2/'`"
@@ -430,16 +439,29 @@ function change_others_fields {
function commit_slackbuild {
# Commit SlackBuild in local Slack.Sarava tree
+ if [ $UID -ne 0 ]; then
+ echo "Only root can commit SlackBuilds..."
+ return 1
+ fi
+
+ # 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" ""`
- if [ $? != 0 ]; then
+ # Get SlackBuild path in slackbuild local tree
+ if [ $? -ne 0 ]; then
+ SLACKBUILD_PATH=`find $SLACKBUILDS_DIR -name $SLACKBUILD | xargs dirname`
+ fi
+ # Get SlackBuild path in gentoo-portage tree
+ if [ "$SLACKBUILD_PATH" == "" ]; then
# Mount SlackBuild path
- AUX=`lynx -dump http://gentoo-portage.com/Search?search=$PKG_NAME | sed -n '/Results:/,+1 { /Results:/ b ; p }' | head --lines=1 | tr -d " "`
+ [ $VERBOSE -eq $on ] && echo -e "\nFind SlackBuild PATH in Slack.Sarava tree..."
+ AUX=`lynx -connect_timeout=10 -dump http://gentoo-portage.com/Search?search=$PKG_NAME | sed -n '/Results:/,+1 { /Results:/ b ; p }' | head --lines=1 | tr -d " "`
[ ! -z $AUX ] && SLACKBUILD_PATH="`dirname $AUX | tr - /`/`basename $AUX`" || SLACKBUILD_PATH="others/unclassified/$PKG_NAME"
fi
- # check SlackBuilds directory
- [ ! -e $SLACKBUILDS_DIR ] && createpkg --sync
# change to SlackBuilds directory
cd $SLACKBUILDS_DIR/
@@ -520,7 +542,7 @@ function decompress_find {
case $EXTENSION in
'gz'|'GZ')
DECOMPRESSOR="gunzip"
- DECOMPRESSOR_TEST_FLAG="-t"
+ DECOMPRESSOR_TEST_FLAG="-t"$NULL_STRING
;;
'bz2'|'BZ2')
DECOMPRESSOR="bunzip2"
@@ -545,7 +567,6 @@ COMMON="/usr/libexec/simplepkg/common.sh"
SIMPLEPKG_CONF="/etc/simplepkg/simplepkg.conf"
WORK=`pwd`
LANG=en_US
-COMMIT=0
if [ -f "$COMMON" ]; then
source $COMMON
@@ -554,12 +575,15 @@ else
mk_exit 0
fi
-# createpkg and mkbuild section
-SLACKBUILDS_DIR="`eval_parameter SLACKBUILDS_DIR /var/slackbuilds`"
-#-----------------------------
+# Start constants
+set_constants
-# Start variables
-DOWNLOAD_SOURCE=0 # desable download source
+# Set commit off
+COMMIT=$off
+# Set verbose off
+VERBOSE=$off
+# Createpkg and mkbuild section
+SLACKBUILDS_DIR="`eval_parameter SLACKBUILDS_DIR /var/slackbuilds`"
# Auxiliar file
AUX_TMP=/tmp/mkbuild_tmp.$RANDOM
# Derectory to SlackBuild models
@@ -570,22 +594,27 @@ SLACKDESC_LEN=78
# Load error codes
error_codes
-[ $# -eq 0 ] && mkbuild_use && exit 1
+[ $# -eq 0 ] && mk_exit $NULL_STRING
# Configure input parameters
set_parameters $@
+[ $VERBOSE -eq $on ] && echo -e "$PROG_NAME version $PROG_VERSION\n"
+
# Get values
# Author name
AUTHOR=${AUTHOR:="`get_variable "SLACKBUILD AUTHOR"`"}
[ -z "$AUTHOR" ] && mkbuild_error $ERROR_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"
+[ $VERBOSE -eq $on ] && echo "[[SLACKBUILD AUTHOR INITIALS]]=\"$AUTHOR_INITIALS\""
# URL program
URL=`validate_parameter "$URL" "DOWNLOAD FOLDER URL" ""` || mkbuild_error $ERROR_CONSTRUCTION "URL"
+[ $VERBOSE -eq $on ] && echo "[[URL]]=\"$URL\""
STR_MOUNT="`echo $URL | rev | cut -c1-3 | rev | tr -d '.'`"
if [ $STR_MOUNT = "gz" -o $STR_MOUNT = "tgz" -o $STR_MOUNT = "bz2" -o $STR_MOUNT = "zip" ]; then
@@ -594,74 +623,96 @@ if [ $STR_MOUNT = "gz" -o $STR_MOUNT = "tgz" -o $STR_MOUNT = "bz2" -o $STR_MOUNT
else
URL_BASE=$URL
fi
+[ $VERBOSE -eq $on ] && echo "[[DOWNLOAD FOLDER URL]]=\"$URL_BASE\""
# Extension
EXTENSION=`validate_parameter "$EXTENSION" "EXTENSION" "$STR_MOUNT"` || mkbuild_error $ERROR_CONSTRUCTION "EXTENSION"
+[ $VERBOSE -eq $on ] && echo "[[EXTENSION]]=\"$EXTENSION\""
# Build archteture
ARCH=`validate_parameter "$ARCH" "ARCH" "i486"`
+[ $VERBOSE -eq $on ] && echo "[[ARCH]]=\"$ARCH\""
# 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"
+[ $VERBOSE -eq $on ] && echo "[[SOURCE NAME]]=\"$SRC_NAME\""
# Package name
STR_MOUNT=`echo $SRC_NAME | tr [A-Z_] [a-z\-]`
PKG_NAME=`validate_parameter "$PKG_NAME" "PACKAGE NAME" "$STR_MOUNT"`
+[ $VERBOSE -eq $on ] && echo "[[PACKAGE NAME]]=\"$PKG_NAME\""
# Version
STR_MOUNT=`echo $SOURCE_NAME | sed -r 's/(.*)-(.*)\.(.*\..*)$/\2/'`
VERSION=`validate_parameter "$VERSION" "VERSION" $STR_MOUNT` || mkbuild_error $ERROR_CONSTRUCTION "VERSION"
+[ $VERBOSE -eq $on ] && echo "[[VERSION]]=\"$VERSION\""
# Construction source name string
CONST_STRING="`validate_parameter "$CONST_STRING" "SOURCE NAME CONSTRUCTION STRING" "\\\$SRC_NAME-\\\$VERSION.tar.$EXTENSION"`"
+[ $VERBOSE -eq $on ] && echo "[[SOURCE NAME CONSTRUCTION STRING]]=\"$CONST_STRING\""
# Build Source Name
[ -z $SOURCE_NAME ] && SOURCE_NAME=`eval "echo $CONST_STRING"`
+[ $VERBOSE -eq $on ] && echo "SOURCE_NAME=\"$SOURCE_NAME\""
# Decompressor program and test flag
DECOMPRESSOR=`validate_parameter "$DECOMPRESSOR" "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"
+[ $VERBOSE -eq $on ] && echo "[[DECOMPRESSOR TEST FLAG]]=\"$DECOMPRESSOR_TEST_FLAG\""
# Documentations list
DOCFILES=`validate_parameter "$DOCFILES" "DOCUMENTATION FILES" "NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING readme.*"`
+[ $VERBOSE -eq $on ] && echo "[[DOCUMENTATION FILES]]=\"$DOCFILES\""
# ./configure option
OPTIONS=`validate_parameter "$OPTIONS" "OTHER CONFIGURE ARGS" ""`
+[ $VERBOSE -eq $on ] && echo "[[OTHER CONFIGURE ARGS]]=\"$OPTIONS\""
# PREFIX
PREFIX=`validate_parameter "$PREFIX" "PREFIX" "/usr"`
+[ $VERBOSE -eq $on ] && echo "[[PREFIX]]=\"$PREFIX\""
# Number of jobs
NUMJOBS=`validate_parameter "$NUMJOBS" "NUMBER OF JOBS" ""`
+[ $VERBOSE -eq $on ] && echo "[[NUMBER OF JOBS]]=\"$NUMJOBS\""
# Make slack-required file.
SLACK_REQUIRED=`validate_parameter "$SLACK_REQUIRED" "SLACK REQUIRED" ""`
+[ $VERBOSE -eq $on ] && echo "[[SLACK REQUIRED]]=\"$SLACK_REQUIRED\""
# SlackBuild model
MODEL=`validate_parameter "$MODEL" "SLACKBUILD MODEL" "generic.mkSlackBuild"`
+[ $VERBOSE -eq $on ] && echo "[[SLACKBUILD MODEL]]=\"$MODEL\""
#
# Start build SlackBuild
SLACKBUILD=${PKG_NAME}.SlackBuild
SLACKBUILD_TEMP=$SLACKBUILD.tmp
cp $MODEL_DIR/$MODEL $SLACKBUILD_TEMP
+[ $VERBOSE -eq $on ] && echo -en "\nStart SlackBuild make"
-# Change Strings from model
+# Change strings from model
start_build $SLACKBUILD_TEMP
+[ $VERBOSE -eq $on ] && echo -en "\nEdit mkSlackBuild model .."
# On/Off sections
activate_sections
+[ $VERBOSE -eq $on ] && echo -en ".\nEnable and desable sections .."
# Change sections
section_edit
+[ $VERBOSE -eq $on ] && echo -en ".\nChange sections .."
# Remove off sections
build_slackbuild
+[ $VERBOSE -eq $on ] && echo -en ".\nRemove off sections .."
# Make slack-required file
make_slack_required
+[ $VERBOSE -eq $on ] && echo -en ".\nMake slack-required file .."
if [ -e slack-required ]; then
DEPENDENCY_LIST="`cat slack-required | awk '{print $1}' | grep '^[a-z]' | tr '\012' ' '`"
@@ -671,10 +722,11 @@ else
fi
# Others changes
-change_others_fields
+change_others_parameters
+[ $VERBOSE -eq $on ] && echo -en ".\nEdit others [[]] parameters .."
# Clear temporary files
clear_files
+[ $VERBOSE -eq $on ] && echo -e ".\nRemove temporary files ..."
-[ $COMMIT -eq 1 ] && commit_slackbuild
-
+[ $COMMIT -eq $on ] && commit_slackbuild