%define name shapecfg %define version 2.2.13 %define release 15mdk Summary: A configuration tool for setting traffic bandwidth parameters Name: %{name} Version: %{version} Release: %{release} License: GPL Group: System/Configuration/Networking Source0: shaper.36.tar.bz2 Source1: cbq.init-v0.7.2.bz2 Source2: README.shaper.bz2 Source3: README.cbq.bz2 Patch0: shapercfg-2.0.36-glibc.patch.bz2 # (fg) 20010109 Use strncpy(), not strcpy(), and make main return int Patch1: shaper-security.patch.bz2 Patch2: Makefile-opt.patch.bz2 URL: http://sourceforge.net/projects/cbqinit/ Buildroot: %{_tmppath}/%{name}-buildroot PreReq: rpm-helper Requires: kernel >= 2.2, iproute2 ExclusiveArch: %{ix86} ppc %description The Shapecfg program configures and adjusts traffic shaper bandwidth limiters. Traffic shaping means setting parameters to which traffic should conform - setting the standards for bandwidth consumption. To use Shapecfg, you must have also installed the kernel which supports the shaper module (kernel versions 2.0.36 or later and late 2.1.x kernels). Install the shapecfg package if you want to set traffic bandwidth parameters, and if you have the appropriate kernel. %prep %setup -q -n shaper %patch0 -p1 %patch1 -p1 %patch2 -p0 %build %make bzcat %{SOURCE1} > cbq bzcat %{SOURCE2} > README.shaper bzcat %{SOURCE3} > README.cbq %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} # don't fiddle with the initscript! export DONT_GPRINTIFY=1 install -d %{buildroot}/sbin install -d %{buildroot}%{_sysconfdir}/sysconfig/cbq install -d %{buildroot}%{_initrddir} install -m755 shapecfg %{buildroot}/sbin/shapecfg install -m755 cbq %{buildroot}%{_initrddir}/ cat <<EOF > %{buildroot}%{_sysconfdir}/sysconfig/cbq/cbq-0000.example DEVICE=eth0,10Mbit,1Mbit RATE=128Kbit PRIO=5 RULE=10.0.1.0/24 EOF %post %_post_service cbq %preun %_preun_service cbq %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc README.* %dir %{_sysconfdir}/sysconfig/cbq %attr(0755,root,root) %config(noreplace) %{_initrddir}/cbq %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/cbq/* /sbin/shapecfg %changelog * Tue Jul 05 2005 Lenny Cartier <lenny@mandriva.com> 2.2.13-15mdk - rebuild * Tue May 25 2004 Lenny Cartier <lenny@mandrakesoft.com> 2.2.13-14mdk - rebuild * Sat Feb 15 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.2.13-13mdk - new init script (S2) - misc spec file fixes * Thu Jan 16 2003 Lenny Cartier <lenny@mandrakesoft.com> 2.2.13-12mdk - rebuild * Mon May 20 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.2.13-11mdk - rebuilt with gcc3.1 * Sun Mar 3 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.2.13-10mdk - new init script (S2) - misc spec file fixes - added P2 * Tue Oct 09 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.2.13-9mdk - fixes from Oden Eriksson <oden.eriksson@kvikkjokk.net> : - new init script (S2) - put the init script where it should belong * Thu Jan 11 2001 Francis Galiegue <fg@mandrakesoft.com> 2.2.13-8mdk - Is now in contribs - Requires: kernel22. In 2.4, you have to use iproute2 * Tue Jan 09 2001 Francis Galiegue <fg@mandrakesoft.com> 2.2.13-7mdk - Small spec file cleanup - Recompile against 2.4 - Better prevent than cure: use strncpy, not strcpy (patch1) * Fri Jul 28 2000 Francis Galiegue <fg@mandrakesoft.com> 2.2.13-6mdk - More macros * Thu Jul 20 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.2.13-5mdk - BM * Mon Apr 17 2000 Francis Galiegue <fg@mandrakesoft.com> 2.2.13-4mdk - Resubmitted due to fuzzy upload... * Sun Mar 19 2000 John Buswell <johnb@mandrakesoft.com> 2.2.13-3mdk - Added ppc support * Fri Mar 17 2000 Francis Galiegue <francis@mandrakesoft.com> 2.2.13-2mdk - Let spec helper do its job - Changed group to match 7.1 specs * Wed Nov 03 1999 John Buswell <johnb@mandrakesoft.com> - added cbq - added cbq example config - updated version to sync with kernel - Build Release * Wed May 05 1999 Bernhard Rosenkraenzer <bero@mandrakesoft.com> - Mandrake adaptions * Fri Mar 26 1999 Michael Maher <mike@redhat.com> - added some documentation. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> - auto rebuild in the new build environment (release 3) * Wed Feb 3 1999 Bill Nottingham <notting@redhat.com> - build against glibc2.1 * Fri Oct 02 1998 Cristian Gafton <gafton@redhat.com> - exclusive arch i386 for now