gnu: pciutils: Use 'modify-phases'.

* gnu/packages/pciutils.scm (pciutils)[arguments]: Use 'modify-phases'.
This commit is contained in:
Efraim Flashner 2016-05-29 21:50:27 +03:00
parent fb3c855381
commit 0ef7a93d78
No known key found for this signature in database
GPG Key ID: F4C1D3917EACEE93
1 changed files with 25 additions and 27 deletions

View File

@ -40,33 +40,31 @@
"0byl2f897w5lhs4bvr6p7qwcz9bllj2zyfv7nywbcbsnb9ha9wrb")))) "0byl2f897w5lhs4bvr6p7qwcz9bllj2zyfv7nywbcbsnb9ha9wrb"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:phases (alist-replace '(#:phases
'configure (modify-phases %standard-phases
(lambda* (#:key outputs #:allow-other-keys) (replace 'configure
;; There's no 'configure' script, just a raw makefile. (lambda* (#:key outputs #:allow-other-keys)
(substitute* "Makefile" ;; There's no 'configure' script, just a raw makefile.
(("^PREFIX=.*$") (substitute* "Makefile"
(string-append "PREFIX := " (assoc-ref outputs "out") (("^PREFIX=.*$")
"\n")) (string-append "PREFIX := " (assoc-ref outputs "out")
(("^MANDIR:=.*$") "\n"))
;; By default the thing tries to automatically (("^MANDIR:=.*$")
;; determine whether to use $prefix/man or ;; By default the thing tries to automatically
;; $prefix/share/man, and wrongly so. ;; determine whether to use $prefix/man or
(string-append "MANDIR := " (assoc-ref outputs "out") ;; $prefix/share/man, and wrongly so.
"/share/man\n")) (string-append "MANDIR := " (assoc-ref outputs "out")
(("^SHARED=.*$") "/share/man\n"))
;; Build libpciutils.so. (("^SHARED=.*$")
"SHARED := yes\n") ;; Build libpciutils.so.
(("^ZLIB=.*$") "SHARED := yes\n")
;; Ask for zlib support. (("^ZLIB=.*$")
"ZLIB := yes\n"))) ;; Ask for zlib support.
"ZLIB := yes\n"))))
(alist-replace (replace 'install
'install (lambda* (#:key outputs #:allow-other-keys)
(lambda* (#:key outputs #:allow-other-keys) ;; Install the commands, library, and .pc files.
;; Install the commands, library, and .pc files. (zero? (system* "make" "install" "install-lib")))))
(zero? (system* "make" "install" "install-lib")))
%standard-phases))
;; Make sure programs have an RPATH so they can find libpciutils.so. ;; Make sure programs have an RPATH so they can find libpciutils.so.
#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="