[mercury-users] Debian packages of Mercury

Peter Hawkins peter at hawkins.emu.id.au
Fri May 14 12:13:28 AEST 2004


Hi...
On Fri, 14 May 2004 11:36 am, Fergus Henderson wrote:
> On 12-May-2004, Peter Hawkins <peter at hawkins.emu.id.au> wrote:
> > I have created Debian packages of Mercury ROTD 2004-03-27, primarily for
> > my own use. However, since they may be of assistance to others who use
> > Debian and Mercury, you can get them from:
> > http://www.cs.mu.oz.au/~hawkinsp/
>
> Thanks!
>
> What is the process for creating those Debian packages?

I'm assuming you have a Debian machine that you can use to build packages. If 
not, then it's probably still possible (eg. a chroot build), just a bit 
harder. You will need the gcc-3.2 package installed (not gcc-3.3, since it's 
buggy and doesn't work on Mercury). I also recommend ccache.

The debian package is built from a pristine tarball, so it's really easy to 
drop a new tarball into the package automatically.

Extract the tarball:
http://www.cs.mu.oz.au/~hawkinsp/mercury_0.11.0.rotd-2004-05-11.tar.gz
The structure of this tarball is:
build/ - empty directory
upstream/ - directory containing an ungzipped Mercury source tarball which you 
want to build
debian/ - debian control files.

To build a new package, you should:
rm -f upstream/*.tar
cd upstream
wget my-new-mercury-rotd-whatever.tar.gz
gunzip my-new-mercury-rotd-whatever.tar.gz
cd ..

(The tarball is ungzipped so that the source code isn't compressed twice when 
debuild builds the debian package source tarball).

You need to update the version number in debian/changelog (since that's how 
debian package build scripts determine the package version number).
This could easily be done with sed, by adding the following to the top of 
debian/changelog (NB. the changelog format is very picky, things like the 
number of spaces must be correct):
<cut>

mercury (0.11.0.rotd-MYVERSION) unstable; urgency=low

  * New release of the day.

 -- Peter Hawkins <peter at hawkins.emu.id.au>  Thu, 13 May 2004 22:38:04 +1000

<end cut>

Then a simple:
sed -e 's/MYVERSION/2004-05-11/g' < debian/changelog.template > 
debian/changelog
would do the trick.

Then you run the following from the root of the source tarball:
debuild
and several hours later you'll (hopefully) have debian packages in your parent 
directory.

The build process is controlled by debian/rules (which is a makefile).

If you're going to be doing this a lot, it's probably worth using sbuild or 
pbuilder instead of debuild, since they do the package building in a clean 
chroot and handle failure more gracefully...

Let me know if you need any more help with this.

=)
Peter
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list