# Generated by rust2rpm 28 %bcond check 1 # prevent library files from being installed %global cargo_install_lib 0 %global crate waj Name: rust-waj Version: 0.4.1 Release: 1%{?dist} Summary: Store a web site in a package License: MIT URL: https://crates.io/crates/waj Source: %{crates_source} Source: waj-0.4.1-vendor.tar.xz ExclusiveArch: %{rust_arches} BuildRequires: cargo-rpm-macros >= 26 %global _description %{expand: Store a web site in a package.} %description %{_description} %package -n %{crate} Summary: %{summary} # FIXME: paste output of %%cargo_license_summary here License: # FIXME # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE-MIT %license LICENSE.dependencies %license cargo-vendor.txt %{_bindir}/waj %{_datadir}/bash-completion/completions/waj %{_datadir}/zsh/site-functions/_waj %{_datadir}/fish/vendor_completions.d/waj.fish %{_mandir}/man1/waj.1* %{_mandir}/man1/waj-create.1* %{_mandir}/man1/waj-list.1* %{_mandir}/man1/waj-serve.1* %{_datadir}/mime/packages/waj.xml %prep %autosetup -n %{crate}-%{version} -p1 -a1 %cargo_prep -v vendor %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %{cargo_vendor_manifest} %install %cargo_install rm %{buildroot}%{_bindir}/auto_serve # Generate and install shell completions install -dm755 %{buildroot}%{_datadir}/bash-completion/completions %{buildroot}%{_bindir}/waj --generate-complete=bash > %{buildroot}%{_datadir}/bash-completion/completions/waj install -dm755 %{buildroot}%{_datadir}/zsh/site-functions %{buildroot}%{_bindir}/waj --generate-complete=zsh > %{buildroot}%{_datadir}/zsh/site-functions/_waj install -dm755 %{buildroot}%{_datadir}/fish/vendor_completions.d %{buildroot}%{_bindir}/waj --generate-complete=fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/waj.fish # Generate and install man pages install -dm755 %{buildroot}%{_mandir}/man1 %{buildroot}%{_bindir}/waj --generate-man-page > %{buildroot}%{_mandir}/man1/waj.1 %{buildroot}%{_bindir}/waj --generate-man-page create > %{buildroot}%{_mandir}/man1/waj-create.1 %{buildroot}%{_bindir}/waj --generate-man-page list > %{buildroot}%{_mandir}/man1/waj-list.1 %{buildroot}%{_bindir}/waj --generate-man-page serve > %{buildroot}%{_mandir}/man1/waj-serve.1 # Install MIME type specification install -Dm644 misc/mime_type.xml %{buildroot}%{_datadir}/mime/packages/waj.xml %if %{with check} %check %cargo_test %endif %post # Update MIME database if [ $1 -eq 1 ]; then /usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || : fi %postun # Update MIME database on removal if [ $1 -eq 0 ]; then /usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || : fi %changelog * Wed Dec 03 2025 Matthieu Gautier - 0.4.1-1 - Initial package