Name: snapper-sdboot Version: 1.0.0 Release: 1%{?dist} Summary: Boot entries for snapper snapshots in systemd-boot License: MIT URL: https://codeberg.org/chf/%{name} Source0: https://codeberg.org/chf/%{name}/archive/v%{version}.tar.gz BuildRequires: cargo BuildRequires: systemd-rpm-macros Requires: snapper Requires: systemd-boot-unsigned %description Generates Boot Loader Specification entries for snapper snapshots on the ESP, so systemd-boot can boot them, the systemd-boot counterpart of grub-btrfs. %prep %autosetup -n %{name} %build cargo build --release %install install -Dm755 target/release/%{name} %{buildroot}%{_bindir}/%{name} install -Dm644 dist/%{name}.service %{buildroot}%{_unitdir}/%{name}.service install -Dm644 dist/%{name}.path %{buildroot}%{_unitdir}/%{name}.path install -Dm755 dist/95-%{name}.install %{buildroot}%{_prefix}/lib/kernel/install.d/95-%{name}.install install -Dm644 dist/90-%{name}.conf %{buildroot}%{_prefix}/lib/dracut/dracut.conf.d/90-%{name}.conf install -Dm755 dist/dracut/module-setup.sh %{buildroot}%{_prefix}/lib/dracut/modules.d/90%{name}/module-setup.sh install -Dm755 dist/dracut/%{name}-overlay.sh %{buildroot}%{_prefix}/lib/dracut/modules.d/90%{name}/%{name}-overlay.sh install -Dm644 dist/%{name}.toml %{buildroot}%{_sysconfdir}/%{name}.toml %post %systemd_post %{name}.path %{name}.service %preun %systemd_preun %{name}.path %{name}.service if [ $1 -eq 0 ]; then %{_bindir}/%{name} clean >/dev/null 2>&1 || : fi %postun %systemd_postun %{name}.path %{name}.service %files %license LICENSE %doc docs/README.md %{_bindir}/%{name} %{_unitdir}/%{name}.service %{_unitdir}/%{name}.path %{_prefix}/lib/kernel/install.d/95-%{name}.install %{_prefix}/lib/dracut/dracut.conf.d/90-%{name}.conf %{_prefix}/lib/dracut/modules.d/90%{name}/ %config(noreplace) %{_sysconfdir}/%{name}.toml