import source from 4.82
[external/lsof.git] / packaging / lsof.spec
1 #
2 # Please submit bugfixes or comments via http://bugs.meego.com/
3 #
4
5 Name:           lsof
6 Version:        4.82
7 Release:        1
8 License:        zlib
9 Summary:        A utility which lists open files on a Linux/UNIX system
10 Group:          Development/Debuggers
11
12 Url:            ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof
13 # lsof contains licensed code that we cannot ship.  Therefore we use
14 # upstream2downstream.sh script to remove the code before shipping it.
15 #
16 # The script you can found in CVS or download from:
17 # http://cvs.fedoraproject.org/viewcvs/rpms/lsof/devel/upstream2downstream.sh
18 #
19 %define lsofrh lsof_4.82-rh
20 Source0:        %{lsofrh}.tar.bz2
21
22 # 184338 - allow lsof access nptl threads
23 Patch1:         lsof_4.81-threads.patch
24
25 %description
26 Lsof stands for LiSt Open Files, and it does just that: it lists
27 information about files that are open by the processes running on a
28 UNIX system.
29
30 %prep
31 %setup -q -n %{lsofrh}
32 %patch1 -p1
33
34 %build
35 LSOF_VSTR=2.6.16 LINUX_BASE=/proc ./Configure -n linux
36
37 make DEBUG="%{optflags}" %{?_smp_mflags}
38
39 %install
40 mkdir -p %{buildroot}%{_sbindir}
41 install -p -m 0755 lsof %{buildroot}%{_prefix}/sbin
42 mkdir -p %{buildroot}%{_mandir}/man8
43 install -p lsof.8 %{buildroot}%{_mandir}/man8/
44
45 %clean
46 rm -rf %{buildroot}
47
48 %docs_package
49
50 %files
51 %defattr(644,root,root,755)
52 %attr(0755,root,root) %{_sbindir}/lsof
53