hooks/post-install: strip: only accept shlibs in destdir/usr/lib for shlib-provides.

This avoids lots of false positives and accepts unversioned shlibs as well.
This commit is contained in:
Juan RP 2014-04-01 15:14:43 +02:00
parent 42f039c476
commit 1d13ed0810

View file

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