CRoaring/CRoaring.spec

100 lines
2.8 KiB
RPMSpec
Raw Normal View History

#
# spec file for package CRoaring
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define sonum 17
Name: CRoaring
Version: 4.2.1
Release: 0
Summary: Roaring bitmaps in C (and C++)
License: MIT
URL: https://github.com/RoaringBitmap/CRoaring
Source: https://github.com/RoaringBitmap/CRoaring/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: libcmocka-cmake
BuildRequires: libcmocka-devel
BuildRequires: pkgconfig
Requires: libroaring%{sonum}
Provides: roaring
%description
Portable Roaring bitmaps in C (and C++) with full support for your favorite
compiler (GNU GCC, LLVM's clang, Visual Studio, Apple Xcode, Intel oneAPI).
Included in the Awesome C list of open source C software.
%package -n libroaring%{sonum}
Summary: Roaring bitmaps in C (and C++)
Requires: CRoaring = %version
%description -n libroaring%{sonum}
Portable Roaring bitmaps in C (and C++) with full support for your favorite
compiler (GNU GCC, LLVM's clang, Visual Studio, Apple Xcode, Intel oneAPI).
Included in the Awesome C list of open source C software.
%package -n roaring-devel
Summary: Roaring bitmaps in C (and C++)
Requires: CRoaring = %version
%description -n roaring-devel
Portable Roaring bitmaps in C (and C++) with full support for your favorite
compiler (GNU GCC, LLVM's clang, Visual Studio, Apple Xcode, Intel oneAPI).
Included in the Awesome C list of open source C software.
%prep
%autosetup -p1
%build
%cmake \
-DFETCHCONTENT_FULLY_DISCONNECTED=ON \
-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS \
-DROARING_BUILD_LTO=ON \
-DROARING_USE_CPM=OFF \
%{nil}
%cmake_build
%install
%cmake_install
# remove unfunctional cmake includes
rm -r %{buildroot}%{_libdir}/cmake/roaring
%check
%ctest
%post -n libroaring%{sonum} -p /sbin/ldconfig
%postun -n libroaring%{sonum} -p /sbin/ldconfig
%files
%license LICENSE
%doc README.md
%files -n libroaring%{sonum}
%{_libdir}/libroaring.so.%{sonum}
%{_libdir}/libroaring.so.%{version}
%files -n roaring-devel
%{_includedir}/roaring
%{_libdir}/libroaring.so
#%{_libdir}/cmake/roaring
%{_libdir}/pkgconfig/roaring.pc
%changelog