lsof/lsof.spec

changeset 464
3e2a08d916c6
parent 125
06debe70afb4
child 465
6a12068a8ac8
equal deleted inserted replaced
3:f1fd01a0c7f4 4:662dbd96f487
1 ## 1 ##
2 ## lsof.spec -- OpenPKG RPM Package Specification 2 ## lsof.spec -- OpenPKG RPM Package Specification
3 ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> 3 ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
4 ## 4 ##
5 ## Permission to use, copy, modify, and distribute this software for 5 ## Permission to use, copy, modify, and distribute this software for
6 ## any purpose with or without fee is hereby granted, provided that 6 ## any purpose with or without fee is hereby granted, provided that
7 ## the above copyright notice and this permission notice appear in all 7 ## the above copyright notice and this permission notice appear in all
8 ## copies. 8 ## copies.
29 Packager: OpenPKG Foundation e.V. 29 Packager: OpenPKG Foundation e.V.
30 Distribution: OpenPKG Community 30 Distribution: OpenPKG Community
31 Class: BASE 31 Class: BASE
32 Group: Debugging 32 Group: Debugging
33 License: BSD 33 License: BSD
34 Version: 4.82 34 Version: 4.86
35 Release: 20090401 35 Release: 20120603
36 36
37 # list of sources 37 # list of sources
38 Source0: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_%{version}.tar.gz 38 Source0: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_%{version}.tar.gz
39 Patch0: lsof.patch 39 Patch0: lsof.patch
40 40
41 # build information 41 # build information
42 Prefix: %{l_prefix} 42 BuildPreReq: OpenPKG, openpkg >= 20100101, gcc
43 BuildRoot: %{l_buildroot} 43 PreReq: OpenPKG, openpkg >= 20100101
44 BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc
45 PreReq: OpenPKG, openpkg >= 20040130
46 AutoReq: no
47 AutoReqProv: no
48 44
49 %description 45 %description
50 List Open Files (lsof) shows all currently open file descriptors of 46 List Open Files (lsof) shows all currently open file descriptors of
51 processes. 47 processes.
52 48
65 61
66 %build 62 %build
67 cd lsof_%{version}_src 63 cd lsof_%{version}_src
68 export PATH="/bin:/usr/bin:$PATH" 64 export PATH="/bin:/usr/bin:$PATH"
69 export LSOF_CC="%{l_cc}" 65 export LSOF_CC="%{l_cc}"
70 export LSOF_MAKE="%{l_make} %{l_mflags -O}" 66 export LSOF_MAKE="%{l_make} %{l_mflags}"
71 case "%{l_platform -t}" in 67 case "%{l_platform -t}" in
72 *-freebsd* ) platform="freebsd"; LSOF_CC="/usr/bin/cc"; LSOF_MAKE="/usr/bin/make" ;; 68 *-freebsd* ) platform="freebsd"; LSOF_CC="/usr/bin/cc"; LSOF_MAKE="/usr/bin/make" ;;
73 *-linux* ) platform="linux" ;; 69 *-linux* ) platform="linux" ;;
74 *-sunos* ) platform="solaris" ;; 70 *-sunos* ) platform="solaris" ;;
75 *-netbsd* ) platform="netbsd" ;; 71 *-netbsd* ) platform="netbsd" ;;
79 esac 75 esac
80 ./Configure -n $platform 76 ./Configure -n $platform
81 eval $LSOF_MAKE 77 eval $LSOF_MAKE
82 78
83 %install 79 %install
84 rm -rf $RPM_BUILD_ROOT
85 %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin 80 %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin
86 %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/man/man8 81 %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/man/man8
87 ( cd lsof_%{version}_src 82 ( cd lsof_%{version}_src
88 %{l_shtool} install -c lsof $RPM_BUILD_ROOT%{l_prefix}/bin/ 83 %{l_shtool} install -c lsof $RPM_BUILD_ROOT%{l_prefix}/bin/
89 %{l_shtool} install -c lsof.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/ 84 %{l_shtool} install -c lsof.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
103 "%attr(2755,%{l_musr},$setgid) %{l_prefix}/bin/lsof" 98 "%attr(2755,%{l_musr},$setgid) %{l_prefix}/bin/lsof"
104 99
105 %files -f files 100 %files -f files
106 101
107 %clean 102 %clean
108 rm -rf $RPM_BUILD_ROOT
109 103

mercurial