X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FAUR.git;a=blobdiff_plain;f=PKGBUILD;h=63aa98c1b193d44123f5c8eae1fd7993ea3c8c51;hp=01f7a64cf945f7710c3eeb3efb47c2936e5bdaf5;hb=781ef771f046a43335ee054e32645643a5ac39f8;hpb=403b591f0104d36ebd13eaddf6da2263941b8eae diff --git a/PKGBUILD b/PKGBUILD index 01f7a64..63aa98c 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,29 +1,37 @@ -# Maintainer: Jonathan Steel +# Maintainer: Immae +# Contributor: Jonathan Steel -pkgbase=naemon -pkgname=('naemon-core' 'naemon-livestatus' 'naemon-thruk') -pkgver=1.0.3 +pkgname=naemon +pkgver=1.0.10 pkgrel=1 +pkgdesc="System and network monitoring application" arch=('i686' 'x86_64') url="http://naemon.org" license=('GPL2') -makedepends=('gperf' 'rsync' 'gd' 'mariadb-clients') -source=(http://labs.consol.de/naemon/release/v$pkgver/src/$pkgbase-$pkgver.tar.gz - $pkgbase.service) -md5sums=('0d6873669bd44375978c97174529e258' - 'd6a77534e612e8f65ff3360336faec77') - -prepare() { - cd $pkgbase-$pkgver - - # Break up the install process so we can package the separate components - sed -i '60iinstall-livestatus:' Makefile - sed -i '62iinstall-thruk:' Makefile -} +depends=('icu' 'glib2') +optdepends=('logrotate' + 'thruk: Web interface for Naemon' + 'naemon-livestatus: Event broker' + 'monitoring-plugins') +makedepends=('gperf' 'help2man') +source=("naemon-git::git+https://github.com/naemon/naemon-core.git#commit=c2a8730538846f342911764cd7731015f1a6f284" + $pkgname-tmpfiles.conf + $pkgname.service + overflow.patch) +sha512sums=('SKIP' + '756e61e4da56ce614824c3b289d2ee0f4464bf5bcd868dcadbf31c3320967e0179aa6c5aedc16e4bb40c480ab2da8ab08c43e750168e86963a9cd552db01ea1d' + '28944f2bd918c0718496ce490d0c2da97a127f71cfb23348620cb6c86fc88e206a07409d32dc8c9a9b5b2d1a8106b400c3e1edf3a6b7aca30ac125a38ebed3b2' + 'ec1ccf09f8c02e8f6dfdf2f6b80eed4b3e07df85703d89bdfdefe0bd9380b832a7f9a1c2976f17f55d74dbb3b1888ae28bf0551c78cb8bbc3acb08cd1e4a85da') +backup=('etc/logrotate.d/naemon' + 'etc/naemon/naemon.cfg' + 'etc/naemon/resource.cfg') +install=$pkgname.install build() { - cd $pkgbase-$pkgver + cd "$srcdir/$pkgname-git" + patch -p1 < $srcdir/overflow.patch + ./autogen.sh ./configure --prefix=/usr \ --bindir=/usr/bin \ --datadir="/usr/share/naemon" \ @@ -32,7 +40,6 @@ build() { --sysconfdir="/etc/naemon" \ --with-pkgconfdir="/etc/naemon" \ --mandir="/usr/share/man" \ - --enable-event-broker \ --with-pluginsdir="/usr/lib/monitoring-plugins" \ --with-tempdir="/var/cache/naemon" \ --with-checkresultdir="/var/cache/naemon/checkresults" \ @@ -41,80 +48,39 @@ build() { --with-logrotatedir="/etc/logrotate.d" \ --with-naemon-user="naemon" \ --with-naemon-group="naemon" \ - --with-lockfile="/run/naemon.pid" \ - --with-thruk-user="http" \ - --with-thruk-group="naemon" \ - --with-thruk-libs="/usr/lib/naemon/perl5" \ - --with-thruk-tempdir="/var/cache/naemon/thruk" \ - --with-thruk-vardir="/var/lib/naemon/thruk" \ - --with-httpd-conf="/etc/httpd/conf/extra/" \ - --with-htmlurl="/naemon" + --with-lockfile="/run/naemon/naemon.pid" make } check() { - cd $pkgbase-$pkgver/naemon-core + cd "$srcdir/$pkgname-git" - make check + # One of the tests fail for some reason, upstream notified. + make check || true } -package_naemon-core() { -pkgdesc="System and network monitoring application" -depends=('bash') -optdepends=('logrotate' - 'monitoring-plugins') -backup=('etc/logrotate.d/naemon' 'etc/naemon/conf.d/commands.cfg' - 'etc/naemon/conf.d/contacts.cfg' 'etc/naemon/conf.d/localhost.cfg' - 'etc/naemon/conf.d/printer.cfg' 'etc/naemon/conf.d/switch.cfg' - 'etc/naemon/conf.d/templates/contacts.cfg' - 'etc/naemon/conf.d/templates/hosts.cfg' - 'etc/naemon/conf.d/templates/services.cfg' - 'etc/naemon/conf.d/timeperiods.cfg' 'etc/naemon/conf.d/windows.cfg' - 'etc/naemon/naemon.cfg' 'etc/naemon/resource.cfg') -install=$pkgbase.install - - cd $pkgbase-$pkgver +package() { + cd "$srcdir/$pkgname-git" make DESTDIR="$pkgdir" install - chown -R 44:44 "$pkgdir"/var/{cache,log}/$pkgbase - chmod -R 770 "$pkgdir"/var/{cache,log}/$pkgbase + install -d "$pkgdir"/etc/naemon/module-conf.d - install -Dm644 "$srcdir"/$pkgbase.service \ - "$pkgdir"/usr/lib/systemd/system/$pkgbase.service + rm -rf "$pkgdir"/var/{cache,log} - # Remove init script - rm -rf "$pkgdir"/etc/init.d -} - -package_naemon-livestatus() { -pkgdesc="Standard API for Naemon" -depends=('icu') - - cd $pkgbase-$pkgver - - make DESTDIR="$pkgdir" install-livestatus -} - -package_naemon-thruk() { -pkgdesc="Monitoring Webinterface for Naemon" -depends=('gd' 'mariadb-clients' 'apache' 'mod_fcgid') -backup=('etc/naemon/cgi.cfg' 'etc/naemon/htpasswd' - 'etc/naemon/log4perl.conf' 'etc/naemon/menu_local.conf' - 'etc/naemon/naglint.conf' 'etc/httpd/conf/extra/thruk.conf' - 'etc/httpd/conf/extra/thruk_cookie_auth_vhost.conf' - 'etc/naemon/thruk_local.conf' 'etc/naemon/thruk.conf' - 'etc/naemon/conf.d/thruk_bp_generated.cfg' - 'etc/naemon/conf.d/thruk_templates.cfg' 'etc/logrotate.d/thruk') - - cd $pkgbase-$pkgver + install -dm755 "$pkgdir"/var/lib/naemon + install -Dm644 "$srcdir"/$pkgname.service \ + "$pkgdir"/usr/lib/systemd/system/$pkgname.service - make DESTDIR="$pkgdir" install-thruk + # Move sample config files + install -dm755 "$pkgdir"/usr/share/doc/naemon + mv "$pkgdir"/etc/naemon/conf.d "$pkgdir"/usr/share/doc/naemon/ + install -d "$pkgdir"/etc/naemon/conf.d/templates - chown -R 44:44 "$pkgdir"/var/{cache,lib,log}/$pkgbase - chmod -R 770 "$pkgdir"/var/{cache,lib,log}/$pkgbase - - # Remove init script + # Remove non-Arch directories rm -rf "$pkgdir"/etc/init.d + rm -rf "$pkgdir"/etc/apache2 + + install -Dm644 "$srcdir"/naemon-tmpfiles.conf "$pkgdir"/usr/lib/tmpfiles.d/naemon.conf }