From ba328617777728c3534be6796b6b32a9a90954b6 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 13 Jan 2016 16:06:36 +0100 Subject: [PATCH] gnu: bind-utils: Build and install "nsupdate". * gnu/packages/dns.scm (bind-utils)[arguments]: Generalize "build" and "install" phases. --- gnu/packages/dns.scm | 105 ++++++++++++++++++++++++++++----------------------- 1 file changed, 58 insertions(+), 47 deletions(-) diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm index 8357dad..0a42722 100644 --- a/gnu/packages/dns.scm +++ b/gnu/packages/dns.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer +;;; Copyright © 2016 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -61,51 +62,61 @@ and BOOTP/TFTP for network booting of diskless machines.") (license (list license:gpl2 license:gpl3)))) (define-public bind-utils - (package - (name "bind-utils") - (version "9.10.3-P2") - (source (origin - (method url-fetch) - (uri (string-append "http://ftp.isc.org/isc/bind9/" version - "/bind-" version ".tar.gz")) - (sha256 - (base32 - "1kbfzml37sx4r2xi4gq48ji8w5kckd1f6gdn6pk6njqdmh8ijv2a")))) - (build-system gnu-build-system) - (inputs - ;; it would be nice to add GeoIP and gssapi once there is package - `(("libcap" ,libcap) - ("libxml2" ,libxml2) - ("mysql" ,mysql) - ("openssl" ,openssl) - ("perl" ,perl) - ("p11-kit" ,p11-kit))) - (arguments - `(#:tests? #f ; no test phase implemented - #:configure-flags - (list (string-append "--with-openssl=" - (assoc-ref %build-inputs "openssl")) - (string-append "--with-dlz-mysql=" - (assoc-ref %build-inputs "mysql")) - (string-append "--with-pkcs11=" - (assoc-ref %build-inputs "p11-kit"))) - #:phases - (alist-replace - 'build - (lambda _ - (and (zero? (system* "make" "-C" "lib/dns")) - (zero? (system* "make" "-C" "lib/isc")) - (zero? (system* "make" "-C" "lib/bind9")) - (zero? (system* "make" "-C" "lib/isccfg")) - (zero? (system* "make" "-C" "lib/lwres")) - (zero? (system* "make" "-C" "bin/dig")))) - (alist-replace - 'install - (lambda _ (zero? (system* "make" "-C" "bin/dig" "install"))) - %standard-phases)))) - (home-page "https://www.isc.org/downloads/bind/") - (synopsis "Tools for querying nameservers") - (description - "These tools, included with ISC BIND, are useful for analysis of DNS + (let ((libs '("dns" "isc" "bind9" "isccfg" "lwres")) + (bins '("dig" "nsupdate"))) + (package + (name "bind-utils") + (version "9.10.3-P2") + (source (origin + (method url-fetch) + (uri (string-append "http://ftp.isc.org/isc/bind9/" version + "/bind-" version ".tar.gz")) + (sha256 + (base32 + "1kbfzml37sx4r2xi4gq48ji8w5kckd1f6gdn6pk6njqdmh8ijv2a")))) + (build-system gnu-build-system) + (inputs + ;; it would be nice to add GeoIP and gssapi once there is package + `(("libcap" ,libcap) + ("libxml2" ,libxml2) + ("mysql" ,mysql) + ("openssl" ,openssl) + ("perl" ,perl) + ("p11-kit" ,p11-kit))) + (arguments + `(#:tests? #f ; no test phase implemented + #:configure-flags + (list (string-append "--with-openssl=" + (assoc-ref %build-inputs "openssl")) + (string-append "--with-dlz-mysql=" + (assoc-ref %build-inputs "mysql")) + (string-append "--with-pkcs11=" + (assoc-ref %build-inputs "p11-kit"))) + #:modules ((srfi srfi-1) + (srfi srfi-26) + ,@%gnu-build-system-modules) + #:phases + (modify-phases %standard-phases + (replace 'build + (lambda _ + (fold (lambda (dir pass) + (and pass (zero? (system* "make" "-C" dir)))) + #t + (append + (map (cut string-append "lib/" <>) + (list ,@libs)) + (map (cut string-append "bin/" <>) + (list ,@bins)))))) + (replace 'install + (lambda _ + (fold (lambda (dir pass) + (and pass (zero? (system* "make" "-C" dir "install")))) + #t + (map (cut string-append "bin/" <>) + (list ,@bins)))))))) + (home-page "https://www.isc.org/downloads/bind/") + (synopsis "Tools for querying nameservers") + (description + "These tools, included with ISC BIND, are useful for analysis of DNS issues or verification of configuration.") - (license (list license:isc)))) + (license (list license:isc))))) -- 2.1.0