Summary: A utility which lists open files on a Linux/UNIX system Name: lsof Version: 4.85 Release: 1 License: zlib Group: Development/Debuggers URL: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof Source0: %{name}_%{version}.tar.bz2 Source1: %{name}_%{version}.tar.bz2.sig BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %ifos aix5.1 Requires: AIX-rpm >= 5.1.0.0 Requires: AIX-rpm < 5.2.0.0 %endif %ifos aix5.2 Requires: AIX-rpm >= 5.2.0.0 Requires: AIX-rpm < 5.3.0.0 %endif %ifos aix5.3 Requires: AIX-rpm >= 5.3.0.0 Requires: AIX-rpm < 5.4.0.0 %endif %ifos aix6.1 Requires: AIX-rpm >= 6.1.0.0 Requires: AIX-rpm < 6.2.0.0 %endif %ifos aix7.1 Requires: AIX-rpm >= 7.1.0.0 Requires: AIX-rpm < 7.2.0.0 %endif %description Lsof stands for LiSt Open Files, and it does just that: it lists information about files that are open by the processes running on a UNIX system. %prep %setup -q -n %{name}_%{version} tar xf %{name}_%{version}_src.tar %build cd %{name}_%{version}_src %ifos aix5.1 LSOF_VSTR=5.1.0.0 %endif %ifos aix5.2 LSOF_VSTR=5.2.0.0 %endif %ifos aix5.3 LSOF_VSTR=5.3.0.0 %endif %ifos aix6.1 LSOF_VSTR=6.1.0.0 %endif %ifos aix7.1 LSOF_VSTR=7.1.0.0 %endif LSOF_VSTR=${LSOF_VSTR} ./Configure -n aix make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd %{name}_%{version}_src mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} cp %{name} ${RPM_BUILD_ROOT}%{_sbindir}/%{name} chmod 2755 ${RPM_BUILD_ROOT}%{_sbindir}/%{name} /usr/bin/strip ${RPM_BUILD_ROOT}%{_sbindir}/%{name} || : mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8 cp %{name}.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/ chmod 0644 ${RPM_BUILD_ROOT}%{_mandir}/man8/ cd ${RPM_BUILD_ROOT} mkdir -p usr/linux/sbin cd usr/linux/sbin ln -sf ../../..%{_sbindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc 00* %{_sbindir}/%{name} %{_mandir}/man*/* /usr/linux/sbin/%{name} %changelog * Fri Oct 14 2011 Michael Perzl - 4.85-1 - first version for AIX V5.1 and higher