summaryrefslogtreecommitdiff
path: root/dh_makeshlibs
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@linaro.org>2011-03-10 22:28:24 -0800
committerJoey Hess <joey@kitenet.net>2011-03-12 13:59:45 -0400
commit859b245e93028ff72ae9f19dc5f49af7406e7ac8 (patch)
tree2c49d8c545867948bf6bae2f32488bbe22ee7c66 /dh_makeshlibs
parent409480cf2a740ca9faa62d73e0aab110390cfcb4 (diff)
Add support for multiarch.
Open compat level 9, which incompatibly changes dh_auto_configure behavior to set --libdir and --libexecdir to the multiarch directory path. This requires dpkg-dev 1.16.0 (not yet released) for the multiarch directory variable, so bump the dependency to this version. Also set a new substvar, misc:Pre-Depends, to multiarch-support, a virtual package provided by versions of eglibc that support the multiarch library paths at runtime; this needs to be a pre-dependency to ensure unpacked but not-yet-configured libraries can still be found during upgrades, so library packages converting to multiarch (i.e., switching to compat 9) will need to add this substitution by hand to debian/control.
Diffstat (limited to 'dh_makeshlibs')
-rwxr-xr-xdh_makeshlibs8
1 files changed, 8 insertions, 0 deletions
diff --git a/dh_makeshlibs b/dh_makeshlibs
index a3c81e1..5d6f869 100755
--- a/dh_makeshlibs
+++ b/dh_makeshlibs
@@ -122,6 +122,7 @@ init(options => {
});
my $objdump=cross_command("objdump");
+my $multiarch=dpkg_architecture_value("DEB_HOST_MULTIARCH");
foreach my $package (@{$dh{DOPACKAGES}}) {
next if is_udeb($package);
@@ -130,6 +131,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
my %seen;
my $need_ldconfig = 0;
+ my $is_multiarch = 0;
doit("rm", "-f", "$tmp/DEBIAN/shlibs");
@@ -148,6 +150,9 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
while (<FIND>) {
my ($library, $major);
push @lib_files, $_;
+ if ($multiarch ne '' && $_ =~ m,/$multiarch/,) {
+ $is_multiarch=1;
+ }
my $ret=`$objdump -p $_`;
if ($ret=~m/\s+SONAME\s+(.+)\.so\.(.+)/) {
# proper soname format
@@ -240,6 +245,9 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
doit("rm", "-f", "$tmp/DEBIAN/symbols");
}
}
+ if ($is_multiarch) {
+ addsubstvar($package, "misc:Pre-Depends", "multiarch-support");
+ }
}
=head1 SEE ALSO