From: Mathieu Lirzin <mthl@gnu.org>
To: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] gnu: bind-utils: Build and install “nsupdate”.
Date: Thu, 14 Jan 2016 01:46:41 +0100 [thread overview]
Message-ID: <8760yxt2by.fsf@gnu.org> (raw)
In-Reply-To: <idjd1t5frak.fsf@bimsb-sys02.mdc-berlin.net> (Ricardo Wurmus's message of "Wed, 13 Jan 2016 16:11:15 +0100")
Hi,
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:
>From ba328617777728c3534be6796b6b32a9a90954b6 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> 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
[...]
> + (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")))
What about:
#:configure-flags
(map (lambda (opt val)
(string-append opt (assoc-ref %build-inputs val)))
'("--with-openssl=" "--with-dlz-mysql=" "--with-pkcs11=")
'("openssl" "mysql" "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))))))))
and this:
(let ((libs '("dns" "isc" "bind9" "isccfg" "lwres"))
(bins '("dig" "nsupdate")))
(modify-phases %standard-phases
(replace 'build
(lambda _
(every (lambda (dir)
(zero? (system* "make" "-C" dir)))
(append (map (cut string-append "lib/" <>) libs)
(map (cut string-append "bin/" <>) bins)))))
(replace 'install
(lambda _
(every (lambda (dir)
(zero? (system* "make" "-C" dir "install")))
(map (cut string-append "bin/" <>) bins))))))))
Otherwise LGTM.
--
Mathieu Lirzin
next prev parent reply other threads:[~2016-01-14 0:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-13 15:11 [PATCH] gnu: bind-utils: Build and install “nsupdate” Ricardo Wurmus
2016-01-14 0:46 ` Mathieu Lirzin [this message]
2016-01-14 8:59 ` Alex Kost
2016-01-14 11:53 ` Ricardo Wurmus
2016-01-14 23:46 ` Mathieu Lirzin
2016-01-21 10:52 ` Ricardo Wurmus
2016-01-21 13:14 ` Mathieu Lirzin
2016-01-21 14:58 ` Ricardo Wurmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8760yxt2by.fsf@gnu.org \
--to=mthl@gnu.org \
--cc=guix-devel@gnu.org \
--cc=ricardo.wurmus@mdc-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.