]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@490 04377dda-e619-0410...
authorrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>
Mon, 7 Apr 2008 05:35:12 +0000 (05:35 +0000)
committerrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>
Mon, 7 Apr 2008 05:35:12 +0000 (05:35 +0000)
trunk/doc/CHANGELOG
trunk/lib/common.sh
trunk/mkbuild/model.mkbuild
trunk/simplepkg.SlackBuild
trunk/src/createpkg
trunk/src/mkbuild

index 04c43ccbadd6e6f16ba27f58393d41017e77293b..b7ae4468a3a77933ac6544c44deae481d04c072f 100644 (file)
@@ -1,6 +1,14 @@
 simplepkg changelog
 ===================
 
+0.6pre19
+========
+
+    - mkbuild-1.2.3:
+      - help function update
+    - createpkg-1.1.11:
+      - help function update
+
 0.6pre18
 ========
 
index 4b76e6d399bd470df204b8e9af19541b9cd3bcb8..0fe546c0aa518a593331b6e312ddbd22fa60e0d2 100644 (file)
@@ -885,27 +885,49 @@ function color_select {
   # 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"
+    # colors
     normal="\033[m"
+    dark_gray="\033[30;1m"
+    gray="\033[37m"
+    white="\033[37;1m"
+
+    red=$dark_gray
+    blue=$dark_gray
+    green=$gray
+    yellow=$gray
+
+    # Actions
+    commun=$white
+    messag=$white
+    error=$dark_gray
+    alert=$gray
     ;;
   '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
+    # colors
+    normal="\033[m"
+    dark_gray="\033[30;1m"
+    gray="\033[37m"
+    white="\033[37;1m"
+
+    red="\033[31;1m"
+    blue="\033[34;1m"
+    green="\033[32;1m"
+    yellow="\033[33;1m"
+
+    # Actions
+    commun=$green
+    messag=$blue
+    error=$red
+    alert=$yellow
     ;;
   *)
     commun=""
     messag=""
     error=""
     alert=""
-    normal=""
     ;;
   esac
 
index 48325a41fcb9f9d89ce5996c5f0c50ccf6916a31..00acbe2e82f5d4aa95f466716104f908a4e99d13 100644 (file)
 [[SLACKBUILD MODEL]]="generic.mkSlackBuild"
 
 # SlackBuild PATH in Slack.Sarava tree
-#[[SLACKBUILD PATH]]="others/unclassified/[[NAME]]"
+#[[SLACKBUILD PATH]]="others/unclassified/[[PKG NAME]]"
 [[SLACKBUILD PATH]]=""
 
 #---------------------
index e5678c1a1693a17e96e0cc65daaba09dcca98502..5e4ae8841bb903dada2e41fce688edd311702e47 100755 (executable)
@@ -18,7 +18,7 @@
 PACKAGE="simplepkg"
 PACK_DIR="package-$PACKAGE"
 BUILD=${BUILD:=1rha}
-VERSION="0.6pre18"
+VERSION="0.6pre19"
 ARCH="noarch"
 LIBEXEC="/usr/libexec/$PACKAGE"
 BINDIR="/usr/bin"
index e5fd73a83fe51e9fae455db39b56ab41cd77693b..5d28d17c0fd438f911187955a56560ea495b5b96 100644 (file)
 #               Createpkg functions
 #---------------------------------------------------
 
