diff options
author | Erich Eckner <git@eckner.net> | 2020-05-14 10:14:06 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-05-14 10:14:06 +0200 |
commit | a458b16e141836acce21e02a953209b93271d822 (patch) | |
tree | 60e8b85e6d8e7779a38b9db1af62efd7afb46eae /advertise-provided-libraries.PKGBUILDpatch | |
parent | 035c49f5ada51bc3318928f48f07dfe5e960ef8a (diff) | |
download | archlinuxewe-a458b16e141836acce21e02a953209b93271d822.tar.xz |
advertise-provided-libraries.PKGBUILDpatch: do not advertise by suffix only
Diffstat (limited to 'advertise-provided-libraries.PKGBUILDpatch')
-rw-r--r-- | advertise-provided-libraries.PKGBUILDpatch | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/advertise-provided-libraries.PKGBUILDpatch b/advertise-provided-libraries.PKGBUILDpatch index 392c321ef..b7d2203ac 100644 --- a/advertise-provided-libraries.PKGBUILDpatch +++ b/advertise-provided-libraries.PKGBUILDpatch @@ -2,7 +2,19 @@ if printf '%s\n' "${arch[@]}" | grep -qvxF any; then if [ -d "${pkgdir}/usr/lib" ]; then provides+=( $( - find "${pkgdir}/usr/lib" -name '*.so' -printf '%f\n' + find "${pkgdir}/usr/lib" \ + -name '*.so' -printf '%p\n' \ + | while read -r lib; do + if ! LC_ALL=C readelf -h "$fn" 2>/dev/null | grep -q '.*Type:.*DYN (Shared object file).*'; then + # no shared object + continue + fi + if ! LC_ALL=C readelf -d "$fn" 2>/dev/null | grep -q '.*Library soname: \[.*\].*'; then + # not versioned + continue + fi + printf '%s\n' "${lib##*/}" + done ) ) fi |