3 # Find dependancies. Simple dpkg-shlibdeps wrapper.
7 use Debian::Debhelper::Dh_Lib;
10 foreach my $package (@{$dh{DOPACKAGES}}) {
11 my $tmp=tmpdir($package);
12 my $ext=pkgext($package);
17 # Generate a list of ELF binaries in the package, ignoring any
18 # we were told to exclude.
20 if (defined($dh{EXCLUDE_FIND}) && $dh{EXCLUDE_FIND} ne '') {
21 $find_options="! \\( $dh{EXCLUDE_FIND} \\)";
23 foreach my $file (split(/\n/,`find $tmp -type f \\( -perm +111 -or -name "*.so*" \\) $find_options`)) {
24 # TODO: this is slow, optimize. Ie, file can run once on multiple files..
26 if ($ff=~m/ELF/ && $ff!~/statically linked/) {
33 # Force the path absolute.
34 unless ($dh{L_PARAMS}=~m:^/:) {
35 $dh{L_PARAMS}=getcwd()."/$dh{L_PARAMS}";
37 $ENV{'LD_LIBRARY_PATH'}=$dh{L_PARAMS};
38 verbose_print("LD_LIBRARY_PATH=$dh{L_PARAMS} \\");
40 doit("dpkg-shlibdeps","-Tdebian/${ext}substvars",@{$dh{U_PARAMS}},'-dDepends',@filelist);