问题
I have a project whose source includes symbolic links to other source trees (notably, the CppUTest
framework). I need to build a debian package out of my project, but dpkg-source
will not follow the symbolic links.
Digging further, I believe this is because the default behavior for tar
is not to dereference symbolic links unless explicitly told to (with -h
).
I was unable to find a way to pass this extra option to tar
when building the debian source tarball.
So what am I doing wrong here? Is it possible to build a debian source tarball whose origin includes symbolic links? If so, how?
回答1:
As read in this thread.. http://ubuntuforums.org/showpost.php?p=9752860&postcount=3
They can be included in the package just like normal files.
The details depend on the way you're doing the packaging, but using something like the following in debian/rules's `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 up inside the .deb, including the symlinks you put there.
来源:https://stackoverflow.com/questions/10917214/how-do-i-build-a-debian-package-whose-sources-include-symbolic-links-outside-of