diff --git a/rpm-ostree.spec b/rpm-ostree.spec index 0b59967..e07641f 100644 --- a/rpm-ostree.spec +++ b/rpm-ostree.spec @@ -8,15 +8,15 @@ Release: 2%{?dist} License: LGPLv2+ URL: https://github.com/coreos/rpm-ostree # This tarball is generated via "cd packaging && make -f Makefile.dist-packaging dist-snapshot" -# in the upstream git. If rust is enabled, it contains vendored sources. +# in the upstream git. It also contains vendored Rust sources. Source0: https://github.com/coreos/rpm-ostree/releases/download/v%{version}/rpm-ostree-%{version}.tar.xz ExclusiveArch: %{rust_arches} -BuildRequires: make %if 0%{?rhel} && !0%{?eln} BuildRequires: rust-toolset %else +BuildRequires: rust-packaging BuildRequires: cargo BuildRequires: rust %endif @@ -30,6 +30,10 @@ BuildRequires: rust %bcond_without zchunk %endif +%if 0%{?fedora} >= 34 +%define sqlite_rpmdb_default "--enable-sqlite-rpmdb-default" +%endif + # For the autofiles bits below BuildRequires: /usr/bin/python3 # We always run autogen.sh @@ -37,12 +41,11 @@ BuildRequires: autoconf automake libtool git # For docs BuildRequires: chrpath BuildRequires: gtk-doc -BuildRequires: gperf BuildRequires: gnome-common BuildRequires: /usr/bin/g-ir-scanner # Core requirements # One way to check this: `objdump -p /path/to/rpm-ostree | grep LIBOSTREE` and pick the highest (though that might miss e.g. new struct members) -BuildRequires: pkgconfig(ostree-1) >= 2019.2 +BuildRequires: pkgconfig(ostree-1) >= 2020.7 BuildRequires: pkgconfig(polkit-gobject-1) BuildRequires: pkgconfig(json-glib-1.0) BuildRequires: pkgconfig(rpm) @@ -130,8 +133,11 @@ The %{name}-devel package includes the header files for %{name}-libs. %define _lto_cflags %{nil} env NOCONFIGURE=1 ./autogen.sh +# Since we're hybrid C++/Rust we need to propagate this manually; +# the %%configure macro today assumes (reasonably) that one is building +# C/C++ and sets C{,XX}FLAGS export RUSTFLAGS="%{build_rustflags}" -%configure --disable-silent-rules --enable-gtk-doc +%configure --disable-silent-rules --enable-gtk-doc %{?sqlite_rpmdb_default} %make_build %install