diff options
author | Rasmus Thomsen <oss@cogitri.dev> | 2020-01-04 18:19:36 +0100 |
---|---|---|
committer | Rasmus Thomsen <oss@cogitri.dev> | 2020-01-04 20:01:47 +0100 |
commit | ca1961dea4e1ac1ed068861608889799117ff5ef (patch) | |
tree | c27f697bbdf589bb8187c9ed12da968e1886689e /community/icinga2/APKBUILD | |
parent | 6e2be04ad17706a772237d0dc3fffe418f1d443b (diff) | |
download | aports-ca1961dea4e1ac1ed068861608889799117ff5ef.tar.bz2 aports-ca1961dea4e1ac1ed068861608889799117ff5ef.tar.xz |
community/icinga2: build with ninja to fix build on x86
Also fix the license and lints while we're at it.
Diffstat (limited to 'community/icinga2/APKBUILD')
-rw-r--r-- | community/icinga2/APKBUILD | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/community/icinga2/APKBUILD b/community/icinga2/APKBUILD index e86ade6787..a1ff0951bc 100644 --- a/community/icinga2/APKBUILD +++ b/community/icinga2/APKBUILD @@ -6,20 +6,18 @@ pkgrel=1 pkgdesc="An open source host, service and network monitoring program" url="http://www.icinga.org" arch="all !armhf !armv7 !s390x" -license="GPL" +license="GPL-2.0-only" depends="monitoring-plugins" makedepends="$depends_dev cmake bison flex boost-dev yajl-dev - postgresql-dev mariadb-connector-c-dev openssl-dev libedit-dev" + postgresql-dev mariadb-connector-c-dev openssl-dev libedit-dev ninja" install="$pkgname.pre-install $pkgname.post-install" pkgusers="icinga" pkggroups="icinga icingacmd" subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch $pkgname-vim::noarch $pkgname-openrc" -source="$pkgname-$pkgver.tar.gz::https://github.com/Icinga/$pkgname/archive/v$pkgver.tar.gz +source="$pkgname-$pkgver.tar.gz::https://github.com/Icinga/icinga2/archive/v$pkgver.tar.gz boost.patch $pkgname.initd" -builddir="$srcdir/$pkgname-$pkgver" - build() { mkdir "$builddir"/build cd "$builddir"/build @@ -38,17 +36,18 @@ build() { -DICINGA2_USER=icinga \ -DICINGA2_GROUP=icingacmd \ -DICINGA2_COMMAND_GROUP=icingacmd \ - -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=no - make + -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=no \ + -GNinja + ninja } check() { - make test + ninja -C build test } package() { cd "$builddir"/build - make DESTDIR="$pkgdir" install + DESTDIR="$pkgdir" ninja install mv "$pkgdir/etc/icinga2/conf.d" "$pkgdir/etc/icinga2/conf.d.example" mkdir "$pkgdir/etc/icinga2/conf.d" rm "$pkgdir/etc/icinga2/features-enabled/checker.conf" @@ -67,10 +66,10 @@ EOF install -Dm644 tools/syntax/nano/icinga2.nanorc "$pkgdir/usr/share/nano/icinga2.nanorc" chmod 750 "$pkgdir/etc/icinga2" \ - "$pkgdir/var/lib/icinga2" \ - "$pkgdir/var/spool/icinga2" \ - "$pkgdir/var/cache/icinga2" \ - "$pkgdir/var/log/icinga2" + "$pkgdir/var/lib/icinga2" \ + "$pkgdir/var/spool/icinga2" \ + "$pkgdir/var/cache/icinga2" \ + "$pkgdir/var/log/icinga2" rm "$pkgdir"/etc/init.d/$pkgname @@ -87,13 +86,13 @@ Add the web server user to the icingacmd group in order to grant it write permissions to the external command pipe and livestatus socket: For nginx, as example: - # adduser nginx icingacmd +# adduser nginx icingacmd For Apache: - # adduser apache icingacmd +# adduser apache icingacmd For lighttpd: - # adduser lighttpd icingacmd +# adduser lighttpd icingacmd EOF } @@ -106,11 +105,11 @@ bashcomp() { } vim() { - pkgdesc="$pkgdesc (vim syntax)" - depends= + pkgdesc="$pkgdesc (vim syntax)" + depends= - mkdir -p "$subpkgdir"/usr/share/vim - cp -r "$builddir"/tools/syntax/vim "$subpkgdir"/usr/share/vim/vimfiles + mkdir -p "$subpkgdir"/usr/share/vim + cp -r "$builddir"/tools/syntax/vim "$subpkgdir"/usr/share/vim/vimfiles } sha512sums="88bed284aae0196b964a9998c638066f54788474f91d9e21b0f262bf889b17d46ab0c143f9dc4bb976bfcc5785a1f0521c0bf16fa7e54a7af22fd1baae1a231d icinga2-2.11.2.tar.gz |