hooks/post-install/strip: better regexp for shlib-provides from Gottox.

This commit is contained in:
Juan RP 2014-04-02 10:16:16 +02:00
parent b7ba8fae4b
commit 7d7e821754

View file

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