]> git.donarmstrong.com Git - debhelper.git/commitdiff
r1871: * dh_makeshlibs: add support for adding udeb: lines to shlibs file
authorjoeyh <joeyh>
Sat, 28 Jan 2006 17:55:32 +0000 (17:55 +0000)
committerjoeyh <joeyh>
Sat, 28 Jan 2006 17:55:32 +0000 (17:55 +0000)
  via --add-udeb parameter. Closes: #345471

Debian/Debhelper/Dh_Getopt.pm
debian/changelog
dh_makeshlibs
doc/PROGRAMMING

index 5e3ffacf6239f0655ff60dd4e4c7bcd982a35fd5..aecac14dbc7f52b501431531430dfa2f4987deae 100644 (file)
@@ -166,6 +166,8 @@ sub parseopts {
                
                "error-handler=s" => \$options{ERROR_HANDLER},
                
+               "add-udeb=s" => \$options{SHLIBS_UDEB},
+               
                "language=s" => \$options{LANGUAGE},
 
                "<>" => \&NonOption,
index 04c2265395245aacb1bfe41e6b11c1a0de32013d..46db5d080953bf176eb0661ae1a3e4687e1b3c13 100644 (file)
@@ -1,3 +1,10 @@
+debhelper (5.0.22) UNRELEASED; urgency=low
+
+  * dh_makeshlibs: add support for adding udeb: lines to shlibs file
+    via --add-udeb parameter. Closes: #345471
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 28 Jan 2006 12:53:00 -0500
+
 debhelper (5.0.21) unstable; urgency=low
 
   * dh_installman: correct mistake that broke translated man page installation
index c530b4ce696aabbdf05de996a77efc840b2ce292..1a1ddcc5380dddc62d4b188f622f390329c7ab68 100755 (executable)
@@ -64,6 +64,11 @@ Do not modify postinst/postrm scripts.
 Exclude files that contain "item" anywhere in their filename or directory 
 from being treated as shared libraries.
 
+=item B<--add-udeb=>I<udeb>
+
+Create an additional line for udebs in the shlibs file and use "udeb" as the
+package name for udebs to depend on instead of the regular library package.
+
 =back
 
 =head1 EXAMPLES
@@ -111,6 +116,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        # because only if we can get a library name and a major number from
        # objdump is anything actually added.
        my $exclude='';
+       my @udeb_lines;
        if (defined($dh{EXCLUDE_FIND}) && $dh{EXCLUDE_FIND} ne '') {
                $exclude="! \\( $dh{EXCLUDE_FIND} \\) ";
        }
@@ -163,11 +169,22 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                        if (! $seen{$line}) {
                                $seen{$line}=1;
                                complex_doit("echo '$line' >>$tmp/DEBIAN/shlibs");
+                               if (defined($dh{SHLIBS_UDEB}) && $dh{SHLIBS_UDEB} ne '') {
+                                       my $udeb_deps = $deps;
+                                       $udeb_deps =~ s/$package/$dh{SHLIBS_UDEB}/e;
+                                       $line="udeb: "."$library $major $udeb_deps";
+                                       push @udeb_lines, $line;
+                               }
                        }
                }
        }
        close FIND;
 
+       # Write udeb: lines last.
+       foreach (@udeb_lines) {
+               complex_doit("echo '$_' >>$tmp/DEBIAN/shlibs");
+       }
+
        # New as of dh_v3.
        if (! compat(2) && ! $dh{NOSCRIPTS} && $need_ldconfig) {
                autoscript($package,"postinst","postinst-makeshlibs");
index bcdaef0c1a0b15aaad5c711443fb5f911952950e..45456787a0d789ef3f819f701ee8dbf157307ddf 100644 (file)
@@ -145,6 +145,7 @@ switch              variable        description
                                the package name
 --error-handler        ERROR_HANDLER   a function to call on error
 --language     LANGUAGE        specify what language a file is in
+--add-udeb     SHLIBS_UDEB     used by dh_makeshlibs
 
 Any additional command line parameters that do not start with "-" will be 
 ignored, and you can access them later just as you normally would.