Creating a Ubuntu PPA package
From Stellarium Wiki
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
- Ubuntu Packaging Guide (See the Updating an Ubuntu Package section.)
- Blog post: Ubuntu package version naming explanation (read also the comments)
- Launchpad Help: PPA: Versioning
- Debian Policy Manual: Versioning
Steps
- 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
- 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?)
- If the previous version is the official Ubuntu package, you can use
- 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.
- 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.
- It should be something like 0.10.5~svn6312-0ubuntu1ppa5~lucid1.
- Put all the tarballs in the same directory. (TIP: It's better to avoid paths that contain spaces.
~/StellariumPackagingis 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 calledstellarium-0.10.5~svn6312. - Unpack the new version tarball with
tar xfzbefore or after you rename it.
- The new version tarball should be named something like
- Copy over the /debian sub-directory from the unpacked original package directory to the new package directory.
- Make changes to the files in /debian as necessary.
- Debian Policy Manual: Chapter 5 - Control files and their fields
- TIP: About bulleted lists in the body of the Description section: all lines in the block should start with "[space][space][dash][space]", don't make lines wider than 80 characters; only one line per bulleted item is allowed, otherwise the list breaks.
-
cdto the new package directory. - Update the changelog by using
dch -v 0.10.5~svn6312-0ubuntu1ppa5~lucid1 - Run
debuild -S -sato build a Debian source package (you may need to use the-koption to specify your GPG key) [2]- Use
gpg --list-secret-keysand look for the sec ID. The part after the slash goes after the -k in the command (with no space between).
- Use
- Upload the source package to the Launchpad PPA using
dputwith 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.