How to create a debian package whose sources include symbolic links outside the source tree?

I have a project whose source contains symbolic links to other source trees (in particular, the structure CppUTest). I need to build a debian package from my project, but dpkg-sourcewill not follow symbolic links.

Digging further, I believe that this is due to the fact that the default behavior for taris not to dereference symbolic links unless explicitly specified (using -h).

I could not find a way to pass this extra option tarwhen creating the debian source file.

So what am I doing wrong here? Is it possible to build a debian source tar file whose origin includes symbolic links? If so, how?

+3
source share
1 answer

As read in this thread .. http://ubuntuforums.org/showpost.php?p=9752860&postcount=3

They can be included in the package, like regular files.

The details depend on how you do the packaging, but using something like the following in debian / rules: "install" target should work:

ln -s /usr/share/whatever/file/you/want $(CURDIR)/debian/<pkgname>/usr/whatever/place/you/want/the/link

Everything inside debian / will end inside .deb, including the symbolic links you put there.

-1
source

All Articles