sup view README @ rev 36

Improve download function
author Christophe Lincoln <pankso@slitaz.org>
date Tue Feb 28 19:35:14 2017 +0100 (2017-02-28)
parents 361b8459a302
children d58ceb6b8fe9
line source
1 README for SliTaz Users Packages (SUP)
2 ================================================================================
4 CURRENT : cook extract and install work nicely.
6 The goal is to have a user-land packages management system using SHell scripts
7 to pack and install files. The sup packages can install all kind of files such
8 as scripts, non free tools, icons, wallpapers, templates, pre-compiled binaries,
9 etc. Sup is designed to handle software that can/should be installed in user
10 space such as web frameworks.
12 This lets users get involved in the project without coding skills, sup provides a
13 cmdline tool and a GTK+ interface to install and build packages. The server
14 provides a CGI web interface to upload packages receipts and files. The build
15 is a simple pack without compilation since the idea is to provide custom
16 tools using scripting languages or precompiled packages such as Firefox.
18 Sup will be also useful in live mode with a persistent home mounted so users
19 will have sup packages installed without having a too big rootfs in RAM.
21 Quickstart
22 --------------------------------------------------------------------------------
24 1) Get source:
25 $ hg clone http://hg.slitaz.org/sup
27 2) Install SUP Tool:
28 $ cd sup && make
29 $ sudo make install
31 3) Play :-)
32 $ sup help
35 Cook SUP packages to be uploaded to the server
36 --------------------------------------------------------------------------------
37 Sup lets users upload packages to the server. To cook your first one you may want to
38 use the sup 'new' command:
40 $ sup -n
43 What goes where ?
44 --------------------------------------------------------------------------------
46 * sup Client side cmdline tool to install and cook packages
47 --> /usr/bin/sup
48 * sup-box GTK+ Client side user interface to manage packages
49 --> /usr/bin/sup-box
50 * libsup.sh Shared SHell function between sup tools
51 --> /usr/lib/slitaz/libsup.sh
52 * server Server side web interface: TinyCM/SCN plugin
53 --> http://scn.slitaz.org/?sup
56 Development environment
57 --------------------------------------------------------------------------------
58 It's easy to work on sup code, commands will talk by themselves:
60 --> Cmdline client
61 $ hg clone http://hg.slitaz.org/sup
62 $ cd sup && ./sup
64 --> Server side needs lighttpd & TinyCM install
65 $ make DESTDIR=/home/tux/Public/cgi-bin/tinycm server-install
66 $ tazweb http://localhost/~tux/cgi-bin/tinycm/?sup
69 Developers coding style
70 --------------------------------------------------------------------------------
71 Keep sup simple, clean and fast. Sup tools are written in SHell script, they
72 use libtaz.sh and httphelper.sh functions. Sup uses XDG directories paths to
73 store packages' information and build process:
75 ~/.local User data, executables and sup database
76 ~/.cache Non-essential data such as tmp and build files
77 ~/.config Peer user configuration files
80 Packages format and max size
81 --------------------------------------------------------------------------------
82 Sup packages are cpio archives compressed with lzma and with a .sup extension.
83 The goal is to have lightweight packages with every big file downloaded from
84 the web.
86 Sup uses a minimal 'receip' with a sup_install() function to dl any wanted
87 files, no pkg size or file list are created when packing. A list of installed
88 files is generated at install.
90 Packages can have a single receip or a local/ folder with files to install. All
91 downloading and extracting must be done in the cache to build up a list of files
92 before installing. The package folder tree should look like this:
94 * receip SUP package receip (receip NOT receipt ;-)
95 * README Optional sup package desc/howto
96 * files For all installed files
98 files/
99 |- local/bin For executable binaries and scripts
100 |- local/share/XXX Where XXX is the name of the package
101 |- local/share/applications All .desktop files for menu entry
102 ` config/ For any configuration file in ~/.config
104 More directories into files/ can be added according to the needs and goals
105 of the packages.
108 Receipt variables and function
109 --------------------------------------------------------------------------------
110 Here are the variables used or usable in a sup receip as well as the uniq function.
111 Check out the sup-demo package for a receip example.
113 * $build_date Auto added by 'sup cook' to get the build date
114 * $sup_size Auto added by 'sup cook' to get installed size
117 Packages dependencies
118 --------------------------------------------------------------------------------
119 Since sup is not run as root, less deps is better - but some precompiled packages
120 will need some system wide tools/libraries, sup will not install any system wide
121 packages but warns if dependencies are not installed if DEPENDS is set.
123 Sup packages can be very simple but also very complex, so feel free to use the
124 receip to warn or prompt users to make an action.
127 Colors shems for sup tools
128 --------------------------------------------------------------------------------
129 Here are the colors guide line used in the cmdline tool:
131 [036/36] Cyan for installed/mirror
132 [035/35] Magenta for cook/wok
133 [033/33] Yellow for commands/functions
135 The CGI/Web hug services match SCN/SliTaz network graphical style.
138 Mime type & Icon
139 --------------------------------------------------------------------------------
140 The *.sup file are recognised by the system as sup packages using a mime type
141 XML file installed in /usr/share/mime/packages/sup.xml. When data/mime/sup.xml
142 is newly installed you can update the mime database:
144 $ update-mime-database /usr/share/mime/
146 Sup uses a generic icon: application-x-archive
149 Translations
150 --------------------------------------------------------------------------------
151 To start a new translation please use msginit from the pot file directory.
152 Example for French/France locale (fr_FR):
154 $ msginit -l fr_FR -o fr.po -i tazbox.pot
156 To update all pot files when some new strings have been added (mainly for
157 developers before commit):
159 $ make pot
161 To update all translations from the pot file:
163 $ make msgmerge
165 To compile po files for testing purposes you can use 'make msgfmt' or manually
166 compile your translation. Example for french locale, note that the file must
167 be copied into /usr/share/locale/fr/LC_MESSAGES so gettext can find it:
169 $ msgfmt -o sup-client.mo fr.po
172 ================================================================================