Summary: A utility which lists open files on a Linux/UNIX system. Name: lsof Version: 4.61 Release: 1 Copyright: Free Group: Development/Debuggers Source0: ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/lsof_%{version}.tar.gz Prefix: %{_prefix} Buildroot: /var/tmp/%{name}-root #Build version for each specific AIX OS level %ifos aix4.3 Conflicts: AIX-rpm >= 5.0.0.0 %endif %ifos aix5.0 aix5.1 Requires: AIX-rpm >= 5.0.0.0 %endif %ifarch ia64 %define DEFCCIA cc %define DEFCC %{DEFCCIA} %else %define DEFCC cc %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 lsof_%{version} # # Sort out whether this is the wrapped or linux specific tar ball. # [ -f lsof_%{version}_src.tar ] && tar xf lsof_%{version}_src.tar [ -d lsof_%{version}_src.linux -a ! -d lsof_%{version_src} ] && \ mv lsof_%{version}_src.linux lsof_%{version}_src [ -d lsof_%{version}_src ] && cd lsof_%{version}_src %build # Use the default compiler for this platform - gcc otherwise if [[ -z "$CC" ]] then if test "X`type %{DEFCC} 2>/dev/null`" != 'X'; then export CC=%{DEFCC} export bld_target=aix else export CC=gcc export bld_target=aixgcc fi fi if test "X$CC" != "Xgcc" then export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's:-fsigned-char::'` export CFLAGS="$RPM_OPT_FLAGS" fi rm -rf $RPM_BUILD_ROOT # # ### Sort out whether this is the wrapped or linux specific tar ball. # [ -d lsof_%{version}_src ] && cd lsof_%{version}_src #LINUX_KERNEL=`pwd`/../linux LSOF_INCLUDE=`pwd`/../linux/include \ #LSOF_VERS=20036 LSOF_VSTR=2.0.36 LINUX_BASE=/dev/kmem \ #LSOF_VERS=22012 LSOF_VSTR=2.2.12 LINUX_BASE=/proc \ ./Configure -n $bld_target make CDEF=-DHASXOPT_ROOT %install rm -rf $RPM_BUILD_ROOT # # ### Sort out whether this is the wrapped or linux specific tar ball. # [ -d lsof_%{version}_src ] && cd lsof_%{version}_src install -d ${RPM_BUILD_ROOT}%{prefix}/sbin install -d ${RPM_BUILD_ROOT}%{prefix}/man/man8 install -s lsof ${RPM_BUILD_ROOT}%{prefix}/sbin install lsof.8 ${RPM_BUILD_ROOT}%{prefix}/man/man8/ (cd $RPM_BUILD_ROOT mkdir -p usr/sbin cd usr/sbin ln -sf ../..%{prefix}/sbin/lsof . cd - mkdir -p usr/man/man8 cd usr/man/man8 ln -sf ../../..%{prefix}/man/man8/* . ) %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,system,755) %doc lsof_%{version}_src/00* %attr(2755,root,system) %{prefix}/sbin/lsof %{prefix}/man/man8/lsof.8* /usr/man/man8/lsof.8* /usr/sbin/lsof %changelog * Wed May 29 2002 David Clissold - Update to Version 4.61 * Tue Aug 14 2001 David Clissold - Update to Version 4.57 * Wed May 23 2001 Marc Stephenson - Version 4.56 * Wed Mar 21 2001 Marc Stephenson - Rebuild against new shared objects - Use default compiler * Fri Oct 27 2000 pkgmgr - Modify for AIX Freeware distribution - Adapted from RedHat lsof-4.47-2 - Contributors: Christian Gafton - Jeff Johnson - Preston Brown - Maciej Lesniewski