mercurial-buildpackage(1) | User Commands | mercurial-buildpackage(1) |
mercurial-buildpackage - Build a .deb package from source code under Mercurial control.
mercurial-buildpackage [option] ...
mercurial-buildpackage builds a .deb package from within a Mercurial repository. The package is built either by use of pbuilder(1) or in-place, depending on the options.
--version, -V
--verbose, -v
--no-check-dependencies, -d
--include-source, -s, -sa
--from-version changelogversion, -f changelogversion
--source-only, -S
--configfile pbuilderconfigfile, -c pbuilderconfigfile
mercurial-buildpackage
mercurial-buildpackage -s -f 1.2-3 -c /home/jps/lenny-pbuilderrc
Let us assume that your package is called mypack. The package repository should be created by a regular hg init mypack command.
If mypack is a native package, then your repository will only have the usual default branch and mercurial-buildpackage will only affect the .hgtags file when mercurial-tagversion(1) is invoked to tag a release of mypack.
If mypack is a non-native package, then it will have a number of upstream tarballs, as specified in dpkg-source(1). Let us assume that the upstream tarballs are mypack_1.0.orig.tar.gz, mypack_1.0.orig-comp1.tar.bz2 and mypack_1.0.orig-comp2.tar.gz, and that you therefore use package format 3.0 (quilt). mercurial-buildpackage will then maintain the following branches.
So each upstream tarball will have its own branch which together with the pristine branch are used by mercurial-pristinetar(1) to recreate pristine upstream tarballs.
The upstream branch is used by mercurial-importorig(1) to merge new upstream versions into the mainline default branch; and by mercurial-port(1) to make alternative packages of selected upstream versions, for instance for backporting.
In general, you should leave alone all the branches dealing with upsteam sources, and only work in the default branch or branches created by mercurial-port(1) for porting.
fakeroot debian/rules clean dpkg-source -i.hg -b mypack .. debian/rules build debian/rules binary dpkg-genchanges > ../mypack_1.0-2_i386.changes
fakeroot debian/rules clean dpkg-source -i.hg -b mypack .. pbuilder --build --configfile ~/etc/sid-pbuilderrc ../mypack_1.0-2.dsc
Jens Peter Secher <jpsecher@gmail.com>
The ideas for this package originates from John Goerzen's hg-buildpackage.
dpkg-source(1), pbuilder(1), mercurial-importorig(1), mercurial-importdsc(1), mercurial-tagversion(1), mercurial-pristinetar(1), mercurial-port(1).
December 2009 | mercurial-buildpackage 0.10.1 (Debian) |