## START: Set by rpmautospec
## (rpmautospec version 0.6.0)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 7;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
# Generated by go2rpm 1.6.0
%bcond_without check
# https://gitlab.com/WhyNotHugo/darkman
%global goipath gitlab.com/WhyNotHugo/darkman
Version: 1.5.4
%global tag v%{version}
%gometa -f
%global common_description %{expand:
Daemon for dark-mode and light-mode transitions on Linux desktop.}
%global golicenses LICENCE
%global godocs examples CHANGELOG.md README.md
Name: darkman
Release: %autorelease
Summary: Daemon for dark-mode and light-mode transitions on Linux desktop
License: ISC
URL: %{gourl}
Source0: %{gosource}
# Fixed upstream https://gitlab.com/WhyNotHugo/darkman/-/commit/9403394dad6d148ac2da4317ecaf5c4da21beb0d
Patch0: 9403394dad6d148ac2da4317ecaf5c4da21beb0d.patch
# Fixed upstream https://gitlab.com/WhyNotHugo/darkman/-/commit/d0412f2a40b09bad014107ca2c13f9c7c100b7eb
Patch1: d0412f2a40b09bad014107ca2c13f9c7c100b7eb.patch
# Fix proposed upstream https://gitlab.com/WhyNotHugo/darkman/-/merge_requests/24
Patch2: 0001-Update-astral-version.patch
BuildRequires: scdoc
BuildRequires: systemd-rpm-macros
Requires: dbus-common
%description
%{common_description}
%gopkg
%prep
%goprep
%autopatch -p1
%generate_buildrequires
%go_generate_buildrequires
%build
for cmd in cmd/* ; do
%gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
done
scdoc < darkman.1.scd > darkman.1
%install
%gopkginstall
install -m 0755 -vd %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
install -m 0644 -Dp darkman.service %{buildroot}%{_userunitdir}/darkman.service
install -m 0644 -Dp darkman.1 %{buildroot}%{_mandir}/man1/darkman.1
install -m 0644 -Dp contrib/dbus/nl.whynothugo.darkman.service %{buildroot}%{_datadir}/dbus-1/services/nl.whynothugo.darkman.service
install -m 0644 -Dp contrib/dbus/org.freedesktop.impl.portal.desktop.darkman.service %{buildroot}%{_datadir}/dbus-1/services/org.freedesktop.impl.portal.darkman.service
install -m 0644 -Dp contrib/portal/darkman.portal %{buildroot}%{_datadir}/xdg-desktop-portal/portals/darkman.portal
%if %{with check}
%check
%gocheck
%endif
%post
%systemd_user_post %{name}.service
%preun
%systemd_user_preun %{name}.service
%postun
%systemd_user_postun_with_restart %{name}.service
%files
%license LICENCE
%doc examples CHANGELOG.md README.md
%{_bindir}/darkman
%{_userunitdir}/darkman.service
%{_mandir}/man1/darkman.1.gz
%{_datadir}/dbus-1/services/*.service
%dir %{_datadir}/xdg-desktop-portal
%dir %{_datadir}/xdg-desktop-portal/portals/
%{_datadir}/xdg-desktop-portal/portals/darkman.portal
%gopkgfiles
%changelog
## START: Generated by rpmautospec
* Fri May 24 2024 Link Dupont - 1.5.4-7
- Update astral import path (RHBZ#2280673)
* Sun Feb 11 2024 Maxwell G - 1.5.4-6
- Rebuild for golang 1.22.0
* Wed Jan 24 2024 Fedora Release Engineering - 1.5.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering - 1.5.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Oct 22 2023 Link Dupont - 1.5.4-3
- Drop systemd hardening
* Mon Aug 07 2023 Link Dupont - 1.5.4-1
- Update to 1.5.4 (rhbz#2144969)
* Wed Jul 19 2023 Fedora Release Engineering - 1.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering - 1.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Mon Oct 31 2022 Link Dupont - 1.4.0-1
- New upstream version
* Thu Jul 21 2022 Fedora Release Engineering - 1.3.1-0.5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Jul 19 2022 Maxwell G - 1.3.1-0.4
- Rebuild for CVE-2022-{1705,32148,30631,30633,28131,30635,30632,30630,1962} in
golang
* Mon Jun 20 2022 Link Dupont - 1.3.1-0.3.20220530gitc265698
- Initial package (RHBZ#2092180)
## END: Generated by rpmautospec