File low-memory-monitor.spec of Package low-memory-monitor

#
# spec file for package low-memory-monitor
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           low-memory-monitor
Version:        @SERVICE@
Release:        0
Summary:        Early boot daemon
License:        GPL-3.0-or-later
Group:          System/Daemons
URL:            https://gitlab.freedesktop.org/hadess/low-memory-monitor
Source:         %{name}-%{version}.tar.xz
Source96:       %{name}-rpmlintrc
BuildRequires:  cmake
BuildRequires:  gtk-doc
BuildRequires:  meson >= 0.45.0
BuildRequires:  ninja
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  systemd
%{?systemd_requires}

%description
The Low Memory Monitor is an early boot daemon that will monitor memory
pressure information coming from the kernel, and, first, send a signal
to user-space applications when memory is running low, and then activate
the kernel's OOM killer when memory is running really low.

%prep
%setup -q

%build
%meson
%meson_build

%install
%meson_install
install -dm 755 %{buildroot}%{_sbindir}
ln -sf service %{buildroot}%{_sbindir}/rc%{name}

%pre
%service_add_pre %{name}.service

%preun
%service_del_preun %{name}.service

%post
%service_add_post %{name}.service

%postun
%service_del_postun %{name}.service

%files
%doc README.md
%doc %{_datadir}/gtk-doc/html/%{name}
%dir %{_sysconfdir}/dbus-1
%dir %{_sysconfdir}/dbus-1/system.d
%config %{_sysconfdir}/dbus-1/system.d/org.freedesktop.LowMemoryMonitor.conf
%{_libexecdir}/%{name}
%{_unitdir}/%{name}.service
%{_sbindir}/rc%{name}
%license COPYING

%changelog
openSUSE Build Service is sponsored by