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