bzr-builder recipe using cmake

Asked by Cecilio Salmeron

I would like to use the Launchpad packaging facilities for my projects. I have read the documentation and I understand that I have to create a bzr-builder recipe, but I have not undertood how to specify the commands for building. From the documentation, apparently it is enoough to specify the repository branch I would like to builda and, optionally, merge fileas and folders from other branches. But after specifying that, it looks as if bzr-builder knows how to build or expects to find some magic files in the branch for guiding the build process. Could you please help me to understant this? Which files is bzr-build expecting to find? The documentation mention that I can run addicional commands (i.e. run autoreconf -i), but this is mentioned as if it was something exceptional, normally not needed.

My proyect is built using CMake. Should I add "run cmake ...." as last line in my recipe? Could you point me to an example of bzr-build recipe using cmake?

Thank you
Cecilio

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Curtis Hovey
Solved:
Last query:
Last reply:
Revision history for this message
Best Curtis Hovey (sinzui) said :
#1

The recipe does not run scripts to build the package, it just orchestrates that parts.

The branch that provides the ./debian directory is responsible for running make, and possibly reconfing the tree before hand. Either your main branch, or a nested packaging branch can provide the debian directory. The debian directory will need the basic files: changelog compat control copyright rules.

The rules file is what interests you. This is a fragment from one of my own packaging branches that runs ./autogen.sh in the tree to generate makefile.am and ./configure files that are normally provides by a dist tarball. I then run the mostly redundant dh_auto_configure command that is commonly run to call ./configure provided by a dist tarbal..

#!/usr/bin/make -f
%:
        dh $@

override_dh_auto_configure:
        ./autogen.sh --without-home
        dh_auto_configure -- --without-home

cdbs is aware of cmake and you might want your rules file to use that instead:
   http://build-common.alioth.debian.org/cdbs-doc.html
See https://wiki.ubuntu.com/PackagingGuide/Complete which described the essential files and explain the tools you might choose from.

Revision history for this message
Cecilio Salmeron (s-cecilio) said :
#2

Thank you very much for your explanation and the links. Now a have a better picture of how bzr-builder works . I missed the ./debian key issue!

Thank you.
Cecilio

Revision history for this message
Cecilio Salmeron (s-cecilio) said :
#3

Thanks Curtis Hovey, that solved my question.