I am packaging something for my PPA. The upstream source is a .tar.gz
archive which is Makefile-based.
Since this package has a significant amount of architecture-independent data, it would be wise to have the build scripts generate two packages:
- package
- package-data
How can I set this up? I've edited my Debian control
file to generate two packages, but I have no idea how to get the right files to the right package.
Since the data files are currently all installed via the Makefile, I am kind of lost here.
This is a place where I've always found the documentation lacking. I pretty much only learned how this works by looking at how it is done in other packages. As with most things in Debian packaging, there are a few ways to do this. I find the simplest way is to use
debian/package.install
files. Here's an example of a package I've worked on, imagination (bzr branch).First, we need to create the package in
debian/control
. There are three stanzas now. One for the source package and one for each binary package. Note that the foo-data package should beArchitecture: all
. Also note that imagination Depends onimagination-common (= ${source:Version})
.Next, we create a
debian/imagination.install
file. This contains the specific files or paths which we want to end up in the imagination package. For this package we want all the architecture dependent files. The desktop file is included as it needs to say with the binary that it calls in itsExec:
line.We need to create a
debian/imagination-common.install
file. This will contain all of the architecture independent files, images, translations, docs, and the like.man dh_install
describes what's actually going on here:What it means by "the proper package build directories" is that by the end of the build process, everything that will be in the resulting
foo.deb
will be found insrc/debian/foo
. The files that will end up infoo-data.deb
will be found insrc/debian/foo-data
. Asdebian/rules
is essentially just a Makefile, you can begin to imagine so other ways of getting the same result.