%define _debugsource_template %{nil} %define debug_package %{nil} Name: modpdb Version: 0.1.3 Release: 3%{?dist} Summary: Store every unique kernel module ever probed on the system License: GPL-3.0-or-later URL: https://github.com/sachesi/modpdb Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz %{!?_userunitdir:%global _userunitdir %{_prefix}/lib/systemd/user} BuildRequires: cargo BuildRequires: rust BuildRequires: gcc BuildRequires: systemd-rpm-macros Requires: kmod %description modpdb logs every unique kernel module ever probed on the system to a plain-text database. The database can be handed to "make localmodconfig" so a custom kernel build includes only the modules the system has actually needed, cutting build time and footprint. A systemd user timer keeps the database updated automatically. %prep %autosetup -n %{name}-%{version} %build export CARGO_HOME="$PWD/.cargo-home" cargo build --release --locked %install install -Dpm 0755 target/release/%{name} %{buildroot}%{_bindir}/%{name} # Man page install -Dpm 0644 doc/%{name}.8 %{buildroot}%{_mandir}/man8/%{name}.8 # Skeleton config (the path is hard-coded in the binary, see config.rs SKEL) install -Dpm 0644 packaging/usr/share/%{name}/%{name}.skel \ %{buildroot}%{_datadir}/%{name}/%{name}.skel # Shell completions (shipped pre-generated in the source tree) install -Dpm 0644 packaging/usr/share/bash-completion/completions/%{name} \ %{buildroot}%{_datadir}/bash-completion/completions/%{name} install -Dpm 0644 packaging/usr/share/fish/vendor_completions.d/%{name}.fish \ %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish install -Dpm 0644 packaging/usr/share/zsh/site-functions/_%{name} \ %{buildroot}%{_datadir}/zsh/site-functions/_%{name} # systemd user units (timer drives the periodic store) install -Dpm 0644 packaging/usr/lib/systemd/user/%{name}.service \ %{buildroot}%{_userunitdir}/%{name}.service install -Dpm 0644 packaging/usr/lib/systemd/user/%{name}.timer \ %{buildroot}%{_userunitdir}/%{name}.timer %check %{buildroot}%{_bindir}/%{name} --version %post %systemd_user_post %{name}.timer %preun %systemd_user_preun %{name}.timer %postun %systemd_user_postun_with_restart %{name}.timer %files %license LICENSE %doc README.md %{_bindir}/%{name} %{_mandir}/man8/%{name}.8* %dir %{_datadir}/%{name} %{_datadir}/%{name}/%{name}.skel %{_datadir}/bash-completion/completions/%{name} %dir %{_datadir}/fish/ %dir %{_datadir}/fish/vendor_completions.d/ %{_datadir}/fish/vendor_completions.d/%{name}.fish %dir %{_datadir}/zsh/ %dir %{_datadir}/zsh/site-functions/ %{_datadir}/zsh/site-functions/_%{name} %{_userunitdir}/%{name}.service %{_userunitdir}/%{name}.timer %changelog * Wed Sep 09 2026 sachesi - 0.1.3-3 - Rebuild. * Wed Sep 09 2026 sachesi - 0.1.3-2 - Rebuild. * Tue Jun 02 2026 sachesi - 0.1.3-1 - Initial package for Copr.