%define name trickle %define version 1.07 %define release 1mdk Summary: A portable lightweight userspace bandwidth shaper Name: %{name} Version: %{version} Release: %{release} Source0: %{name}-%{version}.tar.bz2 Source1: %{name}d.conf.bz2 Source2: %{name}.init.bz2 Source3: %{name}.sysconfig.bz2 Patch0: trickle-1.06-64bit-fixes.patch.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot License: BSD URL: http://www.monkey.org/~marius/trickle/ Group: Networking/Other BuildRequires: libevent-devel PreReq: rpm-helper %description Trickle is a portable lightweight userspace bandwidth shaper. It can run in collaborative mode (together with trickled) or in stand alone mode. Trickle works by taking advantage of the unix loader preloading. Essentially it provides, to the application, a new version of the functionality that is required to send and receive data through sockets. It then limits traffic based on delaying the sending and receiving of data over a socket. Trickle runs entirely in userspace and does not require root privileges. %prep %setup -q %patch0 -p1 -b .64bit-fixes # lib64 fixes, don't bother with a patch perl -pi -e '/^clibdir=/ and s,prefix/lib,libdir,' configure %build #Macro does not work CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} --libdir=%_libdir make %install rm -rf ${RPM_BUILD_ROOT} %makeinstall install -d ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig install -d ${RPM_BUILD_ROOT}/%{_initrddir} bzcat %{SOURCE1} > ${RPM_BUILD_ROOT}%{_sysconfdir}/trickled.conf bzcat %{SOURCE2} > ${RPM_BUILD_ROOT}%{_initrddir}/trickle bzcat %{SOURCE3} > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/trickle chmod 755 ${RPM_BUILD_ROOT}/%{_initrddir}/trickle %post %_post_service %{name} %preun %_preun_service %{name} %clean rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root) %doc LICENSE README TODO %{_bindir}/%{name}* %config(noreplace) %{_sysconfdir}/trickled.conf %config(noreplace) %{_sysconfdir}/sysconfig/trickle %config(noreplace) %{_initrddir}/trickle %{_mandir}/man1/%{name}* %{_mandir}/man8/%{name}* %{_mandir}/man5/%{name}* %dir %{_libdir}/trickle %{_libdir}/trickle/trickle-overload.so %changelog * Tue Apr 26 2005 Götz Waschk <waschk@mandriva.org> 1.07-1mdk - New release 1.07 * Mon Mar 21 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.06-4mdk - 64-bit & lib64 fixes * Mon Dec 06 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.06-3mdk - rebuilt against new libevent * Fri Nov 5 2004 Götz Waschk <waschk@linux-mandrake.com> 1.06-2mdk - disable parallel build * Thu Oct 2 2003 Götz Waschk <waschk@linux-mandrake.com> 1.06-1mdk - initial package from Maxim * Wed Oct 01 2003 Maxim Heijndijk <cchq@wanadoo.nl> 1.06-1mdk - Initial wrap. - Initscript. - Example config.