* Jakub Wilk <jwilk@debian.org>, 2012-03-02, 19:47:
Lintian suggests the following command to determine correct name for a shared library package:objdump -p /path/to/libfoo-bar.so.1.2.3 | sed -n -e's/^[[:space:]]*SONAME[[:space:]]*//p' | sed -e's/\([0-9]\)\.so\./\1-/; s/\.so\.//'Could this code be included in Policy §8.1, perhaps as a footnote? Thanks.That seems to be missing tr [[:upper:]] [[:lower:]].Hmm, right. And it should replace underscores with dashes.
The actualy lintian code is: foreach my $expected_name (@sonames) { $expected_name =~ s/([0-9])\.so\./$1-/; $expected_name =~ s/\.so(?:\.|\z)//; $expected_name =~ s/_/-/g; if ((lc($expected_name) eq $pkg) || (lc($expected_name) eq $base_pkg)) { $match_found = 1; last; } } This can be translated to the following sed command: LC_ALL=C sed -r -e's/([0-9])\.so\./\1-/; s/\.so(\.|$)//; y/_/-/; s/(.*)/\L&/' -- Jakub Wilk