Name: earlyoom Version: 1.1 Release: 1%{?dist} Summary: Early OOM Daemon for Linux License: MIT URL: https://github.com/rfjakob/earlyoom Source0: https://github.com/rfjakob/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc BuildRequires: systemd %{?systemd_ordering} %description The oom-killer generally has a bad reputation among Linux users. This may be part of the reason Linux invokes it only when it has absolutely no other choice. earlyoom checks the amount of available memory and (since version 0.5) free swap 10 times a second. If both are below 10%, it will kill the largest process. The percentage value is configurable via command line arguments. %prep %autosetup %build CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" export CFLAGS export LDFLAGS %make_build VERSION="%{version}-%{release}" %install %make_install PREFIX="%{_prefix}" \ SYSTEMDUNITDIR="%{_unitdir}" %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %files %license LICENSE %doc README.md %{_bindir}/%{name} %{_mandir}/man1/%{name}.1.gz %config(noreplace) %{_sysconfdir}/default/%{name} %{_unitdir}/%{name}.service %changelog * Mon Jul 09 2018 Samuel Rakitničan 1.1-1 - Update to 1.1 * Wed Jun 20 2018 Samuel Rakitničan 1.0-1 - Initial build