## 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:		intel-qpl
Version:	1.6.0
Release:	%autorelease
Summary:	Intel Query Processing Library

License:	MIT
URL:		https://github.com/intel/qpl
Source0:	%{url}/archive/v%{version}/%{name}-%{version}.tar.gz

Patch0:		qpl-fedora.patch
Patch1:		qpl-werror.patch

BuildRequires:	cmake >= 3.1
BuildRequires:	gcc-c++
BuildRequires:	gtest-devel
BuildRequires:	libuuid-devel
BuildRequires:	libtsan
BuildRequires:	nasm

ExclusiveArch:	x86_64

%description
The Intel Query Processing Library (Intel QPL) is an open-source library to 
provide high-performance query processing operations on Intel CPUs. Intel QPL
is aimed to support capabilities of the new Intel In-Memory Analytics 
Accelerator (Intel IAA) available on Next Generation Intel Xeon Scalable 
processors, codenamed Sapphire Rapids processor, such as very high throughput
compression and decompression combined with primitive analytic functions, as 
well as to provide highly-optimized SW fallback on other Intel CPUs.
Intel QPL primarily targets applications such as big-data and in-memory 
analytic databases.
	
%package devel
Summary:	Development files for %{name}
Requires:	%{name}%{?_isa} = %{version}-%{release}
Requires:	accel-config-libs

%description devel
The %{name}-devel package contains libraries and header files for
applications that use %{name}.

%prep
%autosetup -p1 -n qpl-%{version}

%build
%cmake \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DDYNAMIC_LOADING_LIBACCEL_CONFIG=ON \
		-DQPL_LIBRARY_TYPE=SHARED \
		-DSANITIZE_THREADS=ON \
		-DQPL_BUILD_TESTS=ON \
		-DQPL_BUILD_EXAMPLES=OFF
%cmake_build

%install
%cmake_install

%check
%__cmake_builddir/tools/tests/functional/tests --dataset=tools/testdata/ --gtest_filter=ta_unit*

%files
%license LICENSE
%doc README.md
%{_libdir}/libqpl.so.1
%{_libdir}/libqpl.so.%{version}

%files devel
%{_includedir}/qpl
%{_datadir}/QPL
%{_libdir}/libqpl.so
%{_libdir}/cmake/QPL
%{_libdir}/pkgconfig/qpl.pc

%changelog
## START: Generated by rpmautospec
* Fri Sep 06 2024 Ali Erdinc Koroglu <aekoroglu@linux.intel.com> - 1.6.0-1
- Update to 1.6.0

* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Sat Jul 06 2024 Ali Erdinc Koroglu <aekoroglu@linux.intel.com> - 1.5.0-1
- 1st release
## END: Generated by rpmautospec