Commit ca1961de authored by Rasmus Thomsen's avatar Rasmus Thomsen

community/icinga2: build with ninja to fix build on x86

Also fix the license and lints while we're at it.
parent 6e2be04a
Pipeline #4767 passed with stages
in 47 seconds
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment