From 8b3611ea43fa522fef0cb316442511f0eabcb4fe Mon Sep 17 00:00:00 2001 From: Jonathan Steel Date: Fri, 12 May 2017 09:34:58 +0100 Subject: [PATCH] Move sample config files so they don't pollute the config directory on updates --- .SRCINFO | 16 +++------------- PKGBUILD | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 892fc08..a20987c 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Thu May 4 13:48:32 UTC 2017 +# Fri May 12 08:34:54 UTC 2017 pkgbase = naemon pkgdesc = System and network monitoring application pkgver = 1.0.6 - pkgrel = 1 + pkgrel = 2 url = http://naemon.org install = naemon.install arch = i686 @@ -11,8 +11,8 @@ pkgbase = naemon license = GPL2 makedepends = gperf makedepends = help2man - depends = bash depends = icu + depends = glib2 optdepends = logrotate optdepends = thruk: Web interface for Naemon optdepends = monitoring-plugins @@ -23,16 +23,6 @@ pkgbase = naemon replaces = naemon-core replaces = naemon-livestatus backup = etc/logrotate.d/naemon - backup = etc/naemon/conf.d/commands.cfg - backup = etc/naemon/conf.d/contacts.cfg - backup = etc/naemon/conf.d/localhost.cfg - backup = etc/naemon/conf.d/printer.cfg - backup = etc/naemon/conf.d/switch.cfg - backup = etc/naemon/conf.d/templates/contacts.cfg - backup = etc/naemon/conf.d/templates/hosts.cfg - backup = etc/naemon/conf.d/templates/services.cfg - backup = etc/naemon/conf.d/timeperiods.cfg - backup = etc/naemon/conf.d/windows.cfg backup = etc/naemon/naemon.cfg backup = etc/naemon/resource.cfg source = http://labs.consol.de/naemon/release/v1.0.6/src/naemon-1.0.6.tar.gz diff --git a/PKGBUILD b/PKGBUILD index 972eb08..7068a06 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,12 +2,12 @@ pkgname=naemon pkgver=1.0.6 -pkgrel=1 +pkgrel=2 pkgdesc="System and network monitoring application" arch=('i686' 'x86_64') url="http://naemon.org" license=('GPL2') -depends=('bash' 'icu') +depends=('icu' 'glib2') optdepends=('logrotate' 'thruk: Web interface for Naemon' 'monitoring-plugins') @@ -19,14 +19,9 @@ source=(http://labs.consol.de/naemon/release/v$pkgver/src/$pkgname-$pkgver.tar.g $pkgname.service) md5sums=('6c9b95a737a8f232e114f4cff200ff92' 'd6a77534e612e8f65ff3360336faec77') -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') +backup=('etc/logrotate.d/naemon' + 'etc/naemon/naemon.cfg' + 'etc/naemon/resource.cfg') install=$pkgname.install build() { @@ -73,14 +68,19 @@ package() { make DESTDIR="$pkgdir" install install -d "$pkgdir"/etc/naemon/module-conf.d - install -d "$pkgdir"/var/lib/naemon + install -d "$pkgdir"/var/lib/naemon/spool/checkresults chown -R 44:44 "$pkgdir"/var/{cache,lib,log}/$pkgname + chown -R 44:44 "$pkgdir"/etc/naemon chmod -R 770 "$pkgdir"/var/{cache,lib,log}/$pkgname install -Dm644 "$srcdir"/$pkgname.service \ "$pkgdir"/usr/lib/systemd/system/$pkgname.service + # Move sample config files + mv "$pkgdir"/etc/naemon/conf.d "$pkgdir"/etc/naemon/examples + install -d "$pkgdir"/etc/naemon/conf.d/templates + # Remove non-Arch directories rm -rf "$pkgdir"/etc/init.d rm -rf "$pkgdir"/etc/apache2 -- 2.41.0