Commit | Line | Data |
---|---|---|
233e7676 LC |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> | |
38bbd61d | 3 | ;;; Copyright © 2012, 2013 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 LC |
22 | #:use-module (gnu packages perl) |
23 | #:use-module ((gnu packages gettext) | |
3d282f90 NK |
24 | #:renamer (symbol-prefix-proc 'guix:)) |
25 | #:use-module (guix packages) | |
26 | #:use-module (guix download) | |
27 | #:use-module (guix build-system gnu)) | |
28 | ||
29 | (define-public attr | |
30 | (package | |
31 | (name "attr") | |
32 | (version "2.4.46") | |
33 | (source | |
34 | (origin | |
35 | (method url-fetch) | |
36 | (uri (string-append "mirror://savannah/attr/attr-" | |
37 | version ".src.tar.gz")) | |
38 | (sha256 | |
39 | (base32 | |
40 | "07qf6kb2zk512az481bbnsk9jycn477xpva1a726n5pzlzf9pmnw")))) | |
41 | (build-system gnu-build-system) | |
42 | (arguments | |
43 | `(#:phases | |
380d5dec LC |
44 | (alist-cons-after |
45 | 'configure 'patch-makefile-SHELL | |
46 | (lambda _ | |
47 | (patch-makefile-SHELL "include/buildmacros")) | |
48 | (alist-replace | |
49 | 'install | |
50 | (lambda _ | |
51 | (zero? (system* "make" | |
52 | "install" | |
53 | "install-lib" | |
54 | "install-dev"))) | |
3d282f90 | 55 | |
2a552f11 LC |
56 | ;; When building natively, adjust the test cases. |
57 | ,(if (%current-target-system) | |
56c092ce | 58 | '%standard-phases |
2a552f11 LC |
59 | '(alist-replace 'check |
60 | (lambda _ | |
61 | ;; Use the right shell. | |
62 | (substitute* "test/run" | |
63 | (("/bin/sh") | |
64 | (which "bash"))) | |
380d5dec | 65 | |
2a552f11 LC |
66 | (system* "make" "tests" "-C" "test") |
67 | ||
68 | ;; XXX: Ignore the test result since this is | |
69 | ;; dependent on the underlying file system. | |
70 | #t) | |
71 | %standard-phases)))))) | |
72 | (inputs `(;; Perl is needed to run tests; remove it from cross builds. | |
73 | ,@(if (%current-target-system) | |
74 | '() | |
75 | `(("perl" ,perl) | |
76 | ("gettext" ,guix:gettext))))) | |
77 | (native-inputs | |
78 | ;; FIXME: Upon next core-updates, make gettext a native input | |
79 | ;; unconditionally. | |
80 | (if (%current-target-system) | |
81 | `(("gettext" ,guix:gettext)) | |
82 | '())) | |
83 | ||
84 | (home-page "http://savannah.nongnu.org/projects/attr/") | |
85 | (synopsis "Library and tools for manipulating extended attributes") | |
3d282f90 NK |
86 | (description |
87 | "Portable library and tools for manipulating extended attributes.") | |
38bbd61d | 88 | (license (list gpl2+ lgpl2.1+)))) |