Name: dnf-autoupdate Version: 20230622 Release: 1%{?dist} Summary: Automatic system update using dnf License: Unlicense BuildArch: noarch Source0: %{name}-boot.sh.in Source1: %{name}-timer.sh.in Source2: %{name}-boot.service.in Source3: %{name}.service.in Source4: %{name}.timer BuildRequires: systemd-rpm-macros Requires: systemd %description Automatic system update using dnf. %build for f in %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3}; do sed 's!@libexec@!%{_libexecdir}!g; s!@configfile@!%{_sysconfdir}/%{name}.conf!g; s!@statefile@!/run/%{name}.state!g' < "$f" > "$(basename "$f" | sed 's!\.in$!!')" done %install install -Dm755 -t %{buildroot}/%{_libexecdir} %{name}-boot.sh install -Dm755 -t %{buildroot}/%{_libexecdir} %{name}-timer.sh install -Dm644 -t %{buildroot}/%{_unitdir} %{name}-boot.service install -Dm644 -t %{buildroot}/%{_unitdir} %{name}.service install -Dm644 -t %{buildroot}/%{_unitdir} %{SOURCE4} %files %{_libexecdir}/%{name}-boot.sh %{_libexecdir}/%{name}-timer.sh %{_unitdir}/%{name}-boot.service %{_unitdir}/%{name}.service %{_unitdir}/%{name}.timer %post %systemd_post %{name}-boot.service %systemd_post %{name}.service %systemd_post %{name}.timer %preun %systemd_preun %{name}-boot.service %systemd_preun %{name}.service %systemd_preun %{name}.timer %postun %systemd_postun %{name}-boot.service %systemd_postun %{name}.service %systemd_postun %{name}.timer