3 # Automatically generate shlibs files.
5 BEGIN { push @INC, "debian", "/usr/share/debhelper" }
9 foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
10 $TMP=tmpdir($PACKAGE);
12 doit("rm", "-f", "$TMP/DEBIAN/shlibs");
14 open (FIND, "find $TMP -type f -name '*.so.*' |");
17 ($library, $major)=m#.*/(.*)\.so\.(\d*)\.?#;
18 if (defined($dh{M_PARAMS}) && $dh{M_PARAMS} ne '') {
21 if (! -d "$TMP/DEBIAN") {
22 doit("install","-d","$TMP/DEBIAN");
25 if ($dh{V_FLAG_SET}) {
26 if ($dh{V_FLAG} ne '') {
30 # Call isnative becuase it sets $dh{VERSION}
33 $deps="$PACKAGE (>= $dh{VERSION})";
36 if (defined($library) && defined($major) && defined($deps) &&
37 $library ne '' && $major ne '' && $deps ne '') {
38 complex_doit("echo '$library $major $deps' >>$TMP/DEBIAN/shlibs");
43 if (-e "$TMP/DEBIAN/shlibs") {
44 doit("chmod",644,"$TMP/DEBIAN/shlibs");
45 doit("chown","root.root","$TMP/DEBIAN/shlibs");