Search code examples
linuxubuntudebiandeblaunchpad

launchpad.net: Multiple dependencies in the same large project...?


I have a large project which contains many libraries that the main binary depends on. I would like to know what the proper way to handle this in launchpad so I can build the libraries, then the main binary and offer each debian pacakge on a ppa.

You can see the project in question at lp:snapcpp (https://code.launchpad.net/snapcpp/). In snacpp, we have "snapwebsites", a C++ CMS system which attaches to a Cassandra database via our library "libQtCassandra." "snapwebsites" depends on libQtCassandra, as it does libltd, and others. Each of these libraries need to be separate debian packages themselves. Each project has its own "debian" folder but there is no root debian folder at this time.

How can I get this to work on launchpad, which requires a root debian folder? Do I need to construct a debian project at the root that lists each dependency? If not, do I need to break up each project into its own branch using bzr? If I do the latter, how do I call out those depencency debs for the build (in other words, how do I tell the recipe for snapwebsites that it needs to have libQtCassandra and its dependency packages installed)?

Thanks!


Solution

  • The solution that I discovered on my own was to utilize the recipe command "nest-part," which allows you to take a single folder out of a bzr branch and map it into your project. It cannot, however, map to the root of your branch.

    What I did was to create a branch with only packaging information in it, and a CMakeLists.txt file containing "add_subdirectory(src)". Then I map from the main code branch (lp:snapcpp), but only the project in question. For example, here is the recipe for the "controlled_vars" project in snapcpp:

    # bzr-builder format 0.3 deb-version {debupstream}+{revno}
    lp:~snapcpp/snapcpp/controlled_vars
    nest-part src lp:snapcpp controlled_vars src
    

    There does need to be a branch with packaging information with each sub-project, but this is a one-time set up issue.