You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

85 lines
3.0 KiB

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