%define tartopdir htb_util-0.2.4-pre1 Name: htb-util Version: 0.2.4 Release: 0.4.pre1.%{mysig} Summary: Another tool to make your life easier with HTB Group: Applications/Internet License: GPL URL: http://SGI.rdscv.ro/~ionuts/C/htb-tools/ Source0: http://SGI.rdscv.ro/~ionuts/C/htb_util-0.2.4-pre1.tar.gz Patch0: htb-util-0.2.4pre1-FC2.patch Patch1: htb-util-0.2.4pre1-init.d.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n) Requires: perl, sed, bash >= 2.00, iproute BuildRequires: flex Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig %description htb-util is a set of tools that generates scripts for bandwidth management using the HTB queueing discipline and lets you see the traffic passing through each queue in real time. %prep %setup -q -n %{tartopdir} %patch0 -p1 -b .FC2 %patch1 -p1 -b .init.d %build make %install rm -rf $RPM_BUILD_ROOT # make install mkdir -p -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d mkdir -p -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/htb mkdir -p -m0755 $RPM_BUILD_ROOT/sbin cp -f init.d/htb $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d cp -f q_{parser,show} $RPM_BUILD_ROOT/sbin %files %defattr(-,root,root,-) %doc docs/* %attr(751, root, root) /sbin/q_parser %attr(751, root, root) /sbin/q_show %attr(755, root, root) %{_sysconfdir}/rc.d/init.d/htb %attr(755, root, root) %dir %{_sysconfdir}/sysconfig/htb %clean rm -rf $RPM_BUILD_ROOT %post /sbin/chkconfig --add htb %preun if [ $1 -eq 0 ]; then %{_sysconfdir}/rc.d/init.d/htb stop >/dev/null 2>&1 || : /sbin/chkconfig --del htb fi %changelog * Sun Jul 03 2005 Milan Kerslager 0.2.4-0.4.pre1.ker.rhel4 - rebuild for RHEL4 * Fri Apr 7 2005 Michael Schwendt - rebuilt * Thu Jun 3 2004 - Mihai Maties - 0:0.2.4-0.fdr.0.3.pre1 - replaced postun with preun - additional minor fixes to the init.d/htb script * Wed Jun 2 2004 - Mihai Maties - 0:0.2.4-0.fdr.0.2.pre1 - applied patch to fix a potential vulnerability, freeze on startup if no config files available and some other cosmetic issues in init.d/htb script - applied patch to compile htb-util on Fedora Core 2 - added iproute requires - rm -rf RPM_BUILD_ROOT upon install - corrected default file attributes - don't enable htb-util automatically for runlevels 3 and 5, just add the service and let the sysadmin do the job - added postun * Thu Apr 15 2004 - Mihai Maties - 0:0.2.4-0.fdr.0.1.pre1 - Adapted existing spec file to comply with fedora.us policies * Wed Apr 14 2004 - Tarhon Onu Victor - 0.2.4-pre1.7BB - Initial release