Name: cuba Version: 4.2.2 Release: 1%{?dist} License: LGPL v3+ Group: Libraries Summary: Four independent routines for multidimensional numerical integration Source0: http://www.feynarts.de/cuba/Cuba-%{version}.tar.gz URL: http://www.feynarts.de/cuba/ BuildRequires: gcc, make, glibc-devel %description The Cuba library offers a choice of four independent routines for multidimensional numerical integration: Vegas, Suave, Divonne, and Cuhre. %package devel Summary: Header files and libraries for cuba development Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This package contains the header files and the shared library symlinks needed to develop programs that use the Cuba library. %prep %setup -q -n Cuba-%{version} %build # 1. Add -fPIC so object files can be used in a shared library export CFLAGS="%{optflags} -std=gnu11 -fPIC" %configure # 2. Build the static library. # Disable parallel flags to avoid race conditions in Cuba's Makefile. %{__make} # 3. Handle Shared Library Creation mkdir shared_link_dir cd shared_link_dir ar x ../libcuba.a gcc %{optflags} -shared -Wl,-soname,libcuba.so.4 -o ../libcuba.so.%{version} *.o -lm cd .. %install %{__rm} -rf $RPM_BUILD_ROOT # Perform standard install %{__make} install \ DESTDIR=$RPM_BUILD_ROOT # Create lib directory and install shared library components install -d $RPM_BUILD_ROOT%{_libdir} install -m 755 libcuba.so.%{version} $RPM_BUILD_ROOT%{_libdir}/ ln -s libcuba.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libcuba.so.4 ln -s libcuba.so.4 $RPM_BUILD_ROOT%{_libdir}/libcuba.so # Ensure the header is installed install -d $RPM_BUILD_ROOT%{_includedir} install -m 644 cuba.h $RPM_BUILD_ROOT%{_includedir}/ %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %clean %{__rm} -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{_libdir}/libcuba.so.4 %{_libdir}/libcuba.so.%{version} # Include the PDF documentation found by the build check %{_datadir}/cuba.pdf %files devel %defattr(-,root,root,-) %{_libdir}/libcuba.a %{_libdir}/libcuba.so %{_includedir}/cuba.h %changelog * Mon Feb 02 2026 AI Assistant - 4.2.2-1 - Added /usr/share/cuba.pdf to files list to fix unpackaged file error - Added shared library (.so) support - Disabled parallel make to prevent archive corruption