aboutsummaryrefslogtreecommitdiff
path: root/trunk/src/mkbuild
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/src/mkbuild')
-rwxr-xr-xtrunk/src/mkbuild27
1 files changed, 16 insertions, 11 deletions
diff --git a/trunk/src/mkbuild b/trunk/src/mkbuild
index eeb548c..99f631e 100755
--- a/trunk/src/mkbuild
+++ b/trunk/src/mkbuild
@@ -18,8 +18,8 @@
#
# Based in model generic.SlackBuild of Luiz
#
-# Version 1.1.1
-PROG_VERSION=1.1.1
+# Version 1.1.2
+PROG_VERSION=1.1.2
PROG_NAME=`basename $0`
#--------------------------------------------------------------------
@@ -330,6 +330,7 @@ function set_status {
# $3 - file
[ $# -ne 3 ] && mkbuild_error $ERROR_PROGRAM
if [ "`get_status $1 $3`" != "all" ]; then
+ [ $VERBOSE -eq $on ] && echo "Section $1 $2"
eval "sed 's/^<$1>.*$/<$1> $2/' $3" > $AUX_TMP
mv $AUX_TMP $3
else
@@ -359,13 +360,16 @@ function activate_sections {
function build_slackbuild {
- # Remove off sections
+ # Clean SlackBuild
+ # Make SlackBuild backup
[ -e $SLACKBUILD ] && mv $SLACKBUILD $SLACKBUILD.old
+ # Remove off sections
sed '/^<[a-z].*> off/, /^<\/[a-z].*>$/ d' $SLACKBUILD_TEMP > $AUX_TMP
# Remove sections names
sed '/^<.*$/ d' $AUX_TMP > $SLACKBUILD_TEMP
# Remove clear lines
sed ':i ; $! N; s/\n/<NL>/ ; t i' $SLACKBUILD_TEMP | sed 's/<NL><NL><NL>/<NL><NL>/g' | sed 's/<NL><NL><NL>/<NL><NL>/g' | sed 's/<NL>/\n/g' > $AUX_TMP
+ # Remove from frist line do #!/... line
sed '1,/^#\!/ {/^#\!/ b; d }' $AUX_TMP > $SLACKBUILD
}
@@ -381,6 +385,7 @@ function section_edit {
# Change sections
for i in $SECTION_LIST; do
+ [ $VERBOSE -eq $on ] && echo "Change section $i"
if [ "$i" = "slackdesc" ]; then
# Special slackdesc section
slackdesc_edit > $AUX_TMP
@@ -728,30 +733,30 @@ else
#
# Start build SlackBuild
+ [ $VERBOSE -eq $on ] && echo -e "\nStart SlackBuild make"
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
+ [ $VERBOSE -eq $on ] && echo -e "\nStart build $PACKAGE.SlackBuild..."
start_build $SLACKBUILD_TEMP
- [ $VERBOSE -eq $on ] && echo -en "\nEdit mkSlackBuild model .."
# On/Off sections
+ [ $VERBOSE -eq $on ] && echo -e "\nEnable/desable sections ..."
activate_sections
- [ $VERBOSE -eq $on ] && echo -en ".\nEnable and desable sections .."
# Change sections
+ [ $VERBOSE -eq $on ] && echo -e "\nEdit sections ..."
section_edit
- [ $VERBOSE -eq $on ] && echo -en ".\nChange sections .."
# Remove off sections
+ [ $VERBOSE -eq $on ] && echo -e "\nRemove off sections ..."
build_slackbuild
- [ $VERBOSE -eq $on ] && echo -en ".\nRemove off sections .."
# Make slack-required file
+ [ $VERBOSE -eq $on ] && echo -e "\nMake 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' ' '`"
@@ -761,13 +766,13 @@ else
fi
# Others changes
+ [ $VERBOSE -eq $on ] && echo -e "\nEdit others [[]] parameters ..."
change_others_parameters
- [ $VERBOSE -eq $on ] && echo -en ".\nEdit others [[]] parameters ..\n"
# Commit SlackBuild
[ $COMMIT -eq $on ] && commit_slackbuild
fi
# Clear temporary files
+[ $VERBOSE -eq $on ] && echo -e "\nRemove temporary files ..."
clear_files
-[ $VERBOSE -eq $on ] && echo -e ".\nRemove temporary files ..."