## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-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*}}%{?dist} ## END: Set by rpmautospec %global source_name libart %global source_summary Adaptive Radix Trees implemented in C %global source_version 0 %global source_release %autorelease -b 2 -s %{date}git%{shortcommit0} %global source_license BSD %global source_description %{expand: This library provides a C99 implementation of the Adaptive Radix Tree or ART. The ART operates similar to a traditional radix tree but avoids the wasted space of internal nodes by changing the node size. It makes use of 4 node sizes (4, 16, 48, 256), and can guarantee that the overhead is no more than 52 bytes per key, though in practice it is much lower. } %global forge_url0 https://github.com/armon/libart %global forge_commit0 301046804af165269e37da6725f5a4aec9ecc881 %global shortcommit0 %(c=%{forge_commit0}; echo ${c:0:7}) %global date 20210723 %bcond_without tests %global source_tags %{expand: BuildRequires: gcc-c++ BuildRequires: make %if %{with tests} BuildRequires: check-devel %endif } %forgeauto_init %forgeauto_pkg %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} %description devel This package contains development files for %{name}. %sourcelist %forgeauto_sources %patchlist %forgeauto_patches %prep %forgeauto_prep # remove bundled version of check rm -r deps %build %set_build_flags %make_build \ SHCFLAGS="%{optflags} -fPIC" \ SHLINKFLAGS="%{build_ldflags} -shared -Wl,-soname,libart.so.%{version}" %if %{with tests} # Based on the scons build config (which is broken in multiple ways) $CC $CFLAGS -Isrc -o test_runner tests/runner.c -Lsrc -L/usr/lib $LDFLAGS -lcheck -lart %endif %install # make install has several issues so do it by hand instead install -Dpm0755 src/libart.so %{buildroot}%{_libdir}/libart.so.%{version} ln -s libart.so.%{version} %{buildroot}%{_libdir}/libart.so install -Dpm0644 -t %{buildroot}%{_includedir} src/art.h %if %{with tests} %check LD_LIBRARY_PATH="%{buildroot}%{_libdir}" ./test_runner %endif %files %license LICENSE %doc README.md %{_libdir}/libart.so.* %files devel %{_includedir}/* %{_libdir}/libart.so %changelog * jeu. déc. 30 2021 Robert-André Mauchin %doc_init-1 - Convert to new forge macros * ven. juil. 23 2021 Davide Cavalca 0-1 - Initial package; Fixes RHBZ#1985036