gnu: Add bind

* gnu/packags/dns.scm (bind): New variable, (bind-utils): Remove.
This commit is contained in:
John Darrington 2016-09-11 00:03:10 +02:00
parent 9d126aa2b5
commit be86b7adbc
No known key found for this signature in database
GPG key ID: 8A67719C2DE827B3

View file

@ -3,6 +3,7 @@
;;; Copyright © 2016 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -63,56 +64,67 @@ (define-public dnsmasq
;; Source files only say GPL2 and GPL3 are allowed. ;; Source files only say GPL2 and GPL3 are allowed.
(license (list license:gpl2 license:gpl3)))) (license (list license:gpl2 license:gpl3))))
(define-public bind-utils (define-public bind
(package (package
(name "bind-utils") (name "bind")
(version "9.10.4") (version "9.10.4-P2")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "http://ftp.isc.org/isc/bind9/" version (uri (string-append
"/bind-" version ".tar.gz")) "ftp://ftp.isc.org/isc/bind9/" version "/" name "-"
version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"0mmhzi4483mkak47wj255a36g3v0yilxwfwlbckr1hssinri5m7q")))) "08s48h5p916ixjiwgar4w6skc20crmg7yj1y7g89c083zvw8lnxk"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(outputs `("out" "utils"))
(inputs (inputs
;; it would be nice to add GeoIP and gssapi once there is package ;; it would be nice to add GeoIP and gssapi once there is package
`(("libcap" ,libcap) `(("libcap" ,libcap)
("libxml2" ,libxml2) ("libxml2" ,libxml2)
("mysql" ,mysql)
("openssl" ,openssl) ("openssl" ,openssl)
("perl" ,perl)
("p11-kit" ,p11-kit))) ("p11-kit" ,p11-kit)))
(native-inputs `(("perl" ,perl)
("net-tools" ,net-tools)))
(arguments (arguments
`(#:tests? #f ; no test phase implemented `(#:configure-flags
#:configure-flags
(list (string-append "--with-openssl=" (list (string-append "--with-openssl="
(assoc-ref %build-inputs "openssl")) (assoc-ref %build-inputs "openssl"))
(string-append "--with-dlz-mysql="
(assoc-ref %build-inputs "mysql"))
(string-append "--with-pkcs11=" (string-append "--with-pkcs11="
(assoc-ref %build-inputs "p11-kit"))) (assoc-ref %build-inputs "p11-kit")))
#:modules ((srfi srfi-1)
(srfi srfi-26)
,@%gnu-build-system-modules)
#:phases #:phases
(let ((libs '("dns" "isc" "bind9" "isccfg" "lwres"))
(bins '("dig" "nsupdate")))
(modify-phases %standard-phases (modify-phases %standard-phases
(replace 'build (add-after 'strip 'move-to-utils
(lambda _ (lambda _
(every (lambda (dir) (for-each
(zero? (system* "make" "-C" dir))) (lambda (file)
(append (map (cut string-append "lib/" <>) libs) (let ((target (string-append (assoc-ref %outputs "utils") file))
(map (cut string-append "bin/" <>) bins))))) (src (string-append (assoc-ref %outputs "out") file)))
(replace 'install (mkdir-p (dirname target))
(link src target)
(delete-file src)))
'("/bin/dig" "/bin/delv" "/bin/nslookup" "/bin/host" "/bin/nsupdate"
"/share/man/man1/dig.1"
"/share/man/man1/host.1"
"/share/man/man1/nslookup.1"
"/share/man/man1/nsupdate.1"))))
;; When and if guix provides user namespaces for the build process,
;; then the following can be uncommented and the subsequent "force-test"
;; will not be necessary.
;;
;; (add-before 'check 'set-up-loopback
;; (lambda _
;; (system "bin/tests/system/ifconfig.sh up")))
(replace 'check
(lambda _ (lambda _
(every (lambda (dir) (zero? (system* "make" "force-test")))))))
(zero? (system* "make" "-C" dir "install"))) (synopsis "An implementation of the Domain Name System")
(map (cut string-append "bin/" <>) bins)))))))) (description "BIND is an implementation of the Domain Name System (DNS)
(home-page "https://www.isc.org/downloads/bind/") protocols for the Internet. It is a reference implementation of those
(synopsis "Tools for querying nameservers") protocols, but it is also production-grade software, suitable for use in
(description high-volume and high-reliability applications. The name BIND stands for
"These tools, included with ISC BIND, are useful for analysis of DNS \"Berkeley Internet Name Domain\", because the software originated in the early
issues or verification of configuration.") 1980s at the University of California at Berkeley.")
(home-page "https://www.isc.org/downloads/bind")
(license (list license:isc)))) (license (list license:isc))))