diff options
author | rudson <rudson@04377dda-e619-0410-9926-eae83683ac58> | 2007-03-07 18:06:29 +0000 |
---|---|---|
committer | rudson <rudson@04377dda-e619-0410-9926-eae83683ac58> | 2007-03-07 18:06:29 +0000 |
commit | 8fe63d2252670e0d279b9a30d7ce087c2e16931f (patch) | |
tree | e4b68b55391927df69521c8e7ca495d3eb07cd7d /trunk | |
parent | 35576bbf7f9519abe4cb99c261e3d997b405b697 (diff) | |
download | simplepkg-8fe63d2252670e0d279b9a30d7ce087c2e16931f.tar.gz simplepkg-8fe63d2252670e0d279b9a30d7ce087c2e16931f.tar.bz2 |
mkbuild: correções em menus
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@204 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk')
-rwxr-xr-x | trunk/simplepkg.SlackBuild | 2 | ||||
-rwxr-xr-x | trunk/src/mkbuild (renamed from trunk/utils/mkbuild) | 123 |
2 files changed, 78 insertions, 47 deletions
diff --git a/trunk/simplepkg.SlackBuild b/trunk/simplepkg.SlackBuild index 2621e55..1488cc1 100755 --- a/trunk/simplepkg.SlackBuild +++ b/trunk/simplepkg.SlackBuild @@ -10,7 +10,7 @@ VERSION="0.4.9pre24" ARCH="noarch" LIBEXEC="/usr/libexec/$PACKAGE" BINDIR="/usr/bin" -BINARY_LIST="simplaret repos lspkg" +BINARY_LIST="simplaret repos lspkg mkbuild" SBINDIR="/usr/sbin" SBINARY_LIST="mkjail templatepkg jail-update jail-commit metapkg rebuildpkg createpkg" LIB_LIST="common.sh" diff --git a/trunk/utils/mkbuild b/trunk/src/mkbuild index ee664ea..eb8b6a7 100755 --- a/trunk/utils/mkbuild +++ b/trunk/src/mkbuild @@ -12,8 +12,8 @@ # Turn off debug set +x # -# Version 0.9.13 -PROG_VERSION=0.9.13 +# Version 0.9.14 +PROG_VERSION=0.9.14 #-------------------------------------------------------------------- # Functions @@ -129,7 +129,7 @@ function unpkg_source() # FIXME: if MK_DECOMPRESSOR -ne bunzip2 or gunzip... if [ $MK_DECOMPRESSOR = "bunzip2" -o $MK_DECOMPRESSOR = "gunzip" ]; then dialog --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" \ - --cancel-label "Main Menu" --infobox "Uncompress source in /tmp/$MK_PKGNAME. Wait" 3 45 + --cancel-label "Main Menu" --title "$MK_TITLE" --infobox "Uncompress source in /tmp/$MK_PKGNAME. Wait" 3 45 [ $? -ne 0 ] && return 100 mkdir /tmp/$MK_PKGNAME/ 2>/dev/null tar xvf $MK_SOURCE -C /tmp/$MK_PKGNAME/ 1>/dev/null @@ -139,7 +139,7 @@ function unpkg_source() DOC_FILES=`find $MK_TMPSRC -type f -maxdepth 1 -name "[A-Z]*" | sed 's/.*\/\(.*\)$/\1/'` else dialog --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" \ - --msgbox "$MK_DECOMPRESSOR not configurated..." 5 45 + --title "$MK_TITLE" --msgbox "$MK_DECOMPRESSOR not configurated..." 5 45 fi } @@ -179,19 +179,30 @@ function select_source() # Edit authot, Initials and editor function edit_author() { - MK_AUTHOR=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --inputbox "Enter with author complite name:" 8 60 "$MK_AUTHOR"` + MK_AUTHOR=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --inputbox "Enter with author complite name:" 8 60 "$MK_AUTHOR"` edit_file "AUTHOR NAME" "$MK_AUTHOR" ~/.mkslackbuild + MK_AUTHOR_INITIALS=`echo $MK_AUTHOR | sed 's/ /\n/g' | sed 's/^\([A-Z]\).*/\1/' | sed ':i; $!N; s/\n//; ti' | tr [A-Z] [a-z]` - MK_AUTHOR_INITIALS=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --inputbox "Enter with author assignature:" 8 60 "$MK_AUTHOR_INITIALS"` + MK_AUTHOR_INITIALS=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --inputbox "Enter with author assignature:" 8 60 "$MK_AUTHOR_INITIALS"` edit_file "AUTHOR INITIALS" "$MK_AUTHOR_INITIALS" ~/.mkslackbuild - MK_EDITOR=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --inputbox "Enter with editor command:" 8 60 "pico"` + + MK_EDITOR=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --inputbox "Enter with editor command:" 8 60 "pico"` edit_file "EDITOR" "$MK_EDITOR" ~/.mkslackbuild + + MK_SOURCEDIR=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --inputbox "Enter with sources directory:" 8 60 "\`pwd\`"` + edit_file "SOURCE DIR" "$MK_SOURCEDIR" ~/.mkslackbuild + + MK_ARCH=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --inputbox "Enter default architecture to Slackbuild:" 8 60 "i468"` + edit_file "DEFAULT ARCH" "$MK_ARCH" ~/.mkslackbuild + + MK_LIMITRATE=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --inputbox "Enter wget limit rate:" 8 60 "120k"` + edit_file "LIMIT RATE" "$MK_LIMITRATE" ~/.mkslackbuild } # Edit source URL function edit_url() { - MK_URL=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --cancel-label "Main Menu" --inputbox "Enter with complite URL from source:" 8 60 "$MK_URL"` + MK_URL=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --cancel-label "Main Menu" --title "$MK_TITLE" --inputbox "Enter with complite URL from source:" 8 60 "$MK_URL"` [ $? -ne 0 ] && return 100 } @@ -200,7 +211,7 @@ function edit_source_name() { # Carrega nome do arquivo MK_SRCNAME=`basename $MK_URL` - MK_SRCNAME=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --cancel-label "Main Menu" --inputbox "Enter with complite source file name:" 8 60 "$MK_SRCNAME"` + MK_SRCNAME=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --cancel-label "Main Menu" --title "$MK_TITLE" --inputbox "Enter with source file name:" 8 60 "$MK_SRCNAME"` [ $? -ne 0 ] && return 100 } @@ -215,7 +226,8 @@ function edit_pkgname() # Configura nome, versão e extensão do pacote ANS=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" \ - --cancel-label "Main Menu" --form "Check information below:" 14 52 7 \ + --cancel-label "Main Menu" --title "$MK_TITLE" \ + --form "Check information below:" 14 52 7 \ "Source name:" 1 1 "$MK_SRC_NAME" 1 15 30 60 \ "Package name:" 3 1 "$MK_PKGNAME" 3 15 30 60 \ "Version:" 5 1 "$MK_VERSION" 5 15 30 60 \ @@ -237,7 +249,8 @@ function edit_decompress_arg() # Configura nome, versão e extensão do pacote ANS3=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" \ - --cancel-label "Main Menu" --form "Check information below:" 10 55 3 \ + --cancel-label "Main Menu" --title "$MK_TITLE" \ + --form "Check information below:" 10 55 3 \ "Uncompress program:" 1 1 "$MK_DECOMPRESSOR" 1 23 25 60 \ "Uncompress test flag:" 3 1 "$MK_DECOMPRESSOR_TEST_FLAG" 3 23 25 100` [ $? -ne 0 ] && return 100 @@ -261,8 +274,9 @@ function edit_configure() local ANS1="7" while [ $ANS1 -ne 0 ]; do ANS1=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" \ - --cancel-label "Continue" --menu "Select one option" 0 0 0 \ - 1 "View ./configure help" \ + --cancel-label "Continue" --title "$MK_TITLE" \ + --menu "Select one option" 0 0 0 \ + 1 "View ./configure --help" \ 2 "View documentations" \ 3 "PREFIX=$MK_PREFIX" \ 4 "OPTIONS=$MK_OPTIONS" \ @@ -276,10 +290,10 @@ function edit_configure() view_docs ;; '3') - MK_PREFIX=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --inputbox "Enter with prefix for install $MK_PKGNAME" 8 60 "$MK_PREFIX"` + MK_PREFIX=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --inputbox "Enter with prefix for install $MK_PKGNAME" 8 60 "$MK_PREFIX"` ;; '4') - MK_OPTIONS=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --inputbox "Enter with configure options for compile $MK_PKGNAME" 8 60 "$MK_OPTIONS"` + MK_OPTIONS=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --inputbox "Enter with configure options for compile $MK_PKGNAME" 8 60 "$MK_OPTIONS"` ;; *) ANS1=0 @@ -288,7 +302,7 @@ function edit_configure() done # Configure - dialog --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title " Execute ./configure below? " --yesno "./configure --prefix=$MK_PREFIX $MK_OPTIONS" 6 70 + dialog --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title " Execute ./configure below? " --title "$MK_TITLE" --yesno "./configure --prefix=$MK_PREFIX $MK_OPTIONS" 6 70 if [ $? -eq 0 ]; then ( cd $MK_TMPSRC @@ -299,7 +313,7 @@ function edit_configure() read ANS0 fi - dialog --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title " Configure line is ok? " --yesno "./configure --prefix=$MK_PREFIX $MK_OPTIONS" 6 70 + dialog --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title " Configure line is ok? " --title "$MK_TITLE" --yesno "./configure --prefix=$MK_PREFIX $MK_OPTIONS" 6 70 ANS0=$? done @@ -317,7 +331,7 @@ function view_docs() done while [ $ANS2 -eq 0 ]; do - SELECT=`eval "dialog --stdout --backtitle \"Make SlackBuild $PROG_VERSION [$MK_PKGNAME]\" --cancel-label \"Continue\" --title \" Documentations files \" --menu \"Select doc-file below:\" 20 45 13 $MENU"` + SELECT=`eval "dialog --stdout --backtitle \"Make SlackBuild $PROG_VERSION [$MK_PKGNAME]\" --cancel-label \"Continue\" --title \"$MK_TITLE\" --menu \"Select doc-file below:\" 20 45 13 $MENU"` ANS2=$? [ $ANS2 -eq 0 ] && view_file "File: $SELECT" $MK_TMPSRC/$SELECT done @@ -338,7 +352,7 @@ function edit_docfiles() DOCMENU="$DOCMENU $i \"\" off" fi done - SELECTDOCS=`eval "dialog --stdout --separate-output --backtitle \"Make SlackBuild $PROG_VERSION [$MK_PKGNAME]\" --title \" Documentations files \" --cancel-label \"Continue\" --checklist \"Select documentation files below:\" 20 45 13 $DOCMENU"` + SELECTDOCS=`eval "dialog --stdout --separate-output --backtitle \"Make SlackBuild $PROG_VERSION [$MK_PKGNAME]\" --title \"$MK_TITLE\" --cancel-label \"Continue\" --checklist \"Select documentation files below:\" 20 45 13 $DOCMENU"` fi MK_DOCFILES="`echo $SELECTDOCS | sed ':i; N; s/\n/ /; bi'`" @@ -347,7 +361,7 @@ function edit_docfiles() # Edit compiler architecture function edit_arch() { - MK_ARCH=`dialog --stdout --backtitle "Make SlackBuild documentation files below:" --cancel-label "Main Menu" --inputbox "Set an architecture to compiler:" 8 45 $MK_ARCH` + MK_ARCH=`dialog --stdout --backtitle "Make SlackBuild documentation files below:" --cancel-label "Main Menu" --title "$MK_TITLE" --inputbox "Set an architecture to compiler:" 8 45 $MK_ARCH` [ $? -ne 0 ] && return 100 } @@ -359,7 +373,7 @@ function change_strings() { # echo "$1 -> $2" [ $# -ne 2 ] && mk_exit 1 - [ -z $2 ] && return 0 + [ -z "$2" ] && return 0 eval "grep -l \"\[\[$1\]\]\" *" | while read FILE; do edit_file "$1" "$2" $FILE done @@ -389,7 +403,7 @@ function start_build() # Mount final SlackBuild function mount_slackbuild() { - dialog --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --infobox "SlackBuild save in $SLACKBUILD" 5 45 + dialog --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --infobox "SlackBuild save in $SLACKBUILD" 5 45 rm $SLACKBUILD 2>/dev/null # [ ! -e `dirname $SLACKBUILD` ] && mkdir `dirname $SLACKBUILD` @@ -406,7 +420,7 @@ function mount_slackbuild_to() { if [ $# -eq 1 ]; then END_SECTION=$1 - dialog --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --infobox "SlackBuild save in $SLACKBUILD.test" 5 45 + dialog --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --infobox "SlackBuild save in $SLACKBUILD.test" 5 45 rm $SLACKBUILD.test 2>/dev/null # [ ! -e `dirname $SLACKBUILD` ] && mkdir `dirname $SLACKBUILD` @@ -456,7 +470,7 @@ function get_source_dialog() { if [ ! -e $MK_SOURCE ]; then dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" \ - --yesno " Download $MK_SRCNAME? " 5 50 + --title "$MK_TITLE" --yesno " Download $MK_SRCNAME? " 5 50 if [ $? -eq 0 ]; then download_url else @@ -473,11 +487,11 @@ function test_source() local ANS=0 while [ $TEST -ne 0 ]; do - dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --infobox "Test source with $MK_DECOMPRESSOR $MK_DECOMPRESSOR_TEST_FLAG $MK_SOURCE" 5 50 + dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --infobox "Test source with $MK_DECOMPRESSOR $MK_DECOMPRESSOR_TEST_FLAG $MK_SOURCE" 5 50 $MK_DECOMPRESSOR $MK_DECOMPRESSOR_TEST_FLAG $MK_SOURCE TEST=$? if [ $TEST -ne 0 ]; then - dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --yesno "Source uncompress error. Download source again?" 6 50 + dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --yesno "Source uncompress error. Download source again?" 6 50 if [ $? -eq 0 ]; then rm $MK_SOURCE get_source_dialog @@ -489,6 +503,7 @@ function test_source() done } +# Configure test source variables function set_source_test() { MK_SOURCE=$MK_SOURCEDIR/$MK_PKGNAME/$MK_SRCNAME @@ -511,7 +526,7 @@ function edit_signature() local ANS=0 ANS=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" \ - --menu "Select code validate type:" 0 0 0 \ + --title "$MK_TITLE" --menu "Select code validate type:" 0 0 0 \ "1" "gpg signature" \ "2" "md5sum" \ "0" "none"` @@ -530,7 +545,7 @@ function edit_signature() function edit_gpg() { dialog --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" \ - --msgbox "Enter with gpg minimized signing key." 5 50 + --title "$MK_TITLE" --msgbox "Enter with gpg minimized signing key." 5 50 $EDITOR $MK_GPGFILEKEY } @@ -562,11 +577,12 @@ function create_slackbuild() edit_arch [ $? -eq 100 ] && return 100 - # Set source test vadiables + # Set source test variables set_source_test [ $? -eq 100 ] && return 100 # Get source file + MK_SOURCE=$MK_SOURCEDIR/$MK_PKGNAME/$MK_SRCNAME get_source_dialog [ $? -eq 100 ] && return 100 @@ -612,7 +628,7 @@ function create_slackbuild() function open_mkslackbuild_dialog() { MKSLACKBUILD=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" \ - --title " Select source file name (use spaces to select): " \ + --title " Select source file name: " \ --fselect "$BASEDIR/" 10 70` [ $? -ne 0 ] && return 100 @@ -637,7 +653,7 @@ function open_mkslackbuild() else dialog --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" \ - --msgbox "$MKSLACKBUILD most be a mkslackbuild file" 6 45 + --title "$MK_TITLE" --msgbox "$MKSLACKBUILD most be a mkslackbuild file" 6 45 return 100 fi @@ -660,7 +676,7 @@ function open_mkslackbuild() # Save mkSlackbuild function save_mkslackbuild() { - dialog --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --infobox "mkSlackBuild save in $MKSLACKBUILD" 5 30 + dialog --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --infobox "mkSlackBuild save in $MKSLACKBUILD" 5 30 rm $MKSLACKBUILD 2>/dev/null echo '#!/bin/bash' > $MKSLACKBUILD @@ -703,7 +719,7 @@ function edit_menu() EDITMENU="$EDITMENU ${SECTION_NAME[i]} ${SECTION_FLAG[i]}" done - SELECT=`eval "dialog --stdout --backtitle \"Make SlackBuild $PROG_VERSION [$MK_PKGNAME]\" --ok-label \"Edit\" --cancel-label \"Main Menu\" --menu \"Select one section to edit\" 20 40 13 $EDITMENU"` + SELECT=`eval "dialog --stdout --backtitle \"Make SlackBuild $PROG_VERSION [$MK_PKGNAME]\" --ok-label \"Edit\" --cancel-label \"Main Menu\" --title \"$MK_TITLE\" --menu \"Select one section to edit\" 20 40 13 $EDITMENU"` ANSE=$? if [ $ANSE -ne 1 ]; then STATUS=`mk_status $SELECT` @@ -714,9 +730,9 @@ function edit_menu() FLAG=`echo $STATUS | awk '{print $1}'` INDEX=`echo $STATUS | awk '{print $2}'` if [ "$FLAG" = "on" ]; then - SECTION_FLAG[$INDEX]=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --radiolist "Change status from $SELECT" 0 0 0 "on" "enable section" "on" "off" "desable section" "off"` + SECTION_FLAG[$INDEX]=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --radiolist "Change status from $SELECT" 0 0 0 "on" "enable section" "on" "off" "desable section" "off"` elif [ "$FLAG" = "off" ]; then - SECTION_FLAG[$INDEX]=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --radiolist "Change status from $SELECT" 0 0 0 "on" "enable section" "off" "off" "desable section" "on"` + SECTION_FLAG[$INDEX]=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --radiolist "Change status from $SELECT" 0 0 0 "on" "enable section" "off" "off" "desable section" "on"` fi if [ "${SECTION_FLAG[$INDEX]}" = "on" -o "${SECTION_FLAG[$INDEX]}" = "all" ]; then if [ "$SELECT" = "md5sum_download_and_check" ]; then @@ -738,22 +754,22 @@ function md5sum_edit() local FILE=$1 if ( grep '\[\[MD5SUM EXTENSION\]\]' $FILE &>/dev/null ); then - SELECT=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --radiolist "Select one option" 0 0 0 "1" "{SRC//.tar.[[SOURCE EXTENSION]]}.[[MD5SUM EXTENSION]]" on "2" "SRC.[[MD5SUM EXTENSION]]" off "3" "MK5SUM CODE" off` + SELECT=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --radiolist "Select one option" 0 0 0 "1" "{SRC//.tar.[[SOURCE EXTENSION]]}.[[MD5SUM EXTENSION]]" on "2" "SRC.[[MD5SUM EXTENSION]]" off "3" "MK5SUM CODE" off` case $SELECT in 1) MK_MD5SUM_EXT="md5sum" - MK_MD5SUM_EXT=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --inputbox "Enter with md5sum extension:" 8 50 $MK_MD5SUM_EXT` + MK_MD5SUM_EXT=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --inputbox "Enter with md5sum extension:" 8 50 $MK_MD5SUM_EXT` edit_file "MD5SUM EXTENSION" "$MK_MD5SUM_EXT" $FILE ;; 2) MK_MD5SUM_EXT="md5" - MK_MD5SUM_EXT=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --inputbox "Enter with md5sum extension:" 8 50 $MK_MD5SUM_EXT` + MK_MD5SUM_EXT=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --inputbox "Enter with md5sum extension:" 8 50 $MK_MD5SUM_EXT` eval "sed 's/^MD5SUM_FILE.*$/MD5SUM_FILE=\$SRC.$MK_MD5SUM_EXT/' $FILE > $AUX_TMP" cp $AUX_TMP $FILE ;; 3) - MK_MD5SUM_CODE=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --inputbox "Enter with md5sum extension:" 8 50 $MK_MD5SUM_CODE` + MK_MD5SUM_CODE=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" --title "$MK_TITLE" --inputbox "Enter with md5sum extension:" 8 50 $MK_MD5SUM_CODE` sed '1! d' $FILE > $AUX_TMP sed -n '2, /^fi/ p' $FILE | while read LINE; do echo "#$LINE" >> $AUX_TMP; done sed -n '/^fi/, $ { /^fi/ b; p; }' $FILE >> $AUX_TMP @@ -782,7 +798,7 @@ function test_menu() EDITMENU="all \"SlackBuild\" $EDITMENU" while [ "$ANST" != "1" ]; do - SECTION=`eval "dialog --stdout --backtitle \"Make SlackBuild $PROG_VERSION [$MK_PKGNAME]\" --cancel-label \"Exit\" --menu \"Select section to test end\" 20 40 13 $EDITMENU"` + SECTION=`eval "dialog --stdout --backtitle \"Make SlackBuild $PROG_VERSION [$MK_PKGNAME]\" --cancel-label \"Exit\" --title \"$MK_TITLE\" --menu \"Select section to test end\" 20 40 13 $EDITMENU"` ANST=$? if [ $ANST -ne 1 ]; then @@ -797,7 +813,8 @@ function test_menu() if [ $? -eq 0 ]; then echo " --= 0K =--" DEBUG=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" \ - --cancel-label "no debug" --menu "Select debug level" 10 35 3 \ + --cancel-label "no debug" --title "$MK_TITLE" \ + --menu "Select debug level" 10 35 3 \ "-x" "Simple debug" \ "-xv" "More information" \ "none" "No debug"` @@ -831,7 +848,7 @@ function menu_dependency() local ANSD=11 while [ $ANSD -ne 0 ]; do ANSD=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" \ - --cancel-label "Main Menu" --menu "Main Menu:" 0 0 0 \ + --cancel-label "Main Menu" --title "$MK_TITLE" --menu "Main Menu:" 0 0 0 \ "1" "Edit Dependency List" \ "2" "Test Dependency List" \ "0" "Main Menu"` @@ -874,7 +891,8 @@ function test_dependency() fi done - DEP_SELECT=`eval "dialog --stdout --separate-output --backtitle \"Make SlackBuild $PROG_VERSION [$MK_PKGNAME]\" --title \" Dependency install check \" --checklist \"Select packages to remove from dependency list:\" 20 45 13 $DEP_LIST"` + DEP_SELECT=`eval "dialog --stdout --separate-output --backtitle \"Make SlackBuild $PROG_VERSION [$MK_PKGNAME]\" --title \"$MK_TITLE\" --checklist \"Select packages to remove from dependency list:\" 0 0 0 $DEP_LIST"` + # 20 45 13 for i in $DEP_SELECT; do eval "sed 's/$i$/#$i/' $DEPENDENCY_LIST > $AUX_TMP " @@ -921,9 +939,9 @@ if [ ! -e ~/.mkslackbuild ]; then MK_AUTHOR="[[AUTHOR NAME]]" MK_AUTHOR_INITIALS="[[AUTHOR INITIALS]]" MK_EDITOR=[[EDITOR]] -MK_LIMITRATE="120k" -MK_SOURCEDIR=\`pwd\` -MK_ARCH="i468" +MK_LIMITRATE=[[LIMIT RATE]] +MK_SOURCEDIR=[[SOURCE DIR]] +MK_ARCH=[[DEFAULT ARCH]] #SB_MODEL="my_model" EOF ) @@ -934,13 +952,18 @@ MK_ARCH=${MK_ARCH:="i486"} # Config Author if [ "$MK_AUTHOR" = "[[AUTHOR NAME]]" ]; then + MK_TITLE=" Personal Config " edit_author + MK_TITLE="" fi if [ ! -z $MKSLACKBUILD ]; then + MK_TITLE=" Open mkSlackBuild " open_mkslackbuild fi +MK_TITLE="" + ANS0=11 while [ $ANS0 -ne 0 ]; do if [ -z $MK_PKGNAME ]; then @@ -956,10 +979,12 @@ while [ $ANS0 -ne 0 ]; do case $ANS0 in 1) + MK_TITLE=" Create SlackBuild " create_slackbuild [ $? -eq 100 ] && MK_PKGNAME="" ;; 2) + MK_TITLE=" Open mkSlackBuild " open_mkslackbuild_dialog [ $? -eq 100 ] && MK_PKGNAME="" ;; @@ -968,6 +993,7 @@ while [ $ANS0 -ne 0 ]; do ANS0=0 ;; esac + MK_TITLE="" else ANS0=`dialog --stdout --backtitle "Make SlackBuild $PROG_VERSION [$MK_PKGNAME]" \ --cancel-label "Exit" --menu "Main Menu:" 0 0 0 \ @@ -982,15 +1008,19 @@ while [ $ANS0 -ne 0 ]; do fi case $ANS0 in 1) + MK_TITLE=" Edit Menu " edit_menu ;; 2) + MK_TITLE=" Dependency Menu " menu_dependency ;; 3) + MK_TITLE=" Test Menu " test_menu ;; 4) + MK_TITLE=" View Docs " view_docs ;; *) @@ -998,6 +1028,7 @@ while [ $ANS0 -ne 0 ]; do ANS0=0 ;; esac + MK_TITLE="" fi done |