gnu: docbook-xsl update to 1.78.1
[jackhill/guix/guix.git] / gnu / packages / attr.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages attr)
21 #:use-module (guix licenses)
22 #:use-module (gnu packages perl)
23 #:use-module (gnu packages gettext)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu))
27
28 (define-public attr
29 (package
30 (name "attr")
31 (version "2.4.46")
32 (source
33 (origin
34 (method url-fetch)
35 (uri (string-append "mirror://savannah/attr/attr-"
36 version ".src.tar.gz"))
37 (sha256
38 (base32
39 "07qf6kb2zk512az481bbnsk9jycn477xpva1a726n5pzlzf9pmnw"))))
40 (build-system gnu-build-system)
41 (arguments
42 `(#:phases
43 (alist-cons-after
44 'configure 'patch-makefile-SHELL
45 (lambda _
46 (patch-makefile-SHELL "include/buildmacros"))
47 (alist-replace
48 'install
49 (lambda _
50 (zero? (system* "make"
51 "install"
52 "install-lib"
53 "install-dev")))
54
55 ;; When building natively, adjust the test cases.
56 ,(if (%current-target-system)
57 '%standard-phases
58 '(alist-replace 'check
59 (lambda _
60 ;; Use the right shell.
61 (substitute* "test/run"
62 (("/bin/sh")
63 (which "bash")))
64
65 (system* "make" "tests" "-C" "test")
66
67 ;; XXX: Ignore the test result since this is
68 ;; dependent on the underlying file system.
69 #t)
70 %standard-phases))))))
71 (inputs
72 ;; Perl is needed to run tests; remove it from cross builds.
73 (if (%current-target-system)
74 '()
75 `(("perl" ,perl))))
76 (native-inputs
77 `(("gettext" ,gnu-gettext)))
78
79 (home-page "http://savannah.nongnu.org/projects/attr/")
80 (synopsis "Library and tools for manipulating extended attributes")
81 (description
82 "Portable library and tools for manipulating extended attributes.")
83 (license (list gpl2+ lgpl2.1+))))