gnu: slepc: Set origin file-name.
[jackhill/guix/guix.git] / gnu / packages / pciutils.scm
CommitLineData
42422cc2 1;;; GNU Guix --- Functional package management for GNU
ce0614dd 2;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
42422cc2
LC
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)
b5b73a82 22 #:use-module ((guix licenses) #:prefix license:)
42422cc2
LC
23 #:use-module (guix build-system gnu)
24 #:use-module (gnu packages compression)
25 #:use-module (gnu packages pkg-config)
ce0614dd 26 #:use-module (gnu packages base))
42422cc2
LC
27
28(define-public pciutils
29 (package
30 (name "pciutils")
f56e8f57 31 (version "3.3.1")
42422cc2
LC
32 (source (origin
33 (method url-fetch)
34 (uri (string-append
35 "mirror://kernel.org/software/utils/pciutils/pciutils-"
36 version
f56e8f57 37 ".tar.xz"))
42422cc2
LC
38 (sha256
39 (base32
f56e8f57 40 "1ag3skny1bamqil46dlppw8j1fp08spqa60fjygbxkg4fzdknjji"))))
42422cc2
LC
41 (build-system gnu-build-system)
42 (arguments
43 '(#:phases (alist-replace
44 'configure
45 (lambda* (#:key outputs #:allow-other-keys)
46 ;; There's no 'configure' script, just a raw makefile.
47 (substitute* "Makefile"
48 (("^PREFIX=.*$")
49 (string-append "PREFIX := " (assoc-ref outputs "out")
50 "\n"))
51 (("^MANDIR:=.*$")
52 ;; By default the thing tries to automatically
53 ;; determine whether to use $prefix/man or
54 ;; $prefix/share/man, and wrongly so.
55 (string-append "MANDIR := " (assoc-ref outputs "out")
56 "/share/man\n"))
57 (("^SHARED=.*$")
58 ;; Build libpciutils.so.
59 "SHARED := yes\n")
60 (("^ZLIB=.*$")
61 ;; Ask for zlib support.
62 "ZLIB := yes\n")))
63
64 (alist-replace
65 'install
66 (lambda* (#:key outputs #:allow-other-keys)
67 ;; Install the commands, library, and .pc files.
68 (zero? (system* "make" "install" "install-lib")))
69 %standard-phases))
70
71 ;; Make sure programs have an RPATH so they can find libpciutils.so.
72 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
73 (assoc-ref %outputs "out") "/lib"))
74
75 ;; No test suite.
76 #:tests? #f))
77 (native-inputs
78 `(("which" ,which)
79 ("pkg-config" ,pkg-config)))
80 (inputs
81 ;; TODO: Add dependency on Linux libkmod.
82 `(("zlib" ,zlib)))
83 (home-page "http://mj.ucw.cz/sw/pciutils/")
84 (synopsis "Programs for inspecting and manipulating PCI devices")
85 (description
86 "The PCI Utilities are a collection of programs for inspecting and
87manipulating configuration of PCI devices, all based on a common portable
88library libpci which offers access to the PCI configuration space on a variety
89of operating systems. This includes the 'lspci' and 'setpci' commands.")
90 (license license:gpl2+)))