# HG changeset patch # User Christophe Lincoln # Date 1488133231 -3600 # Node ID 85b9905011cb470f4a105000d0653602598eaf7f # Parent 827dfe35cf350ba6a6602fd5f664ade32b74fb71 Better help a source tree structure diff -r 827dfe35cf35 -r 85b9905011cb Makefile --- a/Makefile Sun Feb 26 19:00:04 2017 +0100 +++ b/Makefile Sun Feb 26 19:20:31 2017 +0100 @@ -45,8 +45,8 @@ install -m 0755 libsup.sh $(DESTDIR)$(PREFIX)/lib/slitaz install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications install -m 0644 data/mime/sup.xml $(DESTDIR)$(PREFIX)/share/mime/packages - install -m 0755 -d $(DESTDIR)$(PREFIX)/share/sup/wok - cp -rf wok/sup-demo $(DESTDIR)$(PREFIX)/share/sup/wok + install -m 0755 -d $(DESTDIR)$(PREFIX)/share/sup + cp -rf sup-demo $(DESTDIR)$(PREFIX)/share/sup cp -rf po/clients/mo/* $(DESTDIR)$(PREFIX)/share/locale # Use DESTDIR for TinyCM install path diff -r 827dfe35cf35 -r 85b9905011cb po/clients/fr.po --- a/po/clients/fr.po Sun Feb 26 19:00:04 2017 +0100 +++ b/po/clients/fr.po Sun Feb 26 19:20:31 2017 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Sup Clients\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-02-26 18:59+0100\n" +"POT-Creation-Date: 2017-02-26 19:19+0100\n" "PO-Revision-Date: 2017-02-23 14:15+0100\n" "Last-Translator: Christophe Lincoln \n" "Language-Team: French\n" @@ -31,12 +31,29 @@ msgid "Commands:" msgstr "" +#: sup:32 +msgid "Cook a package from the wok" +msgstr "" + +#: sup:33 +msgid "Extract a package to current dir" +msgstr "" + +#: sup:34 +#, fuzzy +msgid "Install a sup package" +msgstr "Installation de:" + +#: sup:35 +msgid "List installed packages and your wok" +msgstr "" + #: sup:37 msgid "Options:" msgstr "" #: sup:38 -msgid "Initialize sup build environment" +msgid "Initialize sup cook environment" msgstr "" #: sup:39 @@ -91,28 +108,28 @@ msgid "Extract package:" msgstr "" -#: sup:199 +#: sup:205 msgid "Can't find sup package:" msgstr "" -#: sup:204 +#: sup:210 msgid "Installed sup packages:" msgstr "" -#: sup:212 +#: sup:218 msgid "No sup packages installed" msgstr "" -#: sup:216 +#: sup:222 msgid "Sup packages in your wok:" msgstr "" -#: sup:234 +#: sup:240 #, fuzzy msgid "Installed package:" msgstr "Installation de:" -#: sup:243 +#: sup:249 msgid "Can't find installed package:" msgstr "" diff -r 827dfe35cf35 -r 85b9905011cb po/clients/sup-clients.pot --- a/po/clients/sup-clients.pot Sun Feb 26 19:00:04 2017 +0100 +++ b/po/clients/sup-clients.pot Sun Feb 26 19:20:31 2017 +0100 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Sup Clients\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-02-26 18:59+0100\n" +"POT-Creation-Date: 2017-02-26 19:19+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -29,12 +29,28 @@ msgid "Commands:" msgstr "" +#: sup:32 +msgid "Cook a package from the wok" +msgstr "" + +#: sup:33 +msgid "Extract a package to current dir" +msgstr "" + +#: sup:34 +msgid "Install a sup package" +msgstr "" + +#: sup:35 +msgid "List installed packages and your wok" +msgstr "" + #: sup:37 msgid "Options:" msgstr "" #: sup:38 -msgid "Initialize sup build environment" +msgid "Initialize sup cook environment" msgstr "" #: sup:39 @@ -89,27 +105,27 @@ msgid "Extract package:" msgstr "" -#: sup:199 +#: sup:205 msgid "Can't find sup package:" msgstr "" -#: sup:204 +#: sup:210 msgid "Installed sup packages:" msgstr "" -#: sup:212 +#: sup:218 msgid "No sup packages installed" msgstr "" -#: sup:216 +#: sup:222 msgid "Sup packages in your wok:" msgstr "" -#: sup:234 +#: sup:240 msgid "Installed package:" msgstr "" -#: sup:243 +#: sup:249 msgid "Can't find installed package:" msgstr "" diff -r 827dfe35cf35 -r 85b9905011cb sup --- a/sup Sun Feb 26 19:00:04 2017 +0100 +++ b/sup Sun Feb 26 19:20:31 2017 +0100 @@ -26,16 +26,16 @@ help() { cat << EOT -$(boldify $(gettext "Usage:")) $(basename $0) [command] [package] +$(boldify $(gettext "Usage:")) $(basename $0) [command|package] [package] $(boldify $(gettext "Commands:")) - -c cook - -e extract - -i install - -l list + -c cook $(gettext "Cook a package from the wok") + -e extract $(gettext "Extract a package to current dir") + -i install $(gettext "Install a sup package") + -l list $(gettext "List installed packages and your wok") $(boldify $(gettext "Options:")) - --init cook $(gettext "Initialize sup build environment") + --init cook $(gettext "Initialize sup cook environment") --verbose all $(gettext "Display more output messages") EOT @@ -191,10 +191,16 @@ install_sup "$pkg" && exit 0 fi - # Sup cooked - if [ -f "$cooked/$pkg" ]; then - install_sup "$cooked/$pkg" && exit 0 - fi + # Sup cooked from wok + if [ -f "$wok/$pkg/receip" ]; then + . $wok/$pkg/receip + if [ -f "$cooked/$PACKAGE-$VERSION.sup" ]; then + install_sup "$cooked/$PACKAGE-$VERSION.sup" && exit 0 + fi + fi + + # Sup on mirror + echo "TODO: check for package on mirror" gettext "Can't find sup package:"; colorize 31 " $pkg" ;; @@ -231,7 +237,7 @@ if [ -f "$installed/$pkg/receip" ]; then . ${installed}/${pkg}/receip newline - gettext "Installed package:"; colorize 32 " $PACKAGE $VERSION" + gettext "Installed package:"; colorize 36 " $PACKAGE $VERSION" separator echo "Short desc: $SHORT_DESC" echo "" diff -r 827dfe35cf35 -r 85b9905011cb sup-demo/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sup-demo/README Sun Feb 26 19:20:31 2017 +0100 @@ -0,0 +1,2 @@ +This optional README file can be used to give more information +about the package installation and usage diff -r 827dfe35cf35 -r 85b9905011cb sup-demo/files/config/sup-demo/demo.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sup-demo/files/config/sup-demo/demo.conf Sun Feb 26 19:20:31 2017 +0100 @@ -0,0 +1,3 @@ +# Configurable variable(s) +# +bugs="http://bugs.slitaz.org" diff -r 827dfe35cf35 -r 85b9905011cb sup-demo/files/local/bin/sup-demo --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sup-demo/files/local/bin/sup-demo Sun Feb 26 19:20:31 2017 +0100 @@ -0,0 +1,16 @@ +#!/bin/sh +# +# SliTaz User Package - Demo script +# Copyright (C) 2017 SliTaz GNU/Linux - BSD License +# +. /lib/libtaz.sh + +newline +echo "$(colorize 33 'Running script :') sup-demo" +echo "$(boldify 'Script dir :') $PWD" +echo "Timestamp : $(date)" +echo "Local path : $HOME/.local" +echo "Sleeping : 2 seconds" && sleep 2 +newline + +exit 0 diff -r 827dfe35cf35 -r 85b9905011cb sup-demo/receip --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sup-demo/receip Sun Feb 26 19:20:31 2017 +0100 @@ -0,0 +1,18 @@ +# SliTaz User Package receipt + +PACKAGE="sup-demo" +VERSION="0.1" +SHORT_DESC="Short package description and information" +MAINTAINER="devel@slitaz.org" +LICENSE="BSD" +WEB_SITE="http://www.slitaz.org/" + +# Sup dependencies will be automatically downloaded but system wide +# deps must be manually installed by root. +SUP_DEPS="" +DEPENDS="" + +# Here are the optional install rules (download, configure, etc) +sup_install() { + echo "Hello :-) I'm a demo package!" +} diff -r 827dfe35cf35 -r 85b9905011cb wok/sup-demo/README --- a/wok/sup-demo/README Sun Feb 26 19:00:04 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -This optional README file can be used to give more information -about the package installation and usage diff -r 827dfe35cf35 -r 85b9905011cb wok/sup-demo/files/config/sup-demo/demo.conf --- a/wok/sup-demo/files/config/sup-demo/demo.conf Sun Feb 26 19:00:04 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -# Configurable variable(s) -# -bugs="http://bugs.slitaz.org" diff -r 827dfe35cf35 -r 85b9905011cb wok/sup-demo/files/local/bin/sup-demo --- a/wok/sup-demo/files/local/bin/sup-demo Sun Feb 26 19:00:04 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -#!/bin/sh -# -# SliTaz User Package - Demo script -# Copyright (C) 2017 SliTaz GNU/Linux - BSD License -# -. /lib/libtaz.sh - -newline -echo "$(colorize 33 'Running script :') sup-demo" -echo "$(boldify 'Script dir :') $PWD" -echo "Timestamp : $(date)" -echo "Local path : $HOME/.local" -echo "Sleeping : 2 seconds" && sleep 2 -newline - -exit 0 diff -r 827dfe35cf35 -r 85b9905011cb wok/sup-demo/receip --- a/wok/sup-demo/receip Sun Feb 26 19:00:04 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -# SliTaz User Package receipt - -PACKAGE="sup-demo" -VERSION="0.1" -SHORT_DESC="Short package description and information" -MAINTAINER="devel@slitaz.org" -LICENSE="BSD" -WEB_SITE="http://www.slitaz.org/" - -# Sup dependencies will be automatically downloaded but system wide -# deps must be manually installed by root. -SUP_DEPS="" -DEPENDS="" - -# Here are the optional install rules (download, configure, etc) -sup_install() { - echo "Hello :-) I'm a demo package!" -}