# Generated by rust2rpm 20 %bcond check 0 %bcond bin 1 %global commit dd5a264de35becd7fb8c10afecef9f47e64fe706 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global date 20230131 %if %{with bin} %global _build_id_links none %undefine _debugsource_packages %bcond snapshot 0 %else %bcond snapshot 0 %endif %if %{with snapshot} %global dist .%{date}git%{shortcommit}%{?dist} %endif %global crate u4pak Name: rust-%{crate} Version: 1.4.0 Release: 2%{?dist} Summary: Unreal Engine 4 .pak archive tool License: MPL-2.0 URL: https://github.com/panzi/rust-%{crate} %if %{with bin} Source0: %{url}/releases/download/v1.4.0/release-v1.4.0.zip %else %if %{with snapshot} Source0: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz %else Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz %endif %endif Patch0: 0001-Disable-fuse-support.patch %if %{with bin} ExclusiveArch: x86_64 %else ExclusiveArch: %{rust_arches} %endif %if %{without bin} BuildRequires: rust-packaging %endif %global _description %{expand: %{crate} unpacks, packs, lists and tests Unreal Engine 4 .pak archives.} %description %{_description} %package -n %{crate} Summary: %{summary} License: MPL-2.0 %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE.txt %if %{with bin} %doc README.html %doc Help.txt %else %doc README.adoc %endif %{_bindir}/%{crate} %prep %if %{with bin} %autosetup -c -N %else %autosetup %{?with_snapshot:-n %{name}-%{commit}} -p1 %endif %if %{without bin} %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %endif %build %if %{without bin} %cargo_build %endif %install %if %{with bin} mkdir -p %{buildroot}%{_bindir} install -pm0755 x86_64-unknown-linux-gnu/%{crate} %{buildroot}%{_bindir}/%{crate} %else %cargo_install # Unneeded rm -rf %{buildroot}%{cargo_registry} %if %{with check} %check %cargo_test %endif %endif %changelog * Sat Mar 21 2026 Phantom X - 1.4.0-2 - bin support * Wed Mar 15 2023 Phantom X - 1.4.0-1 - 1.4.0 * Wed Feb 23 2022 Phantom X - 1.3.0-1 - Initial spec