Question

I have developed an autotools based C++ application which compiles and installs perfectly with the usual ./configure; make install.

Now I have created a .deb package and to my surprise, it doesn't include any of my data or binary files. It only includes the mandatory .deb files like CONTENTS, DEBIAN, INFO, INSTALL, etc.

I have tryed a lot of different approaches with bzr (for ubuntu) builddeb, debuild, etc. All of them make my program without errors and then create the almost empty .deb.

These are the relevant files in the debian folder: debian/control:

Source: gestiong
Section: office
Priority: optional
Maintainer: santilin <gestiong@programacionsocial.net>
Build-Depends: debhelper (>= 8.0.0)
Standards-Version: 3.9.3
Homepage: www.programacionsocial.net
#Vcs-Git: git://git.debian.org/collab-maint/gestiong.git
#Vcs-Browser: http://git.debian.org/?p=collab-maint/gestiong.git;a=summary

Package: gestiong
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: <Programa libre de gestión de ONG y asociaciones sin ánimo de lucro>
 <GestiONG es un ...>

Package: gestiong-doc
Architecture: all
Description: documentation for gestiong
     <insert long description, indented with spaces>

debian/changelog:

gestiong (0.5-0ubuntu1) precise; urgency=low

   * Initial release

 -- santilín <gestiong@programacionsocial.net>  Tue, 15 Oct 2013 14:21:22 +0200

And the commands to build de package out of the source tarball (gestiong_0.5.orig.tar.gz)

bzr dh_make gestiong 0.5 gestiong_0.5.orig.tar.gz

Type of package: single binary, indep binary, multiple binary, library, kernel module, kernel patch?
  [s/i/m/l/k/n] s

cd gestiong; bzr builddeb -- -us -uc

after a long while the program is compiled and the .deb created without errors.

drwxrwxr-x  3 santilin santilin    4096 oct 16 18:58 build-area
drwxrwxr-x 14 santilin santilin    4096 oct 16 18:35 gestiong
-rw-------  1 santilin santilin    2246 oct 16 18:51 gestiong_0.5-0ubuntu1.debian.tar.gz
-rw-------  1 santilin santilin     894 oct 16 18:51 gestiong_0.5-0ubuntu1.dsc
-rw-------  1 santilin santilin    1885 oct 16 18:51 gestiong_0.5-0ubuntu1_i386.changes
-rw-------  1 santilin santilin    2226 oct 16 18:51 gestiong_0.5-0ubuntu1_i386.deb
-rw-rw-r--  1 santilin santilin 3638028 oct 16 18:35 gestiong_0.5.orig.tar.gz
-rw-------  1 santilin santilin    1888 oct 16 18:51 gestiong-doc_0.5-0ubuntu1_all.deb

But the .deb files ar almost empty. What am I doing wrong?

(The tarball can be downloaded from https://sourceforge.net/projects/gestiong/files/gestiong/gestiong-0.5.beta.tar.gz/download )

Was it helpful?

Solution

It looks like you have a few things to fix, aside from the missing acinclude.m4.

Firstly, you have a rather strange line in your debian/rules:

DH_OPTIONS=extend-diff-ignore

which doesn't make sense. Most likely you intended for the --extend-diff-ignore argument to be given to dpkg-source, but putting that in DH_OPTIONS won't accomplish that. It will only make the debhelper tools break. So take that out altogether.

Next, you're missing a lot of build dependencies. Without declaring those, it will be difficult for others to build your package. Some quick #include greps suggest you probably want at least:

Build-Depends: debhelper (>= 8.0.0), libmysqlclient-dev, libxml2-dev, libdb-dev,
               qt4-qmake, libqt4-dev, libqt4-dev-bin, libjpeg-dev, libpng-dev,
               libx11-dev, libboost-system-dev

Finally, and this is the part you were asking about, you haven't told debhelper in which packages each of the built files should go. Everything should get built and installed under debian/tmp/ (since you have more than one binary package in your debian/control), but then you don't have any debian/*.install files to say where to put them all (or, you do have one, but it has only one line in it reading "#DOCS#", which is unhelpful).

So you need to determine which of the installed files you want to ship with your packages, and name them in files called debian/$packagename.install. For example, you probably want all of the binaries to go in gestiong, the main package. So:

echo '/usr/bin' >> debian/gestiong.install

If there are important shared libraries that need to be shipped too, and no other software will be using them, you might want

echo '/usr/lib/*.so*' >> debian/gestiong.install

(If you have shared libraries that other packages will use, you should break them out into a libgestiong package or some such, and learn about packaging libraries, which is a whole new adventure.)

It looks like a bunch of header files get installed in /usr/include. I don't know if you care about shipping them. Again, if other packages might need to build against those files, you'll want to break out a libgestiong-dev package.

Looks like there are also a few things under /usr/share/gonglib.

echo '/usr/share/gonglib' >> debian/gestiong.install

You also have a gestiong-doc package defined in debian/control, but it's not clear to me what you would want to put in there.

Hope this helps. You may want to see the manpages for dh_install, dh_auto_install, debhelper, and dh for more information.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top