gnu: gtk+: Disable tests on mips64el-linux.
[jackhill/guix/guix.git] / gnu / packages / pciutils.scm
CommitLineData
42422cc2
LC
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
88manipulating configuration of PCI devices, all based on a common portable
89library libpci which offers access to the PCI configuration space on a variety
90of operating systems. This includes the 'lspci' and 'setpci' commands.")
91 (license license:gpl2+)))