aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>2007-11-06 18:23:08 +0000
committerrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>2007-11-06 18:23:08 +0000
commitf7e8eae3eccddf31033841aeffd05ec066c55a32 (patch)
tree500392133a0390f01d10974876a9cb5db8381e70
parent7992b9b7d4257cf976cb3954e4fc35428e3f92bf (diff)
downloadsimplepkg-f7e8eae3eccddf31033841aeffd05ec066c55a32.tar.gz
simplepkg-f7e8eae3eccddf31033841aeffd05ec066c55a32.tar.bz2
mkbuild-1.1.2: mudanças nas mensagens (verbose); generic.mkSlackBuild: correção à estrutura das seções
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@452 04377dda-e619-0410-9926-eae83683ac58
-rw-r--r--trunk/mkbuild/generic.mkSlackBuild2
-rwxr-xr-xtrunk/src/mkbuild27
2 files changed, 17 insertions, 12 deletions
diff --git a/trunk/mkbuild/generic.mkSlackBuild b/trunk/mkbuild/generic.mkSlackBuild
index 18ecc6a..72f8917 100644
--- a/trunk/mkbuild/generic.mkSlackBuild
+++ b/trunk/mkbuild/generic.mkSlackBuild
@@ -4,8 +4,8 @@
## Version 0.8.1 - Luis ( luis at riseup d0t net)
##
###################################################
-<head> off
#!/bin/bash
+<head> off
#
# [[PROGRAM NAME]].SlackBuild is free software; you can redistribute
# it and/or modify it under the terms of the GNU General Public License as
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 ..."