Creating a Ubuntu PPA package

From Stellarium Wiki
Revision as of 15:03, 2 May 2011 by Daggerstab (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Instructions for creating a Debian binary package (.deb files) for Stellarium and hosting it on a Launchpad Personal Package Archive (PPA)

UNDER CONSTRUCTION (DRAFT)

Launchpad does the building stuff automatically, only a source package needs to be created.

Stellarium 0.10.4 is in Ubuntu Lucid Lynx's repositories.

http://packages.ubuntu.com/lucid/stellarium

It was also added to Debian after that:

http://packages.debian.org/sid/stellarium (the Debian packages have updated rule files, according to a bug report in the Debian tracker)

Links

Steps

  1. Set up the environment, as described in the packaging guide.
    • install the tools [1]
    • get a GPG key and register it in Launchpad. Launchpad profile page (if you are logged in). (This is easy to do if you use Ubuntu.)
    • don't forget to set the DEBFULLNAME and DEBEMAIL environmental variables
  2. Get the source package of the previous version.
    • If the previous version is the official Ubuntu package, you can use apt-get source stellarium
    • If you want to use a PPA version or the Debian package, (you have to download them manually from the website?)
  3. Get the source package of the current version.
    • Download a tarball from SourceForge's repository...
    • or run make package_source, but be careful, as it includes files and directories that are not part of the source.
  4. Decide on the version name of the new package Blog post: Ubuntu package version naming explanation (read also the comments) Launchpad Help: PPA: Versioning Debian Policy Manual: Versioning
    • It should be something like 0.10.5~svn6312-0ubuntu1ppa5~lucid1.
      • 0.10.5 indicates the main version
      • ~svn6312 indicates that this package contains not the main version, but a snapshot of the repository at a certain version. The ~ means that the snapshot is before the release indicated by the main version number (the interpretation is 0.10.5~svn6312 < 0.10.5, so the package will be replaced when the official version becomes available).
      • The first 0 in 0ubuntu1 indicates that at the time the package has been added in the Ubuntu repositories there was no Debian package for this (main?) version. The 1 after "ubuntu" means that this is the first version of the package for Ubuntu.
      • ppa5 means that this is the fifth version of this package built for a PPA. (There may have been no changes in the code, but changes in the package settings, etc.)
      • ~lucid1 means that Launchpad should build the source package for Ubuntu 10.04 Lucid Lynx.
  5. Put all the tarballs in the same directory. (TIP: It's better to avoid paths that contain spaces. ~/StellariumPackaging is OK, if your user name does not contain spaces.)
    • The new version tarball should be named something like stellarium_0.10.5~svn6312-0ubuntu1ppa5~lucid1.orig.tar.gz (the underscore is important) and the top-level directory in it should be called stellarium-0.10.5~svn6312.
    • Unpack the new version tarball with tar xfz before or after you rename it.
  6. Copy over the /debian sub-directory from the unpacked original package directory to the new package directory.
  7. Make changes to the files in /debian as necessary.
  8. cd to the new package directory.
  9. Update the changelog by using dch -v 0.10.5~svn6312-0ubuntu1ppa5~lucid1
  10. Run debuild -S -sa to build a Debian source package (you may need to use the -k option to specify your GPG key) [2]
    • Use gpg --list-secret-keys and look for the sec ID. The part after the slash goes after the -k in the command (with no space between).
  11. Upload the source package to the Launchpad PPA using dput with the .changes file as argument following the instructions on the PPA's page.[3] Some time after that binary packages will be built by Launchpad's build farms and added to the PPA.
Personal tools
Namespaces
Variants
Actions
in this wiki
other languages
Toolbox