Skip to content
Advertisement

Create debian package from source file with multiple binaries

I have a C/C++ am autoconf source package for Linux that consist of several binaries, logical in development as many of them share the same source. Some binaries run in a graphical environment, some are server components, some drivers for the server, libs and others are shell commands. I would like to make a proper debian package for this system (I already have a working checkinstall based install).

If I follow the Debian tutorials I can make a package for for all binaries in one. But how do I do if I want to make a package that just install one binary component? In my case installing graphical stuff separate from non-graphical stuff.

As it looks from the tutorials I need to make a separate source package for each package I want to maintain but that sounds stupid and I must have missed something.

Any help or pointers are welcome.

Advertisement

Answer

A single source package can be build into multiple binary packages (aka .deb-files, which you can install). This is indeed a very common pattern when creating Debian packages.

To create multiple binary packages, you need to add a section for each of them to your debian/control file. Something like:

JavaScript

In the simplest case you then need to specify which files go into which package:

JavaScript

Of course there is plenty of documentation available about this.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement