hooks: improve shlib-provides detection as suggested by Gottox.

This commit is contained in:
Juan RP 2014-03-29 11:47:59 +01:00
parent 95e36a806c
commit 2988902496

View file

@ -106,7 +106,8 @@ hook() {
fi
echo " Stripped library: ${f#$PKGDESTDIR}"
_soname=$(${OBJDUMP} -p "$f"|grep SONAME|awk '{print $2}')
if [[ "${_soname}" ]] && [[ ${_soname} =~ .so.[0-9] ]]; then
pattern="^lib[[:alnum:]]+\.(so)\.[0-9]*"
if [[ $fname =~ $pattern ]] && [[ ${_soname} =~ $pattern ]]; then
echo "${_soname}" >> ${PKGDESTDIR}/.shlib-provides
fi
attach_debug "$f"