Name: kexec-reboot Version: 20230622 Release: 1%{?dist} Summary: Reboot by kexec License: Unlicense BuildArch: noarch Source0: %{name}.py Source1: %{name}.service.in Source2: %{name}.target BuildRequires: systemd-rpm-macros Requires: systemd Requires: kexec-tools %description Reboot by kexec. %build sed 's!@libexec@!%{_libexecdir}!g' < %{SOURCE1} > %{name}.service %install install -Dm755 -t %{buildroot}/%{_libexecdir} %{SOURCE0} install -Dm644 -t %{buildroot}/%{_unitdir} %{name}.service install -Dm644 -t %{buildroot}/%{_unitdir} %{SOURCE2} %files %{_libexecdir}/%{name}.py %{_unitdir}/%{name}.service %{_unitdir}/%{name}.target %post %systemd_post %{name}.service %systemd_post %{name}.target %preun %systemd_preun %{name}.service %systemd_preun %{name}.target %postun %systemd_postun %{name}.service %systemd_postun %{name}.target