Compare commits

..

4 commits

Author SHA1 Message Date
Fedora Release Engineering
f095ff7b07 Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 08:22:11 +00:00
Benjamin A. Beasley
d452e29e72 Use the cmake declarative buildsystem 2026-05-19 22:36:45 +01:00
Benjamin A. Beasley
2446c06629 Use various long options 2026-05-19 22:35:00 +01:00
Benjamin A. Beasley
c41f12d53a Use long pyproject options 2026-05-08 21:32:18 +01:00

View file

@ -6,7 +6,7 @@
%dnl %global max_types 16
%dnl %global max_types 5
%bcond tests 1
%bcond ctest 1
Name: variant-lite
Version: 3.0.0
@ -17,15 +17,19 @@ License: BSL-1.0
URL: https://github.com/martinmoene/variant-lite
Source: %{url}/archive/v%{version}/variant-lite-%{version}.tar.gz
BuildSystem: cmake
BuildOption(conf): %{shrink:
-DVARIANT_LITE_OPT_BUILD_TESTS:BOOL=%{?with_ctest:ON}%{?!with_ctest:OFF}
}
BuildRequires: gcc-c++
BuildRequires: cmake
%if %{with regenerate}
BuildRequires: python3-devel
BuildRequires: %{py3_dist jinja2}
%endif
%if %{with tests}
%if %{with ctest}
# Required for testing; bundled upstream, unbundled in %%prep.
# Header-only library (-static required by policy)
BuildRequires: lest-devel lest-static
@ -52,44 +56,26 @@ The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%autosetup -n variant-lite-%{version} -p1
%prep -a
# Unbundle lest
rm -rvf test/lest
ln -s /usr/include/lest test/lest
rm --recursive --verbose test/lest
ln --symbolic /usr/include/lest test/lest
%if %{with regenerate}
%generate_buildrequires
%pyproject_buildrequires -N
%generate_buildrequires -a
%pyproject_buildrequires --no-use-build-system
%endif
%conf
%cmake %{?!with_tests:-DVARIANT_LITE_OPT_BUILD_TESTS:BOOL=OFF}
%build
%if %{with regenerate}
%build -p
%{python3} script/generate_header.py \
%{?max_types:--max-types %{max_types}} \
%{?max_args:--max-args %{max_args}} \
--verbose
%endif
%cmake_build
%install
%cmake_install
%check
%if %{with tests}
%ctest
%endif
%files devel
%license LICENSE.txt