sup rev 19

Better help a source tree structure
author Christophe Lincoln <pankso@slitaz.org>
date Sun Feb 26 19:20:31 2017 +0100 (2017-02-26)
parents 827dfe35cf35
children c0a780b534c2
files Makefile po/clients/fr.po po/clients/sup-clients.pot sup sup-demo/README sup-demo/files/config/sup-demo/demo.conf sup-demo/files/local/bin/sup-demo sup-demo/receip wok/sup-demo/README wok/sup-demo/files/config/sup-demo/demo.conf wok/sup-demo/files/local/bin/sup-demo wok/sup-demo/receip
line diff
     1.1 --- a/Makefile	Sun Feb 26 19:00:04 2017 +0100
     1.2 +++ b/Makefile	Sun Feb 26 19:20:31 2017 +0100
     1.3 @@ -45,8 +45,8 @@
     1.4  	install -m 0755 libsup.sh $(DESTDIR)$(PREFIX)/lib/slitaz
     1.5  	install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications
     1.6  	install -m 0644 data/mime/sup.xml $(DESTDIR)$(PREFIX)/share/mime/packages
     1.7 -	install -m 0755 -d $(DESTDIR)$(PREFIX)/share/sup/wok
     1.8 -	cp -rf wok/sup-demo $(DESTDIR)$(PREFIX)/share/sup/wok
     1.9 +	install -m 0755 -d $(DESTDIR)$(PREFIX)/share/sup
    1.10 +	cp -rf sup-demo $(DESTDIR)$(PREFIX)/share/sup
    1.11  	cp -rf po/clients/mo/* $(DESTDIR)$(PREFIX)/share/locale
    1.12  
    1.13  # Use DESTDIR for TinyCM install path
     2.1 --- a/po/clients/fr.po	Sun Feb 26 19:00:04 2017 +0100
     2.2 +++ b/po/clients/fr.po	Sun Feb 26 19:20:31 2017 +0100
     2.3 @@ -7,7 +7,7 @@
     2.4  msgstr ""
     2.5  "Project-Id-Version: Sup Clients\n"
     2.6  "Report-Msgid-Bugs-To: \n"
     2.7 -"POT-Creation-Date: 2017-02-26 18:59+0100\n"
     2.8 +"POT-Creation-Date: 2017-02-26 19:19+0100\n"
     2.9  "PO-Revision-Date: 2017-02-23 14:15+0100\n"
    2.10  "Last-Translator: Christophe Lincoln <pankso@slitaz.org>\n"
    2.11  "Language-Team: French\n"
    2.12 @@ -31,12 +31,29 @@
    2.13  msgid "Commands:"
    2.14  msgstr ""
    2.15  
    2.16 +#: sup:32
    2.17 +msgid "Cook a package from the wok"
    2.18 +msgstr ""
    2.19 +
    2.20 +#: sup:33
    2.21 +msgid "Extract a package to current dir"
    2.22 +msgstr ""
    2.23 +
    2.24 +#: sup:34
    2.25 +#, fuzzy
    2.26 +msgid "Install a sup package"
    2.27 +msgstr "Installation de:"
    2.28 +
    2.29 +#: sup:35
    2.30 +msgid "List installed packages and your wok"
    2.31 +msgstr ""
    2.32 +
    2.33  #: sup:37
    2.34  msgid "Options:"
    2.35  msgstr ""
    2.36  
    2.37  #: sup:38
    2.38 -msgid "Initialize sup build environment"
    2.39 +msgid "Initialize sup cook environment"
    2.40  msgstr ""
    2.41  
    2.42  #: sup:39
    2.43 @@ -91,28 +108,28 @@
    2.44  msgid "Extract package:"
    2.45  msgstr ""
    2.46  
    2.47 -#: sup:199
    2.48 +#: sup:205
    2.49  msgid "Can't find sup package:"
    2.50  msgstr ""
    2.51  
    2.52 -#: sup:204
    2.53 +#: sup:210
    2.54  msgid "Installed sup packages:"
    2.55  msgstr ""
    2.56  
    2.57 -#: sup:212
    2.58 +#: sup:218
    2.59  msgid "No sup packages installed"
    2.60  msgstr ""
    2.61  
    2.62 -#: sup:216
    2.63 +#: sup:222
    2.64  msgid "Sup packages in your wok:"
    2.65  msgstr ""
    2.66  
    2.67 -#: sup:234
    2.68 +#: sup:240
    2.69  #, fuzzy
    2.70  msgid "Installed package:"
    2.71  msgstr "Installation de:"
    2.72  
    2.73 -#: sup:243
    2.74 +#: sup:249
    2.75  msgid "Can't find installed package:"
    2.76  msgstr ""
    2.77  
     3.1 --- a/po/clients/sup-clients.pot	Sun Feb 26 19:00:04 2017 +0100
     3.2 +++ b/po/clients/sup-clients.pot	Sun Feb 26 19:20:31 2017 +0100
     3.3 @@ -8,7 +8,7 @@
     3.4  msgstr ""
     3.5  "Project-Id-Version: Sup Clients\n"
     3.6  "Report-Msgid-Bugs-To: \n"
     3.7 -"POT-Creation-Date: 2017-02-26 18:59+0100\n"
     3.8 +"POT-Creation-Date: 2017-02-26 19:19+0100\n"
     3.9  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    3.10  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    3.11  "Language-Team: LANGUAGE <LL@li.org>\n"
    3.12 @@ -29,12 +29,28 @@
    3.13  msgid "Commands:"
    3.14  msgstr ""
    3.15  
    3.16 +#: sup:32
    3.17 +msgid "Cook a package from the wok"
    3.18 +msgstr ""
    3.19 +
    3.20 +#: sup:33
    3.21 +msgid "Extract a package to current dir"
    3.22 +msgstr ""
    3.23 +
    3.24 +#: sup:34
    3.25 +msgid "Install a sup package"
    3.26 +msgstr ""
    3.27 +
    3.28 +#: sup:35
    3.29 +msgid "List installed packages and your wok"
    3.30 +msgstr ""
    3.31 +
    3.32  #: sup:37
    3.33  msgid "Options:"
    3.34  msgstr ""
    3.35  
    3.36  #: sup:38
    3.37 -msgid "Initialize sup build environment"
    3.38 +msgid "Initialize sup cook environment"
    3.39  msgstr ""
    3.40  
    3.41  #: sup:39
    3.42 @@ -89,27 +105,27 @@
    3.43  msgid "Extract package:"
    3.44  msgstr ""
    3.45  
    3.46 -#: sup:199
    3.47 +#: sup:205
    3.48  msgid "Can't find sup package:"
    3.49  msgstr ""
    3.50  
    3.51 -#: sup:204
    3.52 +#: sup:210
    3.53  msgid "Installed sup packages:"
    3.54  msgstr ""
    3.55  
    3.56 -#: sup:212
    3.57 +#: sup:218
    3.58  msgid "No sup packages installed"
    3.59  msgstr ""
    3.60  
    3.61 -#: sup:216
    3.62 +#: sup:222
    3.63  msgid "Sup packages in your wok:"
    3.64  msgstr ""
    3.65  
    3.66 -#: sup:234
    3.67 +#: sup:240
    3.68  msgid "Installed package:"
    3.69  msgstr ""
    3.70  
    3.71 -#: sup:243
    3.72 +#: sup:249
    3.73  msgid "Can't find installed package:"
    3.74  msgstr ""
    3.75  
     4.1 --- a/sup	Sun Feb 26 19:00:04 2017 +0100
     4.2 +++ b/sup	Sun Feb 26 19:20:31 2017 +0100
     4.3 @@ -26,16 +26,16 @@
     4.4  help() {
     4.5  	cat << EOT
     4.6  
     4.7 -$(boldify $(gettext "Usage:")) $(basename $0) [command] [package]
     4.8 +$(boldify $(gettext "Usage:")) $(basename $0) [command|package] [package]
     4.9  
    4.10  $(boldify $(gettext "Commands:"))
    4.11 -  -c  cook
    4.12 -  -e  extract
    4.13 -  -i  install
    4.14 -  -l  list
    4.15 +  -c  cook           $(gettext "Cook a package from the wok")
    4.16 +  -e  extract        $(gettext "Extract a package to current dir")
    4.17 +  -i  install        $(gettext "Install a sup package")
    4.18 +  -l  list           $(gettext "List installed packages and your wok")
    4.19  
    4.20  $(boldify $(gettext "Options:"))
    4.21 -  --init     cook    $(gettext "Initialize sup build environment")
    4.22 +  --init     cook    $(gettext "Initialize sup cook environment")
    4.23    --verbose  all     $(gettext "Display more output messages")
    4.24  
    4.25  EOT
    4.26 @@ -191,10 +191,16 @@
    4.27  			install_sup "$pkg" && exit 0
    4.28  		fi
    4.29  		
    4.30 -		# Sup cooked
    4.31 -		if [ -f "$cooked/$pkg" ]; then
    4.32 -			install_sup "$cooked/$pkg" && exit 0
    4.33 -		fi 
    4.34 +		# Sup cooked from wok
    4.35 +		if [ -f "$wok/$pkg/receip" ]; then
    4.36 +			. $wok/$pkg/receip
    4.37 +			if [ -f "$cooked/$PACKAGE-$VERSION.sup" ]; then
    4.38 +				install_sup "$cooked/$PACKAGE-$VERSION.sup" && exit 0
    4.39 +			fi
    4.40 +		fi
    4.41 +		
    4.42 +		# Sup on mirror
    4.43 +		echo "TODO: check for package on mirror"
    4.44  		
    4.45  		gettext "Can't find sup package:"; colorize 31 " $pkg" ;;
    4.46  	
    4.47 @@ -231,7 +237,7 @@
    4.48  		if [ -f "$installed/$pkg/receip" ]; then
    4.49  			. ${installed}/${pkg}/receip
    4.50  			newline
    4.51 -			gettext "Installed package:"; colorize 32 " $PACKAGE $VERSION"
    4.52 +			gettext "Installed package:"; colorize 36 " $PACKAGE $VERSION"
    4.53  			separator
    4.54  			echo "Short desc: $SHORT_DESC"
    4.55  			echo ""
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/sup-demo/README	Sun Feb 26 19:20:31 2017 +0100
     5.3 @@ -0,0 +1,2 @@
     5.4 +This optional README file can be used to give more information
     5.5 +about the package installation and usage
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/sup-demo/files/config/sup-demo/demo.conf	Sun Feb 26 19:20:31 2017 +0100
     6.3 @@ -0,0 +1,3 @@
     6.4 +# Configurable variable(s)
     6.5 +#
     6.6 +bugs="http://bugs.slitaz.org"
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/sup-demo/files/local/bin/sup-demo	Sun Feb 26 19:20:31 2017 +0100
     7.3 @@ -0,0 +1,16 @@
     7.4 +#!/bin/sh
     7.5 +#
     7.6 +# SliTaz User Package - Demo script
     7.7 +# Copyright (C) 2017 SliTaz GNU/Linux - BSD License
     7.8 +#
     7.9 +. /lib/libtaz.sh
    7.10 +
    7.11 +newline
    7.12 +echo "$(colorize 33 'Running script :') sup-demo"
    7.13 +echo "$(boldify 'Script dir     :') $PWD"
    7.14 +echo "Timestamp      : $(date)"
    7.15 +echo "Local path     : $HOME/.local"
    7.16 +echo "Sleeping       : 2 seconds" && sleep 2
    7.17 +newline
    7.18 +
    7.19 +exit 0
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/sup-demo/receip	Sun Feb 26 19:20:31 2017 +0100
     8.3 @@ -0,0 +1,18 @@
     8.4 +# SliTaz User Package receipt
     8.5 +
     8.6 +PACKAGE="sup-demo"
     8.7 +VERSION="0.1"
     8.8 +SHORT_DESC="Short package description and information"
     8.9 +MAINTAINER="devel@slitaz.org"
    8.10 +LICENSE="BSD"
    8.11 +WEB_SITE="http://www.slitaz.org/"
    8.12 +
    8.13 +# Sup dependencies will be automatically downloaded but system wide 
    8.14 +# deps must be manually installed by root.
    8.15 +SUP_DEPS=""
    8.16 +DEPENDS=""
    8.17 +
    8.18 +# Here are the optional install rules (download, configure, etc)
    8.19 +sup_install() {
    8.20 +	echo "Hello :-) I'm a demo package!"
    8.21 +} 
     9.1 --- a/wok/sup-demo/README	Sun Feb 26 19:00:04 2017 +0100
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,2 +0,0 @@
     9.4 -This optional README file can be used to give more information
     9.5 -about the package installation and usage
    10.1 --- a/wok/sup-demo/files/config/sup-demo/demo.conf	Sun Feb 26 19:00:04 2017 +0100
    10.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.3 @@ -1,3 +0,0 @@
    10.4 -# Configurable variable(s)
    10.5 -#
    10.6 -bugs="http://bugs.slitaz.org"
    11.1 --- a/wok/sup-demo/files/local/bin/sup-demo	Sun Feb 26 19:00:04 2017 +0100
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,16 +0,0 @@
    11.4 -#!/bin/sh
    11.5 -#
    11.6 -# SliTaz User Package - Demo script
    11.7 -# Copyright (C) 2017 SliTaz GNU/Linux - BSD License
    11.8 -#
    11.9 -. /lib/libtaz.sh
   11.10 -
   11.11 -newline
   11.12 -echo "$(colorize 33 'Running script :') sup-demo"
   11.13 -echo "$(boldify 'Script dir     :') $PWD"
   11.14 -echo "Timestamp      : $(date)"
   11.15 -echo "Local path     : $HOME/.local"
   11.16 -echo "Sleeping       : 2 seconds" && sleep 2
   11.17 -newline
   11.18 -
   11.19 -exit 0
    12.1 --- a/wok/sup-demo/receip	Sun Feb 26 19:00:04 2017 +0100
    12.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.3 @@ -1,18 +0,0 @@
    12.4 -# SliTaz User Package receipt
    12.5 -
    12.6 -PACKAGE="sup-demo"
    12.7 -VERSION="0.1"
    12.8 -SHORT_DESC="Short package description and information"
    12.9 -MAINTAINER="devel@slitaz.org"
   12.10 -LICENSE="BSD"
   12.11 -WEB_SITE="http://www.slitaz.org/"
   12.12 -
   12.13 -# Sup dependencies will be automatically downloaded but system wide 
   12.14 -# deps must be manually installed by root.
   12.15 -SUP_DEPS=""
   12.16 -DEPENDS=""
   12.17 -
   12.18 -# Here are the optional install rules (download, configure, etc)
   12.19 -sup_install() {
   12.20 -	echo "Hello :-) I'm a demo package!"
   12.21 -}