sup view README @ rev 22

Some small fixes and update POT
author Christophe Lincoln <pankso@slitaz.org>
date Sun Feb 26 22:38:12 2017 +0100 (2017-02-26)
parents f10893862ba5
children f63ac3e0e9da
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 What goes where ?
36 --------------------------------------------------------------------------------
38 * sup Client side cmdline tool to install and cook packages
39 --> /usr/bin/sup
40 * sup-box GTK+ Client side user interface to manage packages
41 --> /usr/bin/sup-box
42 * libsup.sh Shared SHell function between sup tools
43 --> /usr/lib/slitaz/libsup.sh
44 * server Server side web interface: TinyCM/SCN plugin
45 --> http://scn.slitaz.org/?sup
48 Development environment
49 --------------------------------------------------------------------------------
50 It's easy to work on sup code, commands will talk by themselves:
52 --> Cmdline client
53 $ hg clone http://hg.slitaz.org/sup
54 $ cd sup && ./sup
56 --> Server side needs lighttpd & TinyCM install
57 $ make DESTDIR=/home/tux/Public/cgi-bin/tinycm server-install
58 $ tazweb http://localhost/~tux/cgi-bin/tinycm/?sup
61 Developers coding style
62 --------------------------------------------------------------------------------
63 Keep sup simple, clean and fast. Sup tools are written in SHell script, they
64 use libtaz.sh and httphelper.sh functions. Sup uses XDG directories paths to
65 store packages' information and build process:
67 ~/.local User data, executables and sup database
68 ~/.cache Non-essential data such as tmp and build files
69 ~/.config Peer user configuration files
72 Packages format and max size
73 --------------------------------------------------------------------------------
74 Sup packages are cpio archives compressed with lzma and with a .sup extension.
75 The goal is to have lightweight packages with every big file downloaded from
76 the web.
78 Sup uses a minimal 'receip' with a sup_install() function to dl any wanted
79 files, no pkg size or file list are created when packing. A list of installed
80 files is generated at install.
82 Packages can have a single receip or a local/ folder with files to install. All
83 downloading and extracting must be done in the cache to build up a list of files
84 before installing. The package folder tree should look like this:
86 * receip SUP package receip (receip NOT receipt ;-)
87 * README Optional sup package desc/howto
88 * files For all installed files
90 files/
91 |- local/bin For executable binaries and scripts
92 |- local/share/XXX Where XXX is the name of the package
93 |- local/share/applications All .desktop files for menu entry
94 ` config/ For any configuration file in ~/.config
96 More directories into files/ can be added according to the needs and goals
97 of the packages.
99 Receipt variables and function
100 --------------------------------------------------------------------------------
101 Here are the variables used or usable in a sup receip as well as the uniq function.
102 Check out the sup-demo package for a receip example.
104 * $build_date Auto added by 'sup cook' to get the build date
105 * $sup_size Auto added by 'sup cook' to get installed size
108 Packages dependencies
109 --------------------------------------------------------------------------------
110 Since sup is not run as root, less deps is better - but some precompiled packages
111 will need some system wide tools/libraries, sup will not install any system wide
112 packages but warns if dependencies are not installed if DEPENDS is set.
114 Sup packages can be very simple but also very complex, so feel free to use the
115 receip to warn or prompt users to make an action.
118 Cook sup packages to be uploaded to the server
119 --------------------------------------------------------------------------------
120 Sup lets users upload packages to the server. To cook your first one you may want to
121 use the sup-demo package:
123 $ sup cook --init
124 $ cp -rf /usr/share/sup/wok/sup-demo ~/.local/share/sup/wok
125 $ sup cook sup-demo
128 Mime type & Icon
129 --------------------------------------------------------------------------------
130 The *.sup file are recognised by the system as sup packages using a mime type
131 XML file installed in /usr/share/mime/packages/sup.xml. When data/mime/sup.xml
132 is newly installed you can update the mime database:
134 $ update-mime-database /usr/share/mime/
136 Sup uses a generic icon: application-x-archive
139 Translations
140 --------------------------------------------------------------------------------
141 To start a new translation please use msginit from the pot file directory.
142 Example for French/France locale (fr_FR):
144 $ msginit -l fr_FR -o fr.po -i tazbox.pot
146 To update all pot files when some new strings have been added (mainly for
147 developers before commit):
149 $ make pot
151 To update all translations from the pot file:
153 $ make msgmerge
155 To compile po files for testing purposes you can use 'make msgfmt' or manually
156 compile your translation. Example for french locale, note that the file must
157 be copied into /usr/share/locale/fr/LC_MESSAGES so gettext can find it:
159 $ msgfmt -o sup-client.mo fr.po
162 ================================================================================