find-libdeps: fix extraction of soname

libperl.so results in soname="libperl.so.so" which is wrong.

This returns the correct string: "libperl.so"

Fix-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
This commit is contained in:
Florian Pritz 2012-03-04 21:30:26 +01:00 committed by Pierre Schmitz
parent 73d61f43c7
commit c5893672a6
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@
m4_include(lib/common.sh)
set -e
shopt -s extglob
IGNORE_INTERNAL=0
@ -40,7 +41,7 @@ fi
process_sofile() {
# extract the library name: libfoo.so
soname="${sofile%%\.so\.*}.so"
soname="${sofile%.so?(+(.+([0-9])))}".so
# extract the major version: 1
soversion="${sofile##*\.so\.}"
if [[ "$soversion" = "$sofile" ]] && (($IGNORE_INTERNAL)); then