## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 1;
    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

Name:           sparrow
Version:        0.2.0
Release:        %autorelease
Summary:        C++20 idiomatic APIs for the Apache Arrow Columnar Format
License:        Apache-2.0
URL:            https://github.com/man-group/sparrow
%global github  https://github.com/man-group/sparrow
Source:         %{github}/archive/%{version}/%{name}-%{version}.tar.gz

BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  doctest-devel

%global _description \
sparrow is an implementation of the Apache Arrow Columnar format in C++. It \
provides array structures with idiomatic APIs and convenient conversions from \
and to the C interface.

%description %_description

%package devel
Summary:        %{summary}
Provides:       %{name} = %{version}-%{release}
Provides:       %{name}-static = %{version}-%{release}

%description devel %_description

%prep
%autosetup -p1

%build
%cmake -DBUILD_TESTS=ON -DUSE_DATE_POLYFILL=OFF
%cmake_build

%install
%cmake_install

%check
%cmake_build --target test_sparrow_lib
%cmake_build --target run_tests

%files
%doc README.md
%license LICENSE
%{_libdir}/lib%{name}.so.*

%files devel
%{_includedir}/%{name}
%{_datadir}/cmake/%{name}
%{_libdir}/lib%{name}.so

%changelog
## START: Generated by rpmautospec
* Tue Nov 05 2024 sergesanspaille <sergesanspaille@free.fr> - 0.2.0-1
- Upstream release

* Tue Oct 15 2024 sergesanspaille <sergesanspaille@free.fr> - 0.0.4-1
- Initial push
## END: Generated by rpmautospec