File batsignal.spec of Package batsignal
Name: batsignal
Version: 1.8.0
Release: 0
Summary: Lightweight battery daemon written in C
License: ISC
URL: https://github.com/electrickite/%{name}
Source0: %{url}/archive/refs/tags/%{version}.tar.gz
#https://github.com/electrickite/batsignal/pull/34
# Patch: 0001-Make-PREFIX-CFLAGS_EXTRA-LDFLAGS_EXTRA-overrideable.patch
BuildRequires: gcc
BuildRequires: libnotify-devel
BuildRequires: pkgconfig
BuildRequires: make
BuildRequires: systemd-rpm-macros
%description
batsignal is a lightweight battery daemon written in C that notifies the user
about various battery states. It is intended for minimal window managers, but
can be used in any environment that supports desktop notifications via
libnotify.
%prep
%autosetup -p1
%build
%set_build_flags
%make_build CFLAGS_EXTRA="${CFLAGS}" LDFLAGS_EXTRA="${LDFLAGS}"
%install
%make_install PREFIX=%_prefix
make DESTDIR=%buildroot PREFIX=%_prefix install-service
%post
%{systemd_user_post %{name}.service}
%preun
%{systemd_user_preun %{name}.service}
%postun
%systemd_user_postun_with_restart %{name}.service
%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%_mandir/man1/%{name}*
%_userunitdir/%{name}.service
%changelog