gnu: libphidget: Add "debug" output.
[jackhill/guix/guix.git] / gnu / packages / lsof.scm
CommitLineData
938081b9
AE
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
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 lsof)
20 #:use-module ((guix licenses)
21 #:renamer (symbol-prefix-proc 'license:))
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages perl))
26
27(define-public lsof
28 (package
29 (name "lsof")
30 (version "4.87")
31 (source (origin
32 (method url-fetch)
33 (uri (string-append "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_"
34 version ".tar.bz2"))
35 (sha256 (base32
36 "0b6si72sml7gr9784ak491cxxbm9mx5bh174yg6rrirbv04kgpfz"))))
37 (build-system gnu-build-system)
38 (inputs `(("perl" ,perl)))
39 (arguments
40 `(#:tests? #f ; no test target
41 #:phases
42 (alist-replace
43 'unpack
44 (lambda* (#:key source name version #:allow-other-keys)
45 (let ((unpack (assoc-ref %standard-phases 'unpack)))
46 (apply unpack (list #:source source))
47 (apply unpack (list #:source (car (find-files "." "\\.tar$"))))))
48 (alist-replace
49 'configure
50 (lambda* (#:key #:allow-other-keys)
51 (setenv "LSOF_CC" "gcc")
52 (setenv "LSOF_MAKE" "make")
53 (system* "./Configure" "linux"))
54 (alist-replace
55 'install
56 (lambda* (#:key outputs #:allow-other-keys)
57 (let ((out (assoc-ref outputs "out")))
58 (mkdir out)
59 (mkdir (string-append out "/bin"))
60 (copy-file "lsof" (string-append out "/bin/lsof"))
61 (mkdir (string-append out "/share"))
62 (mkdir (string-append out "/share/man"))
63 (mkdir (string-append out "/share/man/man8"))
64 (copy-file "lsof.8" (string-append out "/share/man/man8/lsof.8"))
65 ))
66 %standard-phases)))))
67 (synopsis "lsof displays information about open files")
68 (description
69 "Lsof stands for LiSt Open Files, and it does just that.
70It lists information about files that are open by the processes running
71on the system.")
72 (license (license:fsf-free
73 "file://00FAQ"
74 "License inspired by zlib, see point 1.9 of 00FAQ in the distribution."))
75 (home-page "http://people.freebsd.org/~abe/")))