diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-05-19 18:40:50 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-05-19 18:40:50 -0300 |
commit | cea8490173dfafe478f0feb3d01311ff0d42408a (patch) | |
tree | 30cbf0bf32d48971140634bb863840a6bc779365 /pcr/icinga2/PKGBUILD | |
parent | a41018125d32a20b644ff10836d1e737cd0dfa67 (diff) |
icinga2: add new package to [pcr] -> https://labs.parabola.nu/issues/724
Diffstat (limited to 'pcr/icinga2/PKGBUILD')
-rw-r--r-- | pcr/icinga2/PKGBUILD | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/pcr/icinga2/PKGBUILD b/pcr/icinga2/PKGBUILD new file mode 100644 index 000000000..02b36f3c3 --- /dev/null +++ b/pcr/icinga2/PKGBUILD @@ -0,0 +1,68 @@ +# Maintainer (Arch): Malte Rabenseifner <mail@malte-rabenseifner.de> +# Contributor (Arch): bebehei <bebe@bebehei.de> + +pkgname=icinga2 +pkgver=2.3.4 +pkgrel=1 +pkgdesc="A libre host, service and network monitoring program." +license=('GPL') +arch=('i686' 'x86_64') +url="http://www.icinga.org" +depends=('boost-libs' 'yajl') +makedepends=('boost' 'cmake' 'libmariadbclient' 'postgresql-libs' 'yajl') +optdepends=('monitoring-plugins: plugins needed for icinga checks' + 'libmariadbclient: for MySQL support' + 'postgresql-libs: for PostgreSQL support') +backup=(etc/default/icinga2 + etc/icinga2/features-available/{api,checker,command,compatlog}.conf + etc/icinga2/features-available/{debuglog,gelf,graphite,icingastatus}.conf + etc/icinga2/features-available/{ido-mysql,ido-pgsql,livestatus,mainlog}.conf + etc/icinga2/features-available/{notification,perfdata,statusdata,syslog}.conf + etc/icinga2/{constants,icinga2,init,zones}.conf + etc/logrotate.d/icinga2) +install='icinga2.install' +source=("https://github.com/Icinga/$pkgname/archive/v$pkgver.tar.gz") +sha256sums=('3a6d23214c90c1e308df784254659c51962f4c49b13093aff2095e1dfa06cdaa') + +build() { + mkdir -p "$srcdir/$pkgname-$pkgver/build" + cd "$srcdir/$pkgname-$pkgver/build" + + cmake "$srcdir/$pkgname-$pkgver" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_SYSCONFDIR=/etc \ + -DICINGA2_RUNDIR=/run \ + -DCMAKE_INSTALL_SBINDIR=/usr/bin \ + -DCMAKE_INSTALL_LIBDIR=/usr/lib \ + -DCMAKE_INSTALL_LOCALSTATEDIR=/var \ + -DICINGA2_SYSCONFIGFILE=/etc/default/icinga2 \ + -DICINGA2_PLUGINDIR=/usr/lib/monitoring-plugins \ + -DUSE_SYSTEMD=ON + + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver/build" + + make DESTDIR="$pkgdir" 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" + rm "$pkgdir/etc/icinga2/features-enabled/mainlog.conf" + rm "$pkgdir/etc/icinga2/features-enabled/notification.conf" + rm -r "$pkgdir/run" + + mkdir -p "$pkgdir/usr/lib/tmpfiles.d" + cat > "$pkgdir/usr/lib/tmpfiles.d/icinga2.conf" <<- EOF + d /run/icinga2 0750 icinga icingacmd - + d /run/icinga2/cmd 2750 icinga icingacmd - + EOF + + chmod 750 "$pkgdir/etc/icinga2" \ + "$pkgdir/var/lib/icinga2" \ + "$pkgdir/var/spool/icinga2" \ + "$pkgdir/var/cache/icinga2" \ + "$pkgdir/var/log/icinga2" +} |