sup view README @ rev 11

Tiny edits (receip -> receipt)
author Paul Issott <paul@slitaz.org>
date Sun Feb 26 10:04:31 2017 +0000 (2017-02-26)
parents ea32afc2e4da
children 361b8459a302
line source
1 SliTaz Users Packages
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
26 2) Change dir and become root:
27 $ cd sup && su
28 3) Install clients as root:
29 $ make && make install-clients
30 4) Play :-)
31 $ sup help
34 What goes where ?
35 --------------------------------------------------------------------------------
37 * sup Client side cmdline tool to install and cook packages
38 --> /usr/bin/sup
39 * sup-box GTK+ Client side user interface to manage packages
40 --> /usr/bin/sup-box
41 * libsup.sh Shared SHell function between sup tools
42 --> /usr/lib/slitaz/libsup.sh
43 * server Server side web interface: TinyCM/SCN plugin
44 --> http://scn.slitaz.org/?sup
47 Development environment
48 --------------------------------------------------------------------------------
49 It's easy to work on sup code, commands will talk by themselves:
51 --> Cmdline client
52 $ hg clone http://hg.slitaz.org/sup
53 $ cd sup && ./sup
55 --> Server side needs lighttpd & TinyCM install
56 $ make DESTDIR=/home/tux/Public/cgi-bin/tinycm server-install
57 $ tazweb http://localhost/~tux/cgi-bin/tinycm/?sup
60 Developers coding style
61 --------------------------------------------------------------------------------
62 Keep sup simple, clean and fast. Sup tools are written in SHell script, they
63 use libtaz.sh and httphelper.sh functions. Sup uses XDG directories paths to
64 store packages' information and build process:
66 ~/.local User data, executables and sup database
67 ~/.cache Non-essential data such as tmp and build files
68 ~/.config Peer user configuration files
71 Packages format and max size
72 --------------------------------------------------------------------------------
73 Sup packages are cpio archives compressed with lzma and with a .sup extension.
74 The goal is to have lightweight packages with every big file downloaded from
75 the web.
77 Sup uses a minimal 'receipt' with a sup_install() function to dl any wanted
78 files, no pkg size or file list are created when packing. A list of installed
79 files is generated at install.
81 Packages can have a single receipt or a local/ folder with files to install. All
82 downloading and extracting must be done in the cache to build up a list of files
83 before installing. The package folder tree should look like this:
85 * receipt Sup package receipt
86 * README Optional sup package desc/howto
87 * files For all installed files
89 files/
90 |- local/bin For executable binaries and scripts
91 |- local/share/XXX Where XXX is the name of the package
92 |- local/share/applications All .desktop files for menu entry
93 ` config/ For any configuration file in ~/.config
95 More directories into files/ can be added according to the needs and goals
96 of the packages.
98 Receipt variables and function
99 --------------------------------------------------------------------------------
100 Here are the variables used or usable in a sup receipt as well as the uniq function.
101 Check out the sup-demo package for a receipt example.
103 * $build_date Auto added by 'sup cook' to get the build date
104 * $sup_size Auto added by 'sup cook' to get installed size
107 Packages dependencies
108 --------------------------------------------------------------------------------
109 Since sup is not run as root, less deps is better - but some precompiled packages
110 will need some system wide tools/libraries, sup will not install any system wide
111 packages but warns if dependencies are not installed if DEPENDS is set.
113 Sup packages can be very simple but also very complex, so feel free to use the
114 receipt to warn or prompt users to make an action.
117 Cook sup packages to be uploaded to the server
118 --------------------------------------------------------------------------------
119 Sup lets users upload packages to the server. To cook your first one you may want to
120 use the sup-demo package:
122 $ sup cook --init
123 $ cp -rf /usr/share/sup/wok/sup-demo ~/.local/share/sup/wok
124 $ sup cook sup-demo
127 Mime type & Icon
128 --------------------------------------------------------------------------------
129 The *.sup file are recognised by the system as sup packages using a mime type
130 XML file installed in /usr/share/mime/packages/sup.xml. When data/mime/sup.xml
131 is newly installed you can update the mime database:
133 $ update-mime-database /usr/share/mime/
135 Sup uses a generic icon: application-x-archive
138 Translations
139 --------------------------------------------------------------------------------
140 To start a new translation please use msginit from the pot file directory.
141 Example for French/France locale (fr_FR):
143 $ msginit -l fr_FR -o fr.po -i tazbox.pot
145 To update all pot files when some new strings have been added (mainly for
146 developers before commit):
148 $ make pot
150 To update all translations from the pot file:
152 $ make msgmerge
154 To compile po files for testing purposes you can use 'make msgfmt' or manually
155 compile your translation. Example for french locale, note that the file must
156 be copied into /usr/share/locale/fr/LC_MESSAGES so gettext can find it:
158 $ msgfmt -o sup-client.mo fr.po
161 ================================================================================