Name: cpulimit Version: 1.3 Release: 1%{?dist} Summary: CPU Usage Limiter Group: Applications/System License: GPLv2 URL: http://limitcpu.sourceforge.net/ Source0: http://downloads.sourceforge.net/project/limitcpu/limitcpu/%{name}-%{version}.tar.gz Patch0: %{name}-%{version}-check-fgets-return-value.patch %description cpulimit is a simple program which attempts to limit the CPU usage of a process (expressed in percentage, not in CPU time). This is useful to control batch jobs, when you don't want them to eat too much CPU. It does not act on the nice value or other scheduling priority stuff, but on the real CPU usage. Also, it is able to adapt itself to the overall system load, dynamically and quickly. %prep %setup -q %patch0 -p1 -b .check-fgets-return-value %build gcc %{optflags} -o cpulimit cpulimit.c -lrt -Werror %install install -Dpm 755 %{name} $RPM_BUILD_ROOT%{_bindir}/%{name} gunzip %{name}.1.gz install -Dpm 644 %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1 %files %defattr(-,root,root,-) %doc LICENSE CHANGELOG README %{_mandir}/man1/%{name}.1.* %{_bindir}/%{name} %changelog * Tue Jun 21 2011 Hicham HAOUARI 1.3-1 - Initial Fedora Package