From bb14bf35299423a2e14c887ad39a1d8ef2793e32 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 19 Nov 2007 14:27:25 -0500 Subject: * dh_makeshlibs: Support symbols files. Closes: #443978 Packages using this support should build-depend on dpkg-dev (>= 1.14.8). Symbols files can be downloaded from mole: http://qa.debian.org/cgi-bin/mole/seedsymbols --- dh_makeshlibs | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) (limited to 'dh_makeshlibs') diff --git a/dh_makeshlibs b/dh_makeshlibs index 9ee80533..7da87b32 100755 --- a/dh_makeshlibs +++ b/dh_makeshlibs @@ -2,7 +2,7 @@ =head1 NAME -dh_makeshlibs - automatically create shlibs file +dh_makeshlibs - automatically create shlibs file and call dpkg-gensymbols =cut @@ -11,7 +11,7 @@ use Debian::Debhelper::Dh_Lib; =head1 SYNOPSIS -B [S>] [B<-m>I] [B<-V>I<[dependencies]>] [B<-n>] [B<-X>I] +B [S>] [B<-m>I] [B<-V>I<[dependencies]>] [B<-n>] [B<-X>I] [S I>] =head1 DESCRIPTION @@ -19,7 +19,12 @@ dh_makeshlibs is a debhelper program that automatically scans for shared 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 which it finds shared libraries in. +V3 mode and above only) to any packages in which it finds shared libraries. + +If a L 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. Packages using symbols files +should Build-Depend on dpkg-dev (>= 1.14.8). =head1 OPTIONS @@ -69,6 +74,10 @@ from being treated as shared libraries. 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. +=item B<--> I + +Pass "params" to L. + =back =head1 EXAMPLES @@ -195,6 +204,24 @@ foreach my $package (@{$dh{DOPACKAGES}}) { doit("chmod",644,"$tmp/DEBIAN/shlibs"); doit("chown","0:0","$tmp/DEBIAN/shlibs"); } + + # dpkg-gensymbols files + my $symbols=pkgfile($package, "symbols"); + if (-e $symbols) { + # This is done 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.) + if (! -d "$tmp/DEBIAN") { + doit("install","-d","$tmp/DEBIAN"); + } + doit("cp", $symbols, "$tmp/DEBIAN/symbols"); + doit("dpkg-gensymbols", "-p$package", "-O$tmp/DEBIAN/symbols", + "-P$tmp", @{$dh{U_PARAMS}}); + if (-s "$tmp/DEBIAN/symbols" == 0) { + doit("rm", "-f", "$tmp/DEBIAN/symbols"); + } + } } =head1 SEE ALSO -- cgit v1.2.3