aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Pykhalov <go.wigust@gmail.com>2018-11-29 19:48:02 +0300
committerOleg Pykhalov <go.wigust@gmail.com>2018-12-17 22:09:10 +0300
commit2c9ac8392ad867f65b1313216dbe7179d6083df5 (patch)
treebd3a01c8d384f1616286ec75175658bebe2a9121
parenta7ad051d8a30180206030ee301020886321067f8 (diff)
downloadguix-2c9ac8392ad867f65b1313216dbe7179d6083df5.tar
guix-2c9ac8392ad867f65b1313216dbe7179d6083df5.tar.gz
gnu: zabbix-server: Split output.
* gnu/packages/monitoring.scm (zabbix-server)[outputs]: Add 'front-end' and 'schema' outputs.
-rw-r--r--gnu/packages/monitoring.scm21
1 files changed, 17 insertions, 4 deletions
diff --git a/gnu/packages/monitoring.scm b/gnu/packages/monitoring.scm
index b69ec07158..35fe4c7690 100644
--- a/gnu/packages/monitoring.scm
+++ b/gnu/packages/monitoring.scm
@@ -182,21 +182,34 @@ solution (client-side agent)")
(package
(inherit zabbix-agentd)
(name "zabbix-server")
+ (outputs '("out" "front-end" "schema"))
(arguments
(substitute-keyword-arguments
`(#:phases
(modify-phases %standard-phases
- (add-after 'install 'install-frontend
+ (add-after 'install 'install-front-end
(lambda* (#:key outputs #:allow-other-keys)
- (let* ((php (string-append (assoc-ref outputs "out")
+ (let* ((php (string-append (assoc-ref outputs "front-end")
"/share/zabbix/php"))
(front-end-conf (string-append php "/conf"))
(etc (string-append php "/etc")))
(mkdir-p php)
- (copy-recursively "./frontends/php" php)
+ (copy-recursively "frontends/php" php)
+ ;; Make front-end write config to ‘/etc/zabbix’ directory.
(rename-file front-end-conf
(string-append front-end-conf "-example"))
- (symlink "/etc/zabbix" front-end-conf)))))
+ (symlink "/etc/zabbix" front-end-conf))
+ #t))
+ (add-after 'install 'install-schema
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((database-directory
+ (string-append (assoc-ref outputs "schema")
+ "/database")))
+ (for-each delete-file
+ (find-files "database" "Makefile\\.in|\\.am$"))
+ (mkdir-p database-directory)
+ (copy-recursively "database" database-directory))
+ #t)))
,@(package-arguments zabbix-agentd))
((#:configure-flags flags)
`(cons* "--enable-server"