diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2014-05-09 15:23:41 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2014-05-09 15:48:15 +0200 |
| commit | 42422cc2f1c9c05c7bfb075a8bc360b8bb7eaee4 (patch) | |
| tree | 8f49b09b4242590688943d0ce5f9a5b8b24db318 | |
| parent | 67b660037c21c5c7071c01406524f32331851877 (diff) | |
gnu: Add pciutils.
* gnu/packages/pciutils.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
| -rw-r--r-- | gnu-system.am | 1 | ||||
| -rw-r--r-- | gnu/packages/pciutils.scm | 91 |
2 files changed, 92 insertions, 0 deletions
diff --git a/gnu-system.am b/gnu-system.am index b4aec2549ed..fa8f6f7ec54 100644 --- a/gnu-system.am +++ b/gnu-system.am | |||
| @@ -173,6 +173,7 @@ GNU_SYSTEM_MODULES = \ | |||
| 173 | gnu/packages/parallel.scm \ | 173 | gnu/packages/parallel.scm \ |
| 174 | gnu/packages/parted.scm \ | 174 | gnu/packages/parted.scm \ |
| 175 | gnu/packages/patchutils.scm \ | 175 | gnu/packages/patchutils.scm \ |
| 176 | gnu/packages/pciutils.scm \ | ||
| 176 | gnu/packages/pcre.scm \ | 177 | gnu/packages/pcre.scm \ |
| 177 | gnu/packages/pdf.scm \ | 178 | gnu/packages/pdf.scm \ |
| 178 | gnu/packages/pem.scm \ | 179 | gnu/packages/pem.scm \ |
diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm new file mode 100644 index 00000000000..2b887f16d8c --- /dev/null +++ b/gnu/packages/pciutils.scm | |||
| @@ -0,0 +1,91 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | ||
| 2 | ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org> | ||
| 3 | ;;; | ||
| 4 | ;;; This file is part of GNU Guix. | ||
| 5 | ;;; | ||
| 6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | ||
| 7 | ;;; under the terms of the GNU General Public License as published by | ||
| 8 | ;;; the Free Software Foundation; either version 3 of the License, or (at | ||
| 9 | ;;; your option) any later version. | ||
| 10 | ;;; | ||
| 11 | ;;; GNU Guix is distributed in the hope that it will be useful, but | ||
| 12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | ;;; GNU General Public License for more details. | ||
| 15 | ;;; | ||
| 16 | ;;; You should have received a copy of the GNU General Public License | ||
| 17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | |||
| 19 | (define-module (gnu packages pciutils) | ||
| 20 | #:use-module (guix packages) | ||
| 21 | #:use-module (guix download) | ||
| 22 | #:use-module ((guix licenses) | ||
| 23 | #:renamer (symbol-prefix-proc 'license:)) | ||
| 24 | #:use-module (guix build-system gnu) | ||
| 25 | #:use-module (gnu packages compression) | ||
| 26 | #:use-module (gnu packages pkg-config) | ||
| 27 | #:use-module (gnu packages which)) | ||
| 28 | |||
| 29 | (define-public pciutils | ||
| 30 | (package | ||
| 31 | (name "pciutils") | ||
| 32 | (version "3.2.0") | ||
| 33 | (source (origin | ||
| 34 | (method url-fetch) | ||
| 35 | (uri (string-append | ||
| 36 | "mirror://kernel.org/software/utils/pciutils/pciutils-" | ||
| 37 | version | ||
| 38 | ".tar.bz2")) | ||
| 39 | (sha256 | ||
| 40 | (base32 | ||
| 41 | "0d9as9jzjjg5c1nwf58z1y1i7rf9fqxmww1civckhcvcn0xr85mq")))) | ||
| 42 | (build-system gnu-build-system) | ||
| 43 | (arguments | ||
| 44 | '(#:phases (alist-replace | ||
| 45 | 'configure | ||
| 46 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 47 | ;; There's no 'configure' script, just a raw makefile. | ||
| 48 | (substitute* "Makefile" | ||
| 49 | (("^PREFIX=.*$") | ||
| 50 | (string-append "PREFIX := " (assoc-ref outputs "out") | ||
| 51 | "\n")) | ||
| 52 | (("^MANDIR:=.*$") | ||
| 53 | ;; By default the thing tries to automatically | ||
| 54 | ;; determine whether to use $prefix/man or | ||
| 55 | ;; $prefix/share/man, and wrongly so. | ||
| 56 | (string-append "MANDIR := " (assoc-ref outputs "out") | ||
| 57 | "/share/man\n")) | ||
| 58 | (("^SHARED=.*$") | ||
| 59 | ;; Build libpciutils.so. | ||
| 60 | "SHARED := yes\n") | ||
| 61 | (("^ZLIB=.*$") | ||
| 62 | ;; Ask for zlib support. | ||
| 63 | "ZLIB := yes\n"))) | ||
| 64 | |||
| 65 | (alist-replace | ||
| 66 | 'install | ||
| 67 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 68 | ;; Install the commands, library, and .pc files. | ||
| 69 | (zero? (system* "make" "install" "install-lib"))) | ||
| 70 | %standard-phases)) | ||
| 71 | |||
| 72 | ;; Make sure programs have an RPATH so they can find libpciutils.so. | ||
| 73 | #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" | ||
| 74 | (assoc-ref %outputs "out") "/lib")) | ||
| 75 | |||
| 76 | ;; No test suite. | ||
| 77 | #:tests? #f)) | ||
| 78 | (native-inputs | ||
| 79 | `(("which" ,which) | ||
| 80 | ("pkg-config" ,pkg-config))) | ||
| 81 | (inputs | ||
| 82 | ;; TODO: Add dependency on Linux libkmod. | ||
| 83 | `(("zlib" ,zlib))) | ||
| 84 | (home-page "http://mj.ucw.cz/sw/pciutils/") | ||
| 85 | (synopsis "Programs for inspecting and manipulating PCI devices") | ||
| 86 | (description | ||
| 87 | "The PCI Utilities are a collection of programs for inspecting and | ||
| 88 | manipulating configuration of PCI devices, all based on a common portable | ||
| 89 | library libpci which offers access to the PCI configuration space on a variety | ||
| 90 | of operating systems. This includes the 'lspci' and 'setpci' commands.") | ||
| 91 | (license license:gpl2+))) | ||
