I'm trying to make a debian package from upstream source code which is not mine. The configure
script provided by author makes a lot of symlinks in source directory. They're symlinks to all headers in src
subdir to include
subdir (So that makefile can easily copy the include
directory in the case of installing development package). I'm using debhelper
scripts to make package.
I'm using debhelper
scripts to make package. The problem is using new debian package format (quilt 3.0 native
), debuild
refuses add changes of source directory consisting symlinks to final diff
file. I'm getting errors like this:
dpkg-source: error: cannot represent change to foo.h:
dpkg-source: error: new version is symlink to /ba/foo/foo.h
dpkg-source: error: old version is nonexistent
I'm aware of the good solution: Change configure script not to symlink any header at all. It should add a target to makefile
to install devel
package. Though configure script has copyright issues. I can't touch upstream source.
I'm looking for a bash script to replace all symlinks in a directory with actual files they point to. For example if in the directory d
there are three files a
and b
and c
, which they ate symlinks to ../../foo/bar/x
, ../../foo/bar/z
../../foo/bar/y
, running desired script (say magic.sh
) giving the ./d
as first argument, should
cp ../../foo/bar/x ./d/a
cp ../../foo/bar/y ./d/b
cp ../../foo/bar/z ./d/c
I can't find a way to know which file is a symlink pointing to.