[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/12: gnu: knot: Build separate outputs.
From: |
guix-commits |
Subject: |
01/12: gnu: knot: Build separate outputs. |
Date: |
Thu, 15 Oct 2020 21:02:33 -0400 (EDT) |
nckx pushed a commit to branch master
in repository guix.
commit 8154df5307bc3d27326e4a94c5b505a18c2723eb
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Thu Oct 15 02:36:02 2020 +0200
gnu: knot: Build separate outputs.
* gnu/packages/dns.scm (knot)[outputs]: New field adding :doc, :lib,
and :tools outputs.
[arguments]: Add #:configure-flags to install into :doc and :lib.
Add a new ‘split-:tools’ phase to install into :tools.
Add a new ‘break-circular-:lib->:out-reference’ phase to do just that.
---
gnu/packages/dns.scm | 31 ++++++++++++++++++++++++++++---
1 file changed, 28 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index 1775660..c5a6c98 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -827,9 +827,15 @@ Extensions} (DNSSEC).")
(delete-file-recursively "src/contrib/libbpf")
#t))))
(build-system gnu-build-system)
+ (outputs (list "out" "doc" "lib" "tools"))
(arguments
`(#:configure-flags
- (list "--sysconfdir=/etc"
+ (list (string-append "--docdir=" (assoc-ref %outputs "doc")
+ "/share/" ,name "-" ,version)
+ (string-append "--infodir=" (assoc-ref %outputs "doc")
+ "/share/info")
+ (string-append "--libdir=" (assoc-ref %outputs "lib") "/lib")
+ "--sysconfdir=/etc"
"--localstatedir=/var"
"--enable-dnstap" ; let tools read/write capture files
"--enable-fastparser" ; disabled by default when .git/ exists
@@ -844,7 +850,7 @@ Extensions} (DNSSEC).")
(substitute* "configure.ac"
(("enable_xdp=yes" match)
(string-append match "\nlibbpf_LIBS=\"$libbpf_LIBS -lz\"")))
- #t))
+ #true))
(add-before 'bootstrap 'update-parser
(lambda _
(with-directory-excursion "src"
@@ -868,7 +874,26 @@ Extensions} (DNSSEC).")
"install"))))
(add-after 'install 'install-info
(lambda _
- (invoke "make" "install-info"))))))
+ (invoke "make" "install-info")))
+ (add-after 'install 'break-circular-:lib->:out-reference
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((lib (assoc-ref outputs "lib")))
+ (for-each (lambda (file)
+ (substitute* file
+ (("(prefix=).*" _ assign)
+ (string-append assign lib "\n"))))
+ (find-files lib "\\.pc$"))
+ #true)))
+ (add-after 'install 'split-:tools
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (tools (assoc-ref outputs "tools")))
+ (mkdir-p (string-append tools "/share/man"))
+ (rename-file (string-append out "/bin")
+ (string-append tools "/bin"))
+ (rename-file (string-append out "/share/man/man1")
+ (string-append tools "/share/man/man1"))
+ #true))))))
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
- branch master updated (4caa84e -> e4089b8), guix-commits, 2020/10/15
- 02/12: gnu: knot-resolver: Build with only knot:lib., guix-commits, 2020/10/15
- 03/12: gnu: asunder: Update to 2.9.7., guix-commits, 2020/10/15
- 01/12: gnu: knot: Build separate outputs.,
guix-commits <=
- 04/12: gnu: fakeroot: Update to 1.25.3., guix-commits, 2020/10/15
- 05/12: gnu: swaks: Use git source., guix-commits, 2020/10/15
- 07/12: gnu: perl-email-sender: Update to 1.300035., guix-commits, 2020/10/15
- 09/12: gnu: xterm: Update to 361., guix-commits, 2020/10/15
- 10/12: gnu: chirp: Update to 20201014., guix-commits, 2020/10/15
- 08/12: gnu: praat: Update to 6.1.27., guix-commits, 2020/10/15
- 12/12: gnu: perl-role-tiny: Update to 2.001004., guix-commits, 2020/10/15
- 11/12: gnu: dmidecode: Update to 3.3., guix-commits, 2020/10/15
- 06/12: gnu: swaks: Update to 20201014.0., guix-commits, 2020/10/15