# Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=icingaweb2-module-director _pkgname=icinga-director _module=${pkgname/*-/} pkgver=1.10.2 pkgrel=0 pkgdesc="Configuration frontend for Icinga 2, integrated automation" url="https://icinga.com/docs/icinga-director/latest/doc/01-Introduction/" arch="noarch !armhf !armv7 !s390x !x86" license="GPL-2.0-or-later" _php=php81 depends="icingaweb2 $_php-curl $_php-pcntl icingaweb2-module-incubator" options="!check" install="$pkgname.pre-install $pkgname.post-install" pkgusers="icingadirector" pkggroups="icingaweb2" subpackages="$pkgname-doc $_pkgname-openrc" source="icingaweb2-module-director-$pkgver.tar.gz::https://github.com/Icinga/icingaweb2-module-director/archive/v$pkgver.tar.gz $_pkgname.initd $_pkgname.confd" build() { return 0 } package() { mkdir -p "$pkgdir/etc/icingaweb2/modules/$_module" mkdir -p "$pkgdir/usr/share/doc/$pkgname" mkdir -p "$pkgdir/usr/share/webapps/icingaweb2/modules/$_module" mkdir -p "$pkgdir/usr/share/webapps/icingaweb2/modules/$_module/contrib" cp -a application library public schema test \ configuration.php module.info run.php \ run-missingdeps.php register-hooks.php \ "$pkgdir/usr/share/webapps/icingaweb2/modules/$_module" cp -a contrib/*-agent-installer \ "$pkgdir/usr/share/webapps/icingaweb2/modules/$_module/contrib" cp -a doc "$pkgdir/usr/share/doc/$pkgname" chgrp -R $pkggroups "$pkgdir/etc/icingaweb2/modules/$_module" install -d -o $pkgusers -g $pkggroups -m 0750 "$pkgdir"/var/lib/icingadirector install -Dm644 "$srcdir"/$_pkgname.confd "$pkgdir"/etc/conf.d/$_pkgname install -Dm755 "$srcdir"/$_pkgname.initd "$pkgdir"/etc/init.d/$_pkgname chgrp -R $pkggroups "$pkgdir"/etc/icingaweb2/modules cat >"$pkgdir"/usr/share/doc/$pkgname/README.alpine <