Fixed setting of $PUBLISH_COMMAND
[deb2zero.git] / doc / README
blobcd27a414a9f2fd95619c9190c5688e7aedad2afe
1 deb2zero - publish Debian packages using Zero Install
3 Copyright Thomas Leonard, 2008
6 INTRODUCTION
8 Zero Install is a decentralised installation system. Meta-data about each
9 package is published in a "feed" file. The Zero Install client reads these
10 feeds files and downloads and runs the programs. For details, see:
12   http://0install.net for details.
14 The feed files can be created manually (e.g. using 0publish or 0publish-gui):
16   http://0install.net/0publish.html
17   http://0install.net/injector-packagers.html
19 However, Debian packages already contain much of the required information. This
20 program extracts the information in an existing Debian package and uses it to
21 generate the feed.
24 INSTRUCTIONS
26 To download and create a short-cut to deb2zero:
28   $ 0alias deb2zero http://0install.net/2008/interfaces/deb2zero.xml
30 To create a feed for the GQView image viewer:
32   $ deb2zero http://ftp.uk.debian.org/debian/pool/main/g/gqview/gqview_2.0.1-1_i386.deb GQView.xml
34 You will be prompted to "Enter the URI for this feed". This is the URL from
35 which other people will download your feed file.
37 Note: deb2zero guesses some things (such as which binary to run by default if
38 the package contains several) so you should check the feed file manually and
39 edit if required.
41 To test the feed:
43   $ 0launch ./GQView.xml
45 If you want to publish the feed so that others can use it, you'll also need to
46 sign it. You can do this by specifying a GPG key with the --key option, e.g.:
48   $ deb2zero -k Bob http://.../package.deb
50 See the packaging tutorial for more details:
52   http://0install.net/injector-packagers.html
54 To add a new version to your feed later:
56   $ deb2zero http://.../new-version.deb GQView.xml
59 USING A PACKAGES FILE
61 As an alternative to specifying the URL of the Debian package directly, you can
62 download the index file to the current directory and then just give the package
63 name. e.g.
65   $ wget ftp://ftp.debian.org/debian/dists/stable/main/binary-amd64/Packages.bz2
66   $ bunzip2 Packages.bz2
67   $ deb2zero gqview GQView.xml
70 DEPENDENCIES
72 deb2zero can process the 'Depends' field in a Debian package and generate a
73 corresponding <requires> element in the feed. For this to work, you need to
74 create a file called '~/.config/0install.net/deb2zero/deb-mappings' [1],
75 mapping from Debian package names to Zero Install feed URIs, one per line. For
76 example:
78 libfoo: http://0install.net/2008/3rd-party/libfoo.xml
80 deb2zero will then turn
82   Depends: libfoo
84 into
86   <requires interface="http://0install.net/2008/3rd-party/libfoo.xml">
87     <environment insert="usr/lib" name="LD_LIBRARY_PATH"/>
88   </requires>
90 Note that setting LD_LIBRARY_PATH is just a guess. It may be that the package
91 depends on libfoo in some other way (e.g. it needs a binary in $PATH). In that
92 case, you'll need to edit the feed to correct it.
94 When you create a new feed, deb2zero automatically appends the new mapping
95 to the deb-mappings file for you. The last line of the file is also used to
96 suggest a default when naming new feeds.
99 LIMITATIONS
101 Version restrictions in dependencies are not currently handled.
103 Source packages are not handled; you have to add the 0compile directives
104 manually.
107 CONDITIONS
109 This library is free software; you can redistribute it and/or
110 modify it under the terms of the GNU Lesser General Public
111 License as published by the Free Software Foundation; either
112 version 3 of the License, or (at your option) any later version.
114 This library is distributed in the hope that it will be useful,
115 but WITHOUT ANY WARRANTY; without even the implied warranty of
116 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
117 Lesser General Public License for more details.
119 You should have received a copy of the GNU Lesser General Public
120 License along with this library; if not, write to the Free Software
121 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
124 BUG REPORTS
126 Please report any bugs to the mailing list:
128         http://0install.net/support.html
130 [1] See freedesktop.org basedir specification for full details.