Name: nettop Version: 0.2.3 Release: 2%{?dist} Summary: A top-like program for network packets Group: System Environment/Base License: BSD URL: http://srparish.net/scripts/ Source0: http://srparish.net/scripts/%{name}-%{version}.tar.gz # Additional files to tie nettop into pam authorization for regular users Source1: nettop-pam Source2: nettop-console.apps # gcc4 is pickier; these changes allow for compile Patch0: nettop-compile.patch # install to %%{_sbindir} since nettop requires root privilege, also use # $DESTDIR Patch1: nettop-install-path.patch # Some color choice are not easily readable on white background; black provides # better contrast Patch2: nettop-black-background.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libpcap-devel, slang-devel Requires: usermode, pam %description Nettop is a program which looks like top, but is for network packets. %prep %setup -q %patch0 -p1 -b .compile %patch1 -p1 -b .install-path %patch2 -p1 -b .black-background %build %configure --with-slang-includes=%{_includedir}/slang make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_bindir} mkdir -p $RPM_BUILD_ROOT/%{_sbindir} make install DESTDIR=$RPM_BUILD_ROOT cd $RPM_BUILD_ROOT/%{_bindir} && ln -sf consolehelper %{name} mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/security/console.apps install -m 0644 %SOURCE1 $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d/%{name} install -m 0644 %SOURCE2 $RPM_BUILD_ROOT/%{_sysconfdir}/security/console.apps/%{name} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{_bindir}/* %{_sbindir}/* %config(noreplace) %{_sysconfdir}/pam.d/%{name} %config(noreplace) %{_sysconfdir}/security/console.apps/%{name} %doc ChangeLog README THANKS %changelog * Tue Nov 24 2009 Bernard Johnson - 0.2.3-2 - begin summary line with 'A' - source0 by name/version macros - better comments regarding additional sources & patches - source1/2 were reversed * Fri Jan 02 2008 Bernard Johnson - 0.2.3-1 - initial release