Blob Blame History Raw
%global commit cabeb9947ccddd9a6e6ba14503e2a33063ac1b21
%global build_date 20140722

%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global posttag %{build_date}git%{shortcommit}

Name:		cpulimit
Version:	0.1
Release:	1.%{posttag}%{?dist}
Summary:	CPU Usage Limiter for Linux

Group:		Applications/System
License:	GPLv2+
URL:		https://github.com/opsengine/cpulimit
Source0:	https://github.com/opsengine/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz
BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Epoch:		1

%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 -n %{name}-%{commit}


%build
make


%install
rm -rf $RPM_BUILD_ROOT
install -Dp -m 755 src/cpulimit $RPM_BUILD_ROOT/%{_bindir}/cpulimit
install -Dp -m 644 README $RPM_BUILD_ROOT/%{_docdir}/%{name}/README
install -Dp -m 644 LICENSE $RPM_BUILD_ROOT/%{_docdir}/%{name}/LICENSE

%clean
rm -rf $RPM_BUILD_ROOT

%files
%{_bindir}/cpulimit
%doc %{_docdir}/%{name}

%changelog
* Tue Jul 22 2014 Christos Triantafyllidis <christos.triantafyllidis@gmail.com> - 1:0.1-1.20140722gitcabeb99
- Rebuild based on the github sources

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jan 07 2011 Christos Triantafyllidis <christos.triantafyllidis@gmail.com> 1.1-1
- initial package creation