# $Id$ Summary: Generate a readout of the current bandwidth use Name: bwbar Version: 1.2.2 Release: 3 License: GPL Group: System Environment/Base Source0: http://www.kernel.org/pub/software/web/bwbar/bwbar-1.2.2.tar.gz Source1: bwbar Source2: bwbar.8 Patch0: bwbar.daemon.patch Patch1: bwbar.debian-010_directory_option.patch Patch2: bwbar.debian-020_proc_net_2.6.x_fix.patch URL: http://www.kernel.org/pub/software/web/bwbar/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libpng-devel %description bwbar is a small program that generates a text and a graphical readout of the current bandwidth use. It is currently for Linux only. It is used, among others, at http://www.kernel.org/. %prep %setup -q %patch0 -p0 %patch1 -p0 %patch2 -p0 %build %configure %{__make} %{?_smp_mflags} %install %{__rm} -rf $RPM_BUILD_ROOT %{__mkdir_p} $RPM_BUILD_ROOT%{_bindir} %{__mkdir_p} $RPM_BUILD_ROOT%{_mandir}/man8 %{__mkdir_p} $RPM_BUILD_ROOT%{_initrddir} %{__mkdir_p} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig %{__install} -m 755 %{name} $RPM_BUILD_ROOT%{_bindir} %{__install} -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir} %{__install} -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man8 %{__cat} >> $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/bwbar << END #OPTIONS="-D eth0 100 -d /path/to/outdir" #BWBAR_USER="please_define_a_user" END %post if [ "$1" -eq "1" ]; then /sbin/chkconfig --add %{name} fi %preun if [ "$1" -eq "0" ]; then /sbin/service %{name} stop > /dev/null 2>&1 /sbin/chkconfig --del %{name} fi %clean %{__rm} -rf $RPM_BUILD_ROOT %files %defattr(-, root, root, 0755) %doc README %{_bindir}/%{name} %{_mandir}/man8/* %config(noreplace) %{_initrddir}/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %changelog * Fri Apr 7 2005 Michael Schwendt - rebuilt * Fri Jul 23 2004 Adrian Reber - 0:1.2.2-0.fdr.2 - changed the daemon patch to use -D and --Daemon - added a debian patch to specify an output directory - added another debian patch - added the man page (also from the debian package) * Fri Jul 16 2004 Adrian Reber - 0:1.2.2-0.fdr.1 - Initial RPM release.