]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_makeshlibs
correct outdated comment
[debhelper.git] / dh_makeshlibs
index 776e66f0b8b5f229259d87cb6a5d6ce0c1e0ec03..397dfd3f525742653da8e43f12e91b80e6f73c87 100755 (executable)
@@ -21,9 +21,19 @@ libraries, and generates a shlibs file for the libraries it finds.
 It also adds a call to ldconfig in the postinst and postrm scripts (in
 V3 mode and above only) to any packages in which it finds shared libraries.
 
-If a L<dpkg-gensymbols(1)> symbol file is found in debian/package.symbols
-(or debian/package.symbols.arch), dpkg-gensymbols will be called
-to process and install the symbols file.
+=head1 FILES
+
+=over 4
+
+=item debian/I<package>.symbols
+
+=item debian/I<package>.symbols.I<arch>
+
+These symbols files, if present, are passed to L<dpkg-gensymbols(1)> to
+be processed and installed. Use the I<arch> specific names if you need
+to provide different symbols files for different architectures.
+
+=back
 
 =head1 OPTIONS
 
@@ -122,20 +132,20 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        doit("rm", "-f", "$tmp/DEBIAN/shlibs");
 
        # So, we look for files or links to existing files with names that
-       # match "*.so*". Matching *.so.* is not good enough because of
-       # broken crap like db3. And we only look at real files not
+       # match "*.so.*". And we only look at real files not
        # symlinks, so we don't accidentually add shlibs data to -dev
        # packages. This may have a few false positives, which is ok,
        # because only if we can get a library name and a major number from
        # objdump is anything actually added.
        my $exclude='';
-       my @udeb_lines;
+       my (@udeb_lines, @lib_files);
        if (defined($dh{EXCLUDE_FIND}) && $dh{EXCLUDE_FIND} ne '') {
                $exclude="! \\( $dh{EXCLUDE_FIND} \\) ";
        }
        open (FIND, "find $tmp -type f \\( -name '*.so' -or -name '*.so.*' \\) $exclude |");
        while (<FIND>) {
                my ($library, $major);
+               push @lib_files, $_;
                my $objdump=`objdump -p $_`;
                if ($objdump=~m/\s+SONAME\s+(.+)\.so\.(.+)/) {
                        # proper soname format
@@ -212,12 +222,18 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        # dpkg-gensymbols files
        my $symbols=pkgfile($package, "symbols");
        if (-e $symbols) {
+               my @liblist;
+               if (! compat(7)) {
+                       @liblist=map { "-e$_" } @lib_files;
+               }
                # -I is used rather than using dpkg-gensymbols
                # own search for symbols files, since that search
                # is not 100% compatible with debhelper. (For example,
                # this supports --ignore being used.)
                doit("dpkg-gensymbols", "-p$package", "-I$symbols",
-                       "-P$tmp", @{$dh{U_PARAMS}});
+                       "-P$tmp",
+                       @liblist,
+                       @{$dh{U_PARAMS}});
                if (-s "$tmp/DEBIAN/symbols" == 0) {
                        doit("rm", "-f", "$tmp/DEBIAN/symbols");
                }