From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSRPx-00079r-Bv for guix-patches@gnu.org; Thu, 29 Nov 2018 13:52:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gSRPu-0001r5-ED for guix-patches@gnu.org; Thu, 29 Nov 2018 13:52:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:50852) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gSRPu-0001r0-9B for guix-patches@gnu.org; Thu, 29 Nov 2018 13:52:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gSRPt-00029G-WC for guix-patches@gnu.org; Thu, 29 Nov 2018 13:52:02 -0500 Subject: [bug#33549] [PATCH 1/6] gnu: zabbix-server: Split output. References: <20181129184708.4818-1-go.wigust@gmail.com> In-Reply-To: <20181129184708.4818-1-go.wigust@gmail.com> Resent-Message-ID: From: Oleg Pykhalov Date: Thu, 29 Nov 2018 21:50:37 +0300 Message-Id: <20181129185042.6050-1-go.wigust@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 33549@debbugs.gnu.org * gnu/packages/monitoring.scm (zabbix-server)[outputs]: Add 'front-end' and 'schema' outputs. --- gnu/packages/monitoring.scm | 21 +++++++++++++++++---- 1 file 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" -- 2.19.1