4

I am packaging an application in my PC for installation/distribution purposes. I have created the package successfully using dpkg facility in ubuntu 12.04. Now I need to create multiple packages (binary package(like xxx.deb), source package(xxx.1.0-1-devel.deb)) using the same file set-up. Debian folder contains all modified files required for packaging using dpkg-buildpackage -rfakeroot. If I need to create all .deb files using the same debian file set-up. What should I additionally do ?

additionally, below things also confused for me. what should include -devel package ? does it only development header files or development header files and required shared libraries or all binary files including header files ?

4

I assume that your target program is a c/c++ or similar language.

  • You can include all files in one binary packages. But still the best to separate development files in another one.

    *-dev (not -devel) should include only headers, statics libs, shared libs and even binary tools if these tools only used for development.

  • You can declare multiple binaries packages for single source in debian/control. The best is to learn by example, samba:

    Source package: http://packages.ubuntu.com/source/trusty/samba , see how many binary package built from same source.

    Let choose one (main package, samba-*.deb): http://packages.ubuntu.com/trusty/samba , see to right side *-debian.tar.gz. Download it then open it. Read its control file:

    Source: samba
    ...
    
    Package: samba
    ...
    
    Package: samba-libs
    ...
    

    Each binary package has its own *.install file which list the files going to be installed and where. Example: samba.install, samba-libs.install, ..

  • For libraries, static one included only in *-dev package.

    Shared ones should be included in both if you have different versions that could be installed in same time.

    Example, samba-dev, at the bottom of the page click on list of files and this with static libs libc6-dev.

    Otherwise, put shared libs only in the regular binary package then add it as dependency for the development package.

    References:

  • I'm trying to get this working, building multiple packages of a shared source - similar to this. However, dpkg-buildpackage always gives an error e.g. dpkg-source: error: source package has two conflicting values - php-java-bridge and php-java-bridge-j2ee. I don't even want to build the source package, but it's just won't work. – OrangeDog Jun 27 '17 at 16:04
  • @OrangeDog, this answer is for multiple binaries with same compile options (regular case: rules file runs 1 compile cycle). However, your case needs to compile the source with different options for each binary (ie: multiple compile cycles). check this answer askubuntu.com/a/908351/26246 for similar case. Quick hint: notice the use of configure-stamp & build-stamp in rules file. – user.dz Jun 27 '17 at 16:24
  • 1
    Actually, it seems to be because the changelog doesn't match the source package name. I guess you're not allowed different changelogs for different packages like this? – OrangeDog Jun 27 '17 at 16:27
  • @OrangeDog, no need for multiple changelog files. changelog is related to debian source package (not the binaries). Because it's to document changes in debian packaging and debian patches (not the upstream dev). So it has to use the source package name. btw, parent folder should be also using name of source package. – user.dz Jun 27 '17 at 16:38
  • 1
    Awesome mini-howto here by @user.dz, thank you so much! :-) – troglobit Feb 10 '18 at 12:20

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.