-CREATEPKG_VERSION="1.1.10"
+CREATEPKG_VERSION="1.1.11"
 
 function usage {
 
     # Help message
-    eecho $commun "Createpkg version $CREATEPKG_VERSION\n"
-    eecho $commun "Usage: createpkg [--install/-i] package_name"
-    eecho $commun "       createpkg --all/-a"
-    eecho $commun "       createpkg --no-deps/-np package_name"
-    eecho $commun "       createpkg --search/-s package_name"
-    eecho $commun "       createpkg --info/-f package_name"
-    eecho $commun "       createpkg --list/-l"
-    eecho $commun "       createpkg --sync"
-    eecho $commun "       createpkg --help/-h"
-    exit
+    echo -e "${red}NAME${normal}
+        createpkg - create Slackware packages
+
+${red}SYNOPSIS
+        createpkg${normal} [${green}OPTIONS${normal}] [${green}program${normal}]
+
+${red}DESCRIPTION${normal}
+        [${green}program${normal}] name to build/search
+
+        Input ${green}OPTIONS${normal}:
+            ${red}-i${normal}, ${red}--install${normal} ${green}<program>${normal}
+                create the package ${green}<program>${normal} and install
+            ${red}-a${normal}, ${red}--all${normal}
+                create all packages and install
+            ${red}-np${normal}, ${red}--no-deps${normal}
+                does not solve dependences
+            ${red}-s${normal}, ${red}--search${normal} <program${normal}>
+                search for a ${green}<program>${normal}
+            ${red}-f${normal}, ${red}--info${normal} ${green}<program>${normal}
+                show description and dependences of the program
+            ${red}-l${normal}, ${red}--list${normal}
+                list all the SlackBuilds
+            ${red}--sync${normal}
+                synchronize SlackBuilds repository
+            ${red}-h${normal}, ${red}--help${normal}
+                show this help
+
+${red}EXAMPLES${normal}
+        ${red}createpkg -i scilab${normal}
+            build and install scilab package
+        ${red}createpkg -s at*${normal}
+            search for all at* SlackBuilds scripts (at-spi, atk, ...)
+        ${red}createpkg --info pyrex${normal}
+            show pyrex description and dependences
+
+${red}AUTHOR${normal}
+        Written by ${blue}Rudson R. Alves${normal}
+
+${red}AVAILABILITY${normal}
+        by svn: ${yellow}svn checkout svn://slack.sarava.org/simplepkg${normal}
+        this mkbuild is found in branches/0.6/
+
+${red}REPORTING BUGS${normal}
+        Report bugs to <${blue}rudsonalves[at]rra.etc.br${normal}>
+
+${red}COPYRIGHT${normal}
+        Copyright © 2006 Free Software Foundation, Inc.
+        This is free software. You may redistribute copies of it under the
+        terms of the GNU General Public License
+        <${yellow}http://www.gnu.org/licenses/gpl.html${normal}>. There is NO WARRANTY, to the
+        extent permitted by law." | more
 }
 
 function build_all_slackbuild {
index 809fbcd9bd8a9c4ca40157766d1dcc9b3a3b6174..2cc5e91b08b6a8553d4765dd4d6cd6a302c8d1a5 100755 (executable)
@@ -19,7 +19,7 @@
 # Based in model generic.SlackBuild of Luiz
 #
 # Version:
-PROG_VERSION=1.2.2
+PROG_VERSION=1.2.4
 PROG_NAME=`basename $0`
 
 #--------------------------------------------------------------------
@@ -29,92 +29,90 @@ function mkbuild_use()
 
 {
   # mkbuild help function
-  echo "
-NAME
-        mkbuild - create SlackBuild script from .mkbuild input file
+  echo -e "${red}NAME${normal}
+        mkbuild - create SlackBuild script from ${green}.mkbuild${normal} input file
 
-SYNOPSIS
-        mkbuild [OPIONS] [mkbuild_file]
+${red}SYNOPSIS
+        mkbuild${normal} [${green}OPTIONS${normal}] [${green}mkbuild_file${normal}]
 
-DESCRIPTION
-        <mkbuild_file> input file with build rules and variables
+${red}DESCRIPTION${normal}
+        [${green}mkbuild_file${normal}] input file with build rules and variables
 
-        Input options:
-            -a, --author <author_name>
+        Input OPTIONS:
+            ${red}-a${normal}, ${red}--author${normal} ${green}<author_name>${normal}
                 author name
-            -ai, --author_initials <initials>
+            ${red}-ai${normal}, ${red}--author_initials${normal} ${green}<initials>${normal}
                 author signature
-            -bn, --build-number
+            ${red}-bn${normal}, ${red}--build-number${normal}
                 change build number
-            -cs, --const_string <string>
+            ${red}-cs${normal}, ${red}--const_string${normal} ${green}<string>${normal}
                 construction string to source name
-            -j, --jobs <jobs_number>
+            ${red}-j${normal}, ${red}--jobs${normal} ${green}<jobs_number>${normal}
                 Number of jobs to run simultaneously
-            -md, --model <SlackBuild_model>
+            ${red}-md${normal}, ${red}--model${normal} ${green}<SlackBuild_model>${normal}
                 SlackBuild model file
-            -npss, --nps-strip
+            ${red}-npss${normal}, ${red}--nps-strip${normal}
                 Number of prefix slashes to strip
-            -pf, --patch-files
+            ${red}-pf${normal}, ${red}--patch-files${normal}
                 List of patch files
-            -pn, --pkg_name <package_name>
+            ${red}-pn${normal}, ${red}--pkg_name${normal} ${green}<package_name>${normal}
                 package name
-            --prefix <install_dir>
+            ${red}--prefix${normal} <install_dir>${normal}
                 Prefix install directory
-            -pv, --pkg_version <version>
+            ${red}-pv${normal}, ${red}--pkg_version${normal} ${green}<version>${normal}
                 package version
-            -sn, --src_name <source_name>
+            ${red}-sn${normal}, ${red}--src_name${normal} ${green}<source_name>${normal}
                 source name
-            -u, --url <url_address>
+            ${red}-u${normal}, ${red}--url${normal} ${green}<url_address>${normal}
                 url address to source
 
         Program options:
-        -d, --debug
+        ${red}-d${normal}, ${red}--debug${normal}
             enable debug mode
-        -cs, --commit-slackbuild
+        ${red}-cs${normal}, ${red}--commit-slackbuild${normal}
             commit SlackBuilds in local svn SlackBuild tree
-        -cm, --commit-mkbuild
+        ${red}-cm${normal}, ${red}--commit-mkbuild${normal}
             commit .mkbuild in local svn mkbuild tree
-        -c, --commit-all
+        ${red}-c${normal}, ${red}--commit-all${normal}
             commit SlackBuild and .mkbuild files in local svn tree
-        -h, --help
+        ${red}-h${normal}, ${red}--help${normal}
             this help mesage
-        -n, --new <mkbuild_name>
+        ${red}-n${normal}, ${red}--new${normal} ${green}<mkbuild_name>${normal}
             start a new mkbuild configure file
-        --sync
+        ${red}--sync${normal}
             synchronize mkbuilds repository
-        -v, --version
+        ${red}-v${normal}, ${red}--version${normal}
             program version
-        -V, --verbose
+        ${red}-V${normal}, ${red}--verbose${normal}
             print debug information
 
-EXAMPLES
-        mkbuild -c pyrex.mkbuild
+${red}EXAMPLES${normal}
+        ${red}mkbuild -c pyrex.mkbuild${normal}
             build pyrex.SlackBuild and commit .mkbuild and .SlackBuild in
             Slack.Sarava local tree.
-        mkbuild -a \"Jose Araujo\" -ai \"ja\" -n pyrex
+        ${red}mkbuild -a \"Jose Araujo\" -ai \"ja\" -n pyrex${normal}
             make a basic pyrex.mkbuild with author name \"Jose Araujo\" and
             author signature \"ja\".
-        mkbuild --prefix /usr/local pyrex.mkbuild
+        ${red}mkbuild --prefix /usr/local pyrex.mkbuild${normal}
             build pyrex.SlackBuild with prefix /usr/local and pyrex.mkbuild
             variables and options definitions.
 
-AUTHOR
-        Written by Rduson R. Alves
+${red}AUTHOR${normal}
+        Written by ${blue}Rudson R. Alves${normal}
 
-AVAILABILITY
-        by svn: svn checkout svn://slack.sarava.org/simplepkg
+${red}AVAILABILITY${normal}
+        by svn: ${yellow}svn checkout svn://slack.sarava.org/simplepkg${normal}
         this mkbuild is found in branches/0.6/
 
-REPORTING BUGS
-        Report bugs to <alves_list@yahoo.com.br>
+${red}REPORTING BUGS${normal}
+        Report bugs to <${blue}rudsonaalves[at]rra.etc.br${normal}>
 
-COPYRIGHT
+${red}COPYRIGHT${normal}
         Copyright © 2006 Free Software Foundation, Inc.
         This is free software. You may redistribute copies of it under the
         terms of the GNU General Public License
-        <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the
-        extent permitted by law.
-" | less
+        <${yellow}http://www.gnu.org/licenses/gpl.html${normal}>. There is NO WARRANTY,
+        to the extent permitted by law." | more
 }
 
 function set_parameters {
@@ -384,6 +382,7 @@ function build_slackbuild {
   # Remove sections names
   sed -i '/^<.*$/ d' $SLACKBUILD_TEMP
   # Remove clear lines
+  # isto pode ser feito com "cat -s SLACKBUILD_TEMP ..."
   sed -i ':i ; $! N; s/\n/Ø/ ; t i ; s/Ø\{3,\}/ØØ/g ; s/Ø/\n/g' $SLACKBUILD_TEMP
   # Remove from frist line do #!/... line
   sed '1,/^#\!/ {/^#\!/ b; d }' $SLACKBUILD_TEMP > $SLACKBUILD
@@ -841,9 +840,11 @@ if [ ! -z $MKBUILD_NAME ]; then
 
       # PATCH FILES
       PATCH_FILES=`validate_parameter "$PATCH_FILES" "PATCH FILES" ""`
+      [ $VERBOSE -eq $on ] && echo "[[PATCH_FILES]]=\"$PATCH_FILES\""
 
       # Strip  the smallest prefix containing num leading slashes from each file name found in the patch file.
       NPS_STRIP=`validate_parameter "$NPS_STRIP" "NUMBER OF PREFIX SLASHES TO STRIP" "1"`
+      [ $VERBOSE -eq $on ] && echo "[[NUMBER OF PREFIX SLASHES TO STRIP]]=\"$NPS_STRIP\""
 
       # SlackBuild path
       # SlackBuild path in mkbuild parameters file