gnu: iniparser: Use 'modify-phases'.

* gnu/packages/samba.scm (iniparser)[arguments]: Use 'modify-phases'
syntax.
master
Efraim Flashner 2016-07-24 11:23:01 +03:00
parent def8f501e6
commit 2af56bfa1e
No known key found for this signature in database
GPG Key ID: F4C1D3917EACEE93
1 changed files with 37 additions and 40 deletions

View File

@ -50,46 +50,43 @@
"1flj7srvh2hp9ls96qz922bklyhw7f27mmn23b16839zpdjddfz0")))) "1flj7srvh2hp9ls96qz922bklyhw7f27mmn23b16839zpdjddfz0"))))
(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
(substitute* '("Makefile" "test/Makefile") (lambda* (#:key outputs #:allow-other-keys)
(("/usr/lib") (substitute* '("Makefile" "test/Makefile")
(string-append (assoc-ref outputs "out") "/lib")) (("/usr/lib")
(("\\?= gcc") "= gcc"))) (string-append (assoc-ref outputs "out") "/lib"))
(alist-replace (("\\?= gcc") "= gcc"))))
'build (replace 'build
(lambda _ (lambda _
(and (zero? (system* "make" "libiniparser.so")) (and (zero? (system* "make" "libiniparser.so"))
(symlink "libiniparser.so.0" "libiniparser.so"))) (symlink "libiniparser.so.0" "libiniparser.so"))))
(alist-replace (replace 'install
'install (lambda* (#:key outputs #:allow-other-keys)
(lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out"))
(let* ((out (assoc-ref outputs "out")) (lib (string-append out "/lib"))
(lib (string-append out "/lib")) (inc (string-append out "/include"))
(inc (string-append out "/include")) (doc (string-append out "/share/doc"))
(doc (string-append out "/share/doc")) (html (string-append doc "/html")))
(html (string-append doc "/html"))) (define (copy dir)
(define (copy dir) (lambda (file)
(lambda (file) (copy-file file
(copy-file file (string-append dir "/"
(string-append dir "/" (basename file)))))
(basename file))))) (mkdir-p lib)
(mkdir-p lib) (for-each (copy lib)
(for-each (copy lib) (find-files "." "^lib.*\\.(so\\.|a)"))
(find-files "." "^lib.*\\.(so\\.|a)")) (with-directory-excursion lib
(with-directory-excursion lib (symlink "libiniparser.so.0" "libiniparser.so"))
(symlink "libiniparser.so.0" "libiniparser.so")) (mkdir-p inc)
(mkdir-p inc) (for-each (copy inc)
(for-each (copy inc) (find-files "src" "\\.h$"))
(find-files "src" "\\.h$")) (mkdir-p html)
(mkdir-p html) (for-each (copy html)
(for-each (copy html) (find-files "html" ".*"))
(find-files "html" ".*")) (for-each (copy doc)
(for-each (copy doc) '("AUTHORS" "INSTALL" "LICENSE" "README.md"))))))))
'("AUTHORS" "INSTALL" "LICENSE"
"README.md"))))
%standard-phases)))))
(home-page "http://ndevilla.free.fr/iniparser") (home-page "http://ndevilla.free.fr/iniparser")
(synopsis "Standalone ini file parsing library") (synopsis "Standalone ini file parsing library")
(description (description