X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=dh_makeshlibs;h=8f3e7a7ae0a411ecba24267b9e0aff92d35ea413;hb=418435f110b5f39e6933272e051e15d919ef59b9;hp=a9770717ee89b2b10178e0ed331bd35c91b6cc88;hpb=2aa8e7bbb662f3ea43a03441dbcc6c7a3acb91a5;p=debhelper.git diff --git a/dh_makeshlibs b/dh_makeshlibs index a977071..8f3e7a7 100755 --- a/dh_makeshlibs +++ b/dh_makeshlibs @@ -9,13 +9,20 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { $TMP=tmpdir($PACKAGE); my %seen; + my $need_ldconfig = 0; doit("rm", "-f", "$TMP/DEBIAN/shlibs"); - open (FIND, "find $TMP -xtype f -name '*.so.*' |"); + open (FIND, "find $TMP -xtype f -name '*.so*' |"); while () { chomp; - ($library, $major)=m#.*/(.*)\.so\.(\d*)\.?#; + $need_ldconfig=1; + # The second evil regexp is for db3, whose author should + # be shot. + if (m#.*/([^/]*)\.so\.(\d*)\.?# || m#.*/([^/]*)-([^\s/]+)\.so$#) { + $library = $1; + $major = $2; + } if (defined($dh{M_PARAMS}) && $dh{M_PARAMS} ne '') { $major=$dh{M_PARAMS}; } @@ -46,6 +53,13 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { } close FIND; + # New as of dh_v3. + if (! Debian::Debhelper::Dh_Lib::compat(2) && + ! $dh{NOSCRIPTS} && $need_ldconfig) { + autoscript($PACKAGE,"postinst","postinst-makeshlibs"); + autoscript($PACKAGE,"postrm","postrm-makeshlibs"); + } + if (-e "$TMP/DEBIAN/shlibs") { doit("chmod",644,"$TMP/DEBIAN/shlibs"); doit("chown","0.0","$TMP/DEBIAN/shlibs");