File stated.spec of Package stated
#
# spec file for package flashlightd
#
# Copyright (c) 2022 SUSE LLC
#
# 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: stated
Version: 0.1.0
Release: 0
Summary: Simple daemon to handle wakelock-centered
License: GPL-3.0-or-later
URL: https://github.com/droidian/stated
Source0: %{name}-%{version}.tar.xz
Source1: stated.service
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: gstreamer-devel
BuildRequires: meson
BuildRequires: vala
BuildRequires: pkgconfig(libevdev)
BuildRequires: systemd-rpm-macros
BuildRequires: systemd
%systemd_requires
%description
Simple daemon to handle wakelock-centered, opportunistic sleep
stated is a simple daemon designed to augment existing settings and power
management daemons (e.g. gnome-settings-daemon) in order to support
the wakelock-centered, opportunistic sleep as found in Android devices.
Stated is NOT meant to replace DE provided daemons, and tries not
to be in their way.
%prep
%autosetup -p1
%build
%meson
%meson_build
%install
%meson_install
%{__install} -Dm0644 -t %{buildroot}%{_unitdir} %{SOURCE1}
%pre -n %{name}
%service_add_pre stated.service
%post -n %{name}
%service_add_post stated.service
systemctl enable stated.service
%preun -n %{name}
%service_del_preun stated.service
%postun -n %{name}
%service_del_postun stated.service
%files
%{_bindir}/stated
%{_unitdir}/*
%changelog