## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 5; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global debug_package %{nil} %global __brp_strip_static_archive %{nil} Name: libigvm Version: 0.3.4 Release: %autorelease Summary: IGVM library License: MIT URL: https://github.com/microsoft/igvm Source: https://github.com/microsoft/igvm/archive/refs/tags/igvm-v%{version}.tar.gz BuildRequires: cargo-rpm-macros >= 24 BuildRequires: CUnit-devel cbindgen gettext-envsubst make gcc # All these patches are already available upstream, can be safely dropped _after_ version 0.3.4 # They bump dependencies version and fix an issue in the makefile Patch0: 0001-zerocopy-update-from-0.7.x-to-0.8.x.-77.patch Patch1: 0002-Add-test-for-SnpVpContext-82.patch Patch2: 0003-repo-update-dependencies-83.patch Patch3: 0004-igvm_c-Makefile-Fix-dependency-path-84.patch # Run test just when necessary Patch4: 0005-Remove-test-from-all-target.patch # Add extra parameters to cargo Patch5: 0006-Add-EXTRA_PARAMS-to-cargo-build.patch %description Igvm is an implementation of a parser for the Independent Guest Virtual Machine %package devel Summary: IGVM library header files %description devel Contains header files for developing applications that use the %{name} %package static Summary: IGVM static library files %description static The %{name}-static package contains libraries files for developing applications that use %{name} %prep %autosetup -n igvm-igvm-v%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_license_summary %{cargo_license} > LICENSE.dependencies # Makefile output folder is `target_c/debug` # while cargo builds in `target_c/rpm` # Create a softlink to fix it mkdir -p target_c/rpm ln -s rpm target_c/debug export RUSTC_BOOTSTRAP=1 export EXTRA_PARAMS="--profile rpm -Z avoid-dev-deps" %make_build -C igvm_c %check export RUSTC_BOOTSTRAP=1 export EXTRA_PARAMS="--profile rpm -Z avoid-dev-deps" %make_build -C igvm_c test %install %make_install -C igvm_c PREFIX=/usr DESTDIR=%{buildroot} %files devel %{_includedir}/igvm %files static %license LICENSE %license LICENSE.dependencies %doc README.md %{_libdir}/libigvm.a %{_libdir}/pkgconfig/igvm.pc %{_bindir}/dump_igvm %changelog * Thu Apr 10 2025 Luigi Leonardi - 0.3.4-1 - Apply three upstream patches to bump crates version * Mon Apr 7 2025 Luigi Leonardi - 0.3.4 - First import of igvm library