Commit | Line | Data |
---|---|---|
233e7676 LC |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> | |
20c620d0 | 3 | ;;; Copyright © 2012, 2013, 2016 Ludovic Courtès <ludo@gnu.org> |
3d282f90 | 4 | ;;; |
233e7676 | 5 | ;;; This file is part of GNU Guix. |
3d282f90 | 6 | ;;; |
233e7676 | 7 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
3d282f90 NK |
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 | ;;; | |
233e7676 | 12 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
3d282f90 NK |
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 | |
233e7676 | 18 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
3d282f90 | 19 | |
1ffa7090 | 20 | (define-module (gnu packages attr) |
4a44e743 | 21 | #:use-module (guix licenses) |
1ffa7090 | 22 | #:use-module (gnu packages perl) |
1dba6407 | 23 | #:use-module (gnu packages gettext) |
3d282f90 NK |
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") | |
195f557e | 31 | (version "2.4.47") |
20c620d0 LC |
32 | (source (origin |
33 | (method url-fetch) | |
34 | (uri (string-append "mirror://savannah/attr/attr-" | |
35 | version ".src.tar.gz")) | |
36 | (sha256 | |
37 | (base32 | |
195f557e | 38 | "0nd8y0m6awc9ahv0ciiwf8gy54c8d3j51pw9xg7f7cn579jjyxr5")))) |
3d282f90 NK |
39 | (build-system gnu-build-system) |
40 | (arguments | |
41 | `(#:phases | |
20c620d0 LC |
42 | (modify-phases %standard-phases |
43 | (add-after 'configure 'patch-makefile-SHELL | |
44 | (lambda _ | |
45 | (patch-makefile-SHELL "include/buildmacros"))) | |
46 | (replace 'install | |
47 | (lambda _ | |
48 | (zero? (system* "make" | |
49 | "install" | |
50 | "install-lib" | |
51 | "install-dev")))) | |
52 | (replace 'check | |
53 | (lambda* (#:key target #:allow-other-keys) | |
54 | ;; Use the right shell. | |
55 | (substitute* "test/run" | |
56 | (("/bin/sh") | |
57 | (which "bash"))) | |
3d282f90 | 58 | |
20c620d0 LC |
59 | ;; When building natively, run the tests. |
60 | (unless target | |
61 | (system* "make" "tests" "-C" "test")) | |
380d5dec | 62 | |
20c620d0 LC |
63 | ;; XXX: Ignore the test result since this is |
64 | ;; dependent on the underlying file system. | |
65 | #t))))) | |
ee268206 LC |
66 | (inputs |
67 | ;; Perl is needed to run tests; remove it from cross builds. | |
2a552f11 | 68 | (if (%current-target-system) |
ee268206 LC |
69 | '() |
70 | `(("perl" ,perl)))) | |
71 | (native-inputs | |
b94a6ca0 | 72 | `(("gettext" ,gettext-minimal))) |
2a552f11 LC |
73 | |
74 | (home-page "http://savannah.nongnu.org/projects/attr/") | |
75 | (synopsis "Library and tools for manipulating extended attributes") | |
3d282f90 NK |
76 | (description |
77 | "Portable library and tools for manipulating extended attributes.") | |
38bbd61d | 78 | (license (list gpl2+ lgpl2.1+)))) |