This guide tries to explain packaging from the point of view of a Java developer.
Note to Debian / Ubuntu wizard: please help me correct this guide in relation to Debian packaging guidelines.
a Launchpad account
- Ubuntu with these packages installed: build-essential cdbs debhelper devscripts unzip bzr ant
sudo apt-get install build-essential cdbs debhelper devscripts unzip bzr ant
- configure your name and contact email address for Debian packaging: add to your .bashrc file:
# Debian packaging export DEBEMAILemail@example.com export DEBFULLNAME="John Doe"
- create a working directory
- cd into that directory
Before you package a library or program
- check the extension license for main, universe suitability.
check if the library or program was already packaged in Debian or Ubuntu (search http://packages.debian.org/ or search in Synaptic)
if it was not created before, create a new project in Launchpad. If you are packaging a pure library (no main() method), call it lib<name>-java. If it's a program, use its lowercase name.
- create a project for your Debian package
mkdir $PROJECT cd $PROJECT bzr init mkdir .bzr-builddeb/ echo -e '[BUILDDEB]\nmerge = True' > .bzr-builddeb/default.conf bzr add .bzr-builddeb/default.conf bzr add debian/ bzr commit -m "* Initial setup" bzr push lp://~$LAUNCHPAD_ID/uj/$PROJECT
- Use dch to inform of the changes in your package (not the code changes from upstream, only what has changed in the Debian packaging)