This patch series replaces the old libdepends/libprovides system into something akin to that used by APK. In short, makepkg.conf will have a variable like: LIB_DIRS=('lib:usr/lib' 'lib32:usr/lib32') At the end of package building, makepkg will look in the library directories and add a provide. E.g. for pacman: provide = lib:libalpm.so.13 Note the prefix matches the prefix given to the relevant directory in LIB_DIRS. Similarly, makepkg can add dependencies on libraries. E.g. pacman may have: depends = lib:libgpgme.so.11 Note, to help with bootstrapping this system, or if packages just do not want to add libprovides, the depends entries are only added if a package actually provides them. This is different to the APK system for libraries which uses "so" as the prefix and is not configurable. But Alpine used musl, which has no concept of multilib, so we need to be a bit more flexible. The dependency/provides addotions can all be disabled in pacman.conf with the '!autodeps' option. Note that APK has similar things for binaries and pkg-config files. e.g. provides = cmd:pacman provides = pc:libalpm These can readily be added as dropins to libmakepkg. Allan McRae (4): makepkg: remove libdepends and libprovides libmakepkg: add framework for autodeps libmakepkg: automatically add library sonames to provides libmakepkg: automatically add library dependencies doc/PKGBUILD.5.asciidoc | 9 -- doc/makepkg.conf.5.asciidoc | 11 ++ etc/makepkg.conf.in | 8 +- scripts/libmakepkg/autodep.sh.in | 38 ++++++ .../libmakepkg/autodep/library_depends.sh.in | 75 +++++++++++ .../libmakepkg/autodep/library_provides.sh.in | 56 +++++++++ scripts/libmakepkg/autodep/meson.build | 18 +++ scripts/libmakepkg/meson.build | 1 + scripts/makepkg.sh.in | 119 +----------------- 9 files changed, 206 insertions(+), 129 deletions(-) create mode 100644 scripts/libmakepkg/autodep.sh.in create mode 100644 scripts/libmakepkg/autodep/library_depends.sh.in create mode 100644 scripts/libmakepkg/autodep/library_provides.sh.in create mode 100644 scripts/libmakepkg/autodep/meson.build -- 2.34.1