Here's a modified patch that makes sure all udeb: lines come after regular 
lines.
As before, the patch for Dh_Getopt.pm remains unchanged.

Below is an (aesthetically pleasing even) example generated with the 
patch:
$ cat DEBIAN/shlibs
libpango-1.0 0 libpango1.0-0 (>= 1.10.1)
libpangox-1.0 0 libpango1.0-0 (>= 1.10.1)
libpangoft2-1.0 0 libpango1.0-0 (>= 1.10.1)
libpangoxft-1.0 0 libpango1.0-0 (>= 1.10.1)
libpangocairo-1.0 0 libpango1.0-0 (>= 1.10.1)
udeb: libpango-1.0 0 libpango1.0-udeb (>= 1.10.1)
udeb: libpangox-1.0 0 libpango1.0-udeb (>= 1.10.1)
udeb: libpangoft2-1.0 0 libpango1.0-udeb (>= 1.10.1)
udeb: libpangoxft-1.0 0 libpango1.0-udeb (>= 1.10.1)
udeb: libpangocairo-1.0 0 libpango1.0-udeb (>= 1.10.1)

--- orig/dh_makeshlibs	2005-12-31 19:36:48.000000000 +0100
+++ dh_makeshlibs	2006-01-04 22:29:21.000000000 +0100
@@ -64,6 +64,11 @@
 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 shlibs and use "udeb" as the package
+name to depend on instead of the regular library package.
+
 =back
 
 =head1 EXAMPLES
@@ -111,6 +116,7 @@
 	# 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} \\) ";
 	}
@@ -155,6 +161,10 @@
 				$deps="$package (>= $version)";
 			}
 		}
+		my $udeb_package;
+		if (defined($dh{SHLIBS_UDEB}) && $dh{SHLIBS_UDEB} ne '') {
+			$udeb_package = $dh{SHLIBS_UDEB};
+		}
 		if (defined($library) && defined($major) && defined($deps) &&
 		    $library ne '' && $major ne '' && $deps ne '') {
 		    	$need_ldconfig=1;
@@ -163,11 +173,22 @@
 			if (! $seen{$line}) {
 				$seen{$line}=1;
 				complex_doit("echo '$line' >>$tmp/DEBIAN/shlibs");
+				if (defined($udeb_package)) {
+					my $udeb_deps = $deps;
+					$udeb_deps =~ s/$package/$udeb_package/e;
+			    		$line="udeb: "."$library $major $udeb_deps";
+					push @udeb_lines, $line;
+				}
 			}
 		}
 	}
 	close FIND;
 
+	# Write udeb: lines
+	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");

Attachment: pgp5p3uafoWNU.pgp
Description: PGP signature

Reply via email to