Packaging

Differences between revisions 1 and 4 (spanning 3 versions)
Revision 1 as of 2008-11-24 22:08:05
Size: 1724
Editor: bb-87-80-43-137
Comment:
Revision 4 as of 2008-11-26 23:31:50
Size: 2463
Editor: bb-87-80-43-137
Comment:
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
 * a [http://launchpad.net Launchpad] account  * Read the [[PackagingGuide|packaging guide]] or have at least a look to the [[MeetingLogs/openweekintrepid/Packaging|packaging 101 session]]
 * a [[http://launchpad.net|Launchpad]] account
Line 12: Line 13:
}}}
 * configure your name and contact email address for Debian packaging: add to your .bashrc file:
{{{
  # Debian packaging
  export DEBEMAIL=john.doe@mail.com
  export DEBFULLNAME="John Doe"
Line 24: Line 31:
 * create an upstream branch in the project on launchpad. Be sure to check for a license file. In case there's none, contact upstream. For projects that distribute sources with a build-system/build-command this should be an import of the release you want to package  * create an upstream branch in the project on Launchpad. Be sure to check for a license file. In case there's none, contact upstream. For projects that distribute sources with a build-system/build-command this should be an import of the release you want to package. Replace the $NAMES with your own values of course!
Line 30: Line 37:
bzr push bzr+ssh://$LAUNCHPAD_ID@bazaar.launchpad.net/~$LAUNCHPAD_ID/$PROJECT/$PROJECTNAME.upstream }}} bzr push bzr+ssh://$LAUNCHPAD_ID@bazaar.launchpad.net/~$LAUNCHPAD_ID/$PROJECT/$PROJECTNAME.upstream
Line 32: Line 39:
 * create a packaging branch derived from the upstream branch you just imported
 {{{
bzr branch http://bazaar.launchpad.net/~$LAUNCHPAD_ID/$PROJECT/$PROJECTNAME.upstream $PROJECTNAME.ubuntu
 }}}
 * ...
 * Use dch to inform of the changes in your package (not the code changes from upstream, only what has changed in the Debian packaging)

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.

Prerequisites

  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 DEBEMAIL=john.doe@mail.com
  export DEBFULLNAME="John Doe"
  • create a working directory
  • cd into that directory

Packaging

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.

Packaging Procedure

Common steps

  • create an upstream branch in the project on Launchpad. Be sure to check for a license file. In case there's none, contact upstream. For projects that distribute sources with a build-system/build-command this should be an import of the release you want to package. Replace the $NAMES with your own values of course!
    cd directory-with-upstream-sources
    bzr init
    bzr add .
    bzr commit -m "* import of upstream source (vVERSION.INFO)"
    bzr push bzr+ssh://$LAUNCHPAD_ID@bazaar.launchpad.net/~$LAUNCHPAD_ID/$PROJECT/$PROJECTNAME.upstream 
  • create a packaging branch derived from the upstream branch you just imported
    bzr branch http://bazaar.launchpad.net/~$LAUNCHPAD_ID/$PROJECT/$PROJECTNAME.upstream $PROJECTNAME.ubuntu
  • ...
  • Use dch to inform of the changes in your package (not the code changes from upstream, only what has changed in the Debian packaging)

JavaTeam/KnowledgeBase/Packaging (last edited 2011-01-13 22:43:22 by bgn92-2-82-225-252-228)