File poweralertd.spec of Package poweralertd

#
# spec file for package poweralertd
#
# Copyright (c) 2025 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:           poweralertd
Version:        0.3.0
Release:        0
Summary:        UPower-powered power alerter
License:        GPL-2.0-only
URL:            https://git.sr.ht/~kennylevinsen/poweralertd
Source0:        https://git.sr.ht/~kennylevinsen/poweralertd/archive/%{version}.tar.gz
BuildRequires:  gcc
BuildRequires:  meson
BuildRequires:  systemd-devel
BuildRequires:  systemd
BuildRequires:  scdoc
Requires:       systemd

%description
Gives you power notifications as you need them. Just run it.
Depends on UPower and a notification daemon such as mako.

%prep
%autosetup

%build
%meson
%meson_build

%install
%meson_install

%pre
%service_add_pre %{name}.service

%post
%service_add_post %{name}.service

%preun
%service_del_preun %{name}.service

%postun
%service_del_postun %{name}.service

%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1%{?ext_man}
%{_userunitdir}/%{name}.service

%changelog
openSUSE Build Service is sponsored by