abuild: fix -openrc to work with multiple subpackages

allow a single APKBUILD have multiple -openrc subpackages.
This commit is contained in:
Natanael Copa 2019-05-03 18:35:44 +02:00
parent f263cb9f49
commit 1de902f2fa

View File

@ -1788,7 +1788,7 @@ libs() {
default_openrc() {
depends="$depends_openrc"
pkgdesc="$pkgdesc (OpenRC init scripts)"
install_if="openrc $pkgname=$pkgver-r$pkgrel"
install_if="openrc ${subpkgname%-openrc}=$pkgver-r$pkgrel"
local dir file
for dir in conf.d init.d; do
if [ -d "$pkgdir/etc/$dir" ]; then