sup view README @ rev 0
Initial commit with the README
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri Feb 24 03:43:55 2017 +0100 (2017-02-24) |
parents | |
children | 78da11e1dd5e |
line source
1 SliTaz Users Packages
2 ================================================================================
5 The goal is to have a user land packages management system using SHell scripts
6 to pack and install files. The sup packages can install all kind of files such
7 as scripts, non free tools, icons, wallpapers, templates, pre-compiled binary,
8 etc. Sup is designed to handle software that can/should be installed in user
9 space such as web frameworks.
11 This let user get involve in the project without coding skills, sup provide a
12 cmdline tool and a GTK+ interface to install and build packages. The server
13 provide a CGI web interface to upload packages receipt and files. The build
14 is a simple pack without compilations since the idea is to provide custom
15 tools using scripting languages or precompiled packages such as Firefox.
17 Sup will be also usefull in live mode with a persistent home mounted so users
18 will have installed sup packages without having a too big rootfs in RAM.
20 Quickstart
21 --------------------------------------------------------------------------------
23 1) Get source:
24 $ hg clone http://hg.slitaz.org/sup
25 2) Change dir and become root:
26 $ cd sup && su
27 3) Install clients as root:
28 $ make && make install-clients
29 4) Play :-)
30 $ sup help
33 Where goes what ?
34 --------------------------------------------------------------------------------
36 * sup Client side cmdline tool to install and cook packages
37 --> /usr/bin/sup
38 * sup-box GTK+ Client side user iinterface to manage packages
39 --> /usr/bin/sup-box
40 * libsup.sh Shared SHell function between sup tools
41 --> /usr/lib/slitaz/libsup.sh
42 * server Server side web interface: TinyCM/SCN plugin
43 --> http://scn.slitaz.org/?sup
46 Development environment
47 --------------------------------------------------------------------------------
48 It's easy to work on sup code, commands will talk by them self:
50 --> Cmdline client
51 $ hg clone http://hg.slitaz.org/sup
52 $ cd sup && ./sup
54 --> Server side needs lighttpd & TinyCM install
55 $ make DESTDIR=/home/tux/Public/cgi-bin/tinycm server-install
56 $ tazweb http://localhost/~tux/cgi-bin/tinycm/?sup
59 Developers coding style
60 --------------------------------------------------------------------------------
61 Keep sup simple, clean and fast. Sup tools are written in SHell script, ther
62 use libtaz.sh and httphelper.sh functions. Sup use XDG directories paths to
63 store packages information and build process:
65 ~/.local User data, executables and sup database
66 ~/.cache Non-essiential data such as tmp and build files
67 ~/.config Peer user configuration files
70 Packages format and max size
71 --------------------------------------------------------------------------------
72 Sup packages are cpio archive compressed with lzma and with a .sup extension.
73 The goal is to have lightweight packages with every big file downloaded from
74 the web.
76 Sup use a minimal 'receipt' with an sup_install() function to dl any wanted
77 files, no pkg size or file list are created when packing. A list of installed
78 files is generated at install.
80 Package can have a single receipt or a local/ folder with files to install. All
81 download and extracting must be done in the cache to build-up a list of files
82 before installing. The package folder tree should look like that:
84 * receipt Sup package receipt
85 * README Optional sup package desc/howto
86 * files For all installed files
88 files/
89 |- local/bin For executable binaries and scripts
90 |- local/share/XXX Where XXX is the name of the package
91 |- local/share/applications All .desktop files for menu entry
92 ` config/ For any configuration file in ~/.config
94 More directories into files/ can be added accourding to the needs and goal
95 of the packages
97 Receipt variables and function
98 --------------------------------------------------------------------------------
99 Her is the variables used or usable in sup receipt as well as the uniq function.
100 Checkout the sup-demo package for a receipt example.
102 * $build_date Auto added by 'sup cook' to get the build date
103 * $sup_size Auto added by 'sup cook' to get installed size
106 Packages dependencies
107 --------------------------------------------------------------------------------
108 Since sup is not run as root, less deps is better but some precompiled packages
109 will need some system wide tools/libraries, sup will not install any system wide
110 package but warn is dependencies are not installed if DEPENDS is set.
112 Sup packages can be very simple but also very complex, so feel free to use the
113 receipt to warn or promt users to make an action.
116 Cook sup packages to be uploaded to server
117 --------------------------------------------------------------------------------
118 Sup let users upload package to server. To cook your first one you may want to
119 the sup-demo package:
121 $ sup cook --init
122 $ cp -rf /usr/share/sup/wok/sup-demo ~/.local/share/sup/wok
123 $ sup cook sup-demo
126 Mime type & Icon
127 --------------------------------------------------------------------------------
128 The *.sup file are reconised by the system as sup packages using an mime type
129 XML file installed in /usr/share/mime/packages/sup.xml. When data/mime/sup.xml
130 is newly installed you can update the mime database:
132 $ update-mime-database /usr/share/mime/
134 Icon paths: /usr/share/icons/hicolor/32x32/apps/sup.png
136 $ ln -s ../apps/sup.png \
137 /usr/share/icons/hicolor/32x32/mimetypes/application-x-sup.png
140 Translations
141 --------------------------------------------------------------------------------
142 To start a new translation please use msginit from the pot file directory.
143 Example for French/France locale (fr_FR):
145 $ msginit -l fr_FR -o fr.po -i tazbox.pot
147 To update all pot files when some new strings have been added (mainly for
148 developers before commit):
150 $ make pot
152 To update all translations from the pot file:
154 $ make msgmerge
156 To compile po files for testing purposes you can use 'make msgfmt' or manually
157 compile your translation. Example for french locale, note that the file must
158 be copied into /usr/share/locale/fr/LC_MESSAGES so gettext can find it:
160 $ msgfmt -o sup-client.mo fr.po
163 ================================================================================