3 # Automatically generate shlibs files.
5 BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
9 foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
10 $TMP=tmpdir($PACKAGE);
12 if (-e "$TMP/DEBIAN/shlibs") {
13 error("$TMP/DEBIAN/shlibs already exists.");
16 open (FIND, "find $TMP -type f -name '*.so.*' |");
19 ($library, $major)=m#.*/(.*)\.so\.(\d*)\.#;
20 if (defined($dh{M_PARAMS}) && $dh{M_PARAMS} ne '') {
23 if (! -d "$TMP/DEBIAN") {
24 doit("install","-d","$TMP/DEBIAN");
27 if ($dh{V_FLAG_SET}) {
28 if ($dh{V_FLAG} ne '') {
32 # Call isnative becuase it sets $dh{VERSION}
35 $deps="$PACKAGE (>= $dh{VERSION})";
38 if (defined($library) && defined($major) && defined($deps) &&
39 $library ne '' && $major ne '' && $deps ne '') {
40 complex_doit("echo '$library $major $deps' >>$TMP/DEBIAN/shlibs");
45 if (-e "$TMP/DEBIAN/shlibs") {
46 doit("chmod",644,"$TMP/DEBIAN/shlibs");
47 doit("chown","root.root","$TMP/DEBIAN/shlibs");