This is specifically about uploading a package to the FreeCAD Stable Releases PPA. The method is quite different from creating packages for the Daily Builds PPA, but pretty straighforward. Basically, the steps are
- Creating a tarball (an archive of the source code in .tar.gz format. The naming and versioning of this archive is very specific.)
- Building a source package, which is actually a build recipe made of 3 files
- Uploading the source package to the PPA
- Launchpad builds the binary packages.
- Creating a tarball
Assuming the directory holding the source code is named "freecad-code"; we need to check out the release branch. Exemple below is for the past 0.15.4671 release.Then we need to create a build directory and execute cmake to generate requisite build files (like the Version.h file)Code: Select all
cd freecad-code git checkout remotes/origin/releases/FreeCAD-0-15
Creating a tarball is done using a handy scriptCode: Select all
cd .. mkdir freecad-releases-0-15-build cd freecad-releases-0-15-build cmake ../freecad-code
If the package is intended for Debian, some libraries have to be left out. The command isCode: Select all
make dist-git
DFSG stands for Debian Free Software Guidelines. I've actually always wondered if we should use the DFSG tarball, since Ubuntu is based on Debian and copies most of its libraries...Code: Select all
make distdfsg-git
The tarball is saved in the freecad-code directory. - Building a source package
General instructions on how to build a source package on Launchpad:
https://help.launchpad.net/Packaging/PP ... rcePackage
What I was doing specifically for FreeCAD packages:- Extract the tarball
- Rename the tarball to freecad_0.15.4671.orig.tar.gz. Don't forget to replace the dash (-) with an underscore (_) The process is pretty fussy about this, if you forget to do it the tarball won't be recognized and you'll get an error message in the console when you build the package.
- Insert a "debian" folder into the extracted tarball folder. You could copy one from the daily builds PPA, but take care to edit the changelog and set the right version number. The best would be to use the debian folder from the 0.15.4671 debian source, and append the new release to the existing changelog. See the debian folder for freecad 0.15.4671 built for Ubuntu 15.04 here: https://launchpad.net/~freecad-maintain ... ian.tar.gz
(These files can be found in the "Package details" link of the PPA webpage)
Where you replace "12345678" with your actual key ID. The source package itself takes less than 30 seconds to build. You should create source packages for each supported Ubuntu version (12.04, 14.04, 15.04...), each time updating the /debian/changelog file to match the Ubuntu version.Code: Select all
debuild -k0x12345678 -S -sa
- Uploading the source package to the PPA
That one is pretty straighforward.
https://help.launchpad.net/Packaging/PPA/Uploading
The command is shown in the PPA webpage under "Uploading packages to this PPA". To upload all source packages in one go:Now this takes some time (and depends on your upload speed), because unfortunately the tarball will be uploaded as many times as there are source packages.Code: Select all
dput ppa:freecad-maintainers/freecad-stable *.changes
Once uploaded, you get an automated email notification to let you know whether your upload was accepted or not.
When the time comes, I'll try to follow up on any questions you post here, but I can't promise prompt replies.
Once you run through the process and validate it (or find errors), it might be a good idea to create a wiki page about it.