]> git.immae.eu Git - perso/Immae/Config/AUR.git/commitdiff
Move sample config files so they don't pollute the config directory on updates
authorJonathan Steel <jsteel@archlinux.org>
Fri, 12 May 2017 08:34:58 +0000 (09:34 +0100)
committerJonathan Steel <jsteel@archlinux.org>
Fri, 12 May 2017 08:34:58 +0000 (09:34 +0100)
.SRCINFO
PKGBUILD

index 892fc0879bff278433fd9bab6a794c88b53ec264..a20987cc31135ef1367fccec19a73fd91185b93d 100644 (file)
--- 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
index 972eb08de7a9887740166c1952ac5dfe4cac8d4e..7068a06744e0da82004e5cc19cdfeaf0530be581 100644 (file)
--- 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