-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

here are some of my tips when packaging unofficial software as .debs.
Perhaps its useful for someone :)

Packaging tips for unofficial packages
======================================

Maintainer email
- ----------------
You can set the DEBEMAIL environment variable if you like to have a
different email address for Debian packaging. Example:
export [EMAIL PROTECTED]


Native Package or not?
- ----------------------
Short answer: don't make a native package. Be sure to provide a
.orig.tar.gz before calling $(DEBUILD).
a) Download the original mypackage-1.0.tar.gz
b) Rename it to an original upstream file (notice the underscore
   instead of a dash):
   mv mypackage-1.0.tar.gz mypackage_1.0.orig.tar.gz
c) Untar it and run dh_make, answer its questions:
   tar xzvf mypackage_1.0.orig.tar.gz
   cd mypackage-1.0 && dh_make; cd ..
d) As we have already the orig.tar.gz, delete the .orig tree:
   rm -rf mypackage-1.0.orig
e) edit mypackage-1.0/debian/* and build your debian package
   (see below for the $(DEBUILD) variable):
   cd mypackage-1.0 && $(DEBUILD)


Package version
- ---------------
The Debian package version number is parsed from the top entry of
debian/changelog, eg. "mypackage (1.1-0.1) unstable; urgency=low".
Notice here the "-0.1", this is the debian internal number, and it must
be lower than "-1" for unofficial packages. Subsequent releases must
have "-0.2", "-0.3", etc.
An official package will have "1.1-1".

If there is already an official package eg with version "1.1-4", then
use "1.1-4.1", "1.1-4.2", ...


Package description
- -------------------
If you already maintain official Debian packages, your package description
can note that this is not an official one. I usually add these two lines
in front of the package description to remind users that even if this
package is signed by my GPG key, its not an official one:
File debian/control:
Description: this is mypackage
 *** Unofficial package from [EMAIL PROTECTED] ***
 .
 <description follows>


Bug reports
- -----------
The standard tool for reporting bugs is "reportbug".
Your package should have:
File /usr/share/bug/mypackage/control:
Send-To: [EMAIL PROTECTED]

See /usr/share/doc/reportbug/README.developers for more info.


Building the package
- --------------------
You should sign your packages with your GPG key. Run "gpg --gen-key"
to generate one.
You can also use my patch at http://bugs.debian.org/178456 to add --linda
option to debuild.
Here is the debuild line I am using right now (you have to replace
32EC6F3E with your own GPG key id):
File Makefile:
# run debuild, log everything to [EMAIL PROTECTED]
define DEBUILD
        (debuild -pgpg -sgpg -k32EC6F3E -tc -L -i 2>/dev/stdout && echo "built 
ok" > ../$@) | tee ../[EMAIL PROTECTED]
endef
mypackage:
        cd mypackage-1.1 && $(DEBUILD)


Making it apt-get'able
- ----------------------
a) Configure dput:
   File /home/joe/.dput.cf:
   [local]
   fqdn = localhost
   incoming = /home/joe/myarchive
   allow_unsigned_uploads = 0

b) Copy all mypackage files into your archive:
   dput local mypackage_1.1-0.1.changes

c) Change into the myarchive directory and call:
   apt-ftparchive sources . | gzip -9 > Sources.gz
   apt-ftparchive packages . | gzip -9 > Packages.gz

d) As root, add the deb and deb-src line:
   File /etc/apt/sources.list:
   # ... more deb lines above
   deb file:/home/joe/myarchive ./
   deb-src file:/home/joe/myarchive ./

e) make it available for others by putting myarchive on a webserver.
   Then others can have
   File /etc/apt/sources.list:
   # my http repository
   deb http://www.joesdomain.org/~joe/myarchive ./
   deb-src http://www.joesdomain.org/~joe/myarchive ./


Cheers, Bastian

- -- 
     Bastian Kleineidam

 Atombombe · Plutonium · Fat Man · Do it Yourself · Tim Taylor
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+X4FbeBwlBDLsbz4RAml6AKDFvK2jPyZvGR0ceE30MtlQ7t++DwCbBTSU
IDTwzU66KSeQD1b2MjNg+HY=
=qYHC
-----END PGP SIGNATURE-----

Reply via email to