sup view README @ rev 1

Improve README
author Christophe Lincoln <pankso@slitaz.org>
date Fri Feb 24 06:24:54 2017 +0100 (2017-02-24)
parents 798dc81db13b
children ea32afc2e4da
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 binary,
9 etc. Sup is designed to handle software that can/should be installed in user
10 space such as web frameworks.
12 This let user get involve in the project without coding skills, sup provide a
13 cmdline tool and a GTK+ interface to install and build packages. The server
14 provide a CGI web interface to upload packages receipt and files. The build
15 is a simple pack without compilations since the idea is to provide custom
16 tools using scripting languages or precompiled packages such as Firefox.
18 Sup will be also usefull in live mode with a persistent home mounted so users
19 will have installed sup packages 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 Where goes what ?
35 --------------------------------------------------------------------------------
37 * sup Client side cmdline tool to install and cook packages
38 --> /usr/bin/sup
39 * sup-box GTK+ Client side user iinterface 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 them self:
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, ther
63 use libtaz.sh and httphelper.sh functions. Sup use XDG directories paths to
64 store packages information and build process:
66 ~/.local User data, executables and sup database
67 ~/.cache Non-essiential 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 archive 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 use a minimal 'receipt' with an 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 Package can have a single receipt or a local/ folder with files to install. All
82 download 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 that:
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 accourding to the needs and goal
96 of the packages
98 Receipt variables and function
99 --------------------------------------------------------------------------------
100 Her is the variables used or usable in sup receipt as well as the uniq function.
101 Checkout 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 package but warn is 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 promt users to make an action.
117 Cook sup packages to be uploaded to server
118 --------------------------------------------------------------------------------
119 Sup let users upload package to server. To cook your first one you may want to
120 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 reconised by the system as sup packages using an 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 use 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 ================================================================================