# Generate symlinks in debian packages, reading debian/links. The
# file contains pairs of files and symlinks.
-BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
+BEGIN { push @INC, "debian", "/usr/share/debhelper" }
use Dh_Lib;
init();
$dest=pop @links;
$src=pop @links;
+ # Relivatize src and dest.
+ $src=~s:^/::;
+ $dest=~s:^/::;
+
# Make sure the directory the link will be in exists.
$basedir=Dh_Lib::dirname("$TMP/$dest");
if (! -e $basedir) {
# Figure out how much of a path $src and $dest
# share in common.
for ($x=0; $x<$#src_dirs && $src_dirs[$x] eq $dest_dirs[$x]; $x++) {}
-
# Build up the new src.
$src="";
for (1..$#dest_dirs - $x) {
}
$src=~s:/$::;
}
+ else {
+ # Make sure it's properly absolute.
+ $src="/$src";
+ }
doit("ln","-sf",$src,"$TMP/$dest");
}