Summary: A utility which lists open files on a Linux/UNIX system. Name: lsof Version: 4.57 Release: 1 Copyright: Free Group: Development/Debuggers Source0: ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/lsof_%{version}_W.tar.gz Prefix: %{_prefix} Buildroot: /var/tmp/%{name}-root %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 -c -n lsof_%{version} # add -a 1 above #tar xzf %SOURCE1 # # Sort out whether this is the wrapped or linux specific tar ball. # [ -f lsof_%{version}.tar ] && tar xf lsof_%{version}.tar [ -d lsof_%{version}.linux -a ! -d lsof_%{version} ] && \ mv lsof_%{version}.linux lsof_%{version} [ -d lsof_%{version} ] && cd lsof_%{version} %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} ] && cd lsof_%{version} #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} ] && cd lsof_%{version} 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}/00* %attr(2755,root,system) %{prefix}/sbin/lsof %{prefix}/man/man8/lsof.8* /usr/man/man8/lsof.8* /usr/sbin/lsof %changelog * 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