blob: 1a4edc9f553ca4578e15f14a8c9bbdff616f1071 [file] [log] [blame] [raw]
Summary : A console application which monitors network traffic and bandwidth usage in real time
Name : @PACKAGE@
Version : @VERSION@
Release : 1
Copyright : GPL
Url : http://www.roland-riegel.de/nload/index_en.html
Packager : Helder Correia <helder.correia@netcabo.pt>
Group : Applications/Networking
Source : %{name}-%{version}.tar.gz
BuildRoot : /var/tmp/%{name}-%{version}-rpmbuildroot
Prefix : /usr/local
%description
nload is a console application which monitors network traffic and bandwidth
usage in real time. It visualizes the in- and outgoing traffic using two graphs
and provides additionally info like total amount of transfered data and min/max
network usage.
%prep
%setup
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} $LOCALFLAGS
%build
# Setup for parallel builds
numprocs=$(egrep -c ^cpu[0-9]+ /proc/stat || :)
if [ "$numprocs" = "0" ]; then
numprocs=1
fi
make -j$numprocs
%install
make install DESTDIR=$RPM_BUILD_ROOT
cd $RPM_BUILD_ROOT
find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list.%{name}-%{version}
find . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name}-%{version}
find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name}-%{version}
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/%{name}-%{version}
rm -rf ../file.list.%{name}-%{version}
%files -f ../file.list.%{name}-%{version}