%global build_types %{?build_types} float %global build_types %{?build_types} double %global build_types %{?build_types} int16_t %global build_types %{?build_types} int32_t %global build_types %{?build_types} simd Summary: A Fast Fourier Transform (FFT) library that tries to Keep it Simple, Stupid Name: kissfft License: BSD-3-Clause Version: 131.1.0 Release: 1%{?dist} URL: https://github.com/mborgerding/%{name} Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Group: Development/Libraries BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: libpng-devel BuildRequires: python3 # For tests BuildRequires: fftw-devel BuildRequires: python3-numpy %description KISS FFT - A mixed-radix Fast Fourier Transform based up on the principle, "Keep It Simple, Stupid." There are many great fft libraries already around. Kiss FFT is not trying to be better than any of them. It only attempts to be a reasonably efficient, moderately useful FFT that can use fixed or floating data types and can be incorporated into someone's C program in a few minutes with trivial licensing. %package devel Summary: A Fast Fourier Transform (FFT) library that tries to Keep it Simple, Stupid Requires: %{name}%{?_isa} = %{version}-%{release} %description devel KISS FFT - A mixed-radix Fast Fourier Transform based up on the principle, "Keep It Simple, Stupid." There are many great fft libraries already around. Kiss FFT is not trying to be better than any of them. It only attempts to be a reasonably efficient, moderately useful FFT that can use fixed or floating data types and can be incorporated into someone's C program in a few minutes with trivial licensing. %prep %autosetup %build %{set_build_flags} # Each of the libraries needs to be made separately for build_type in %{build_types}; do mkdir ${build_type} cd ${build_type} %cmake .. -DKISSFFT_DATATYPE=${build_type} -DKISSFFT_TEST=ON -DKISSFFT_TOOLS=ON %cmake_build cd .. done %install mkdir -p %{buildroot}%{_datadir}/%{name} cp -p README.md %{buildroot}%{_datadir}/%{name} cp -p README.simd %{buildroot}%{_datadir}/%{name} cp -p COPYING %{buildroot}%{_datadir}/%{name} cp -p TIPS %{buildroot}%{_datadir}/%{name} cp -p CHANGELOG %{buildroot}%{_datadir}/%{name} cp -p LICENSES/BSD-3-Clause BSD-3-Clause cp -p BSD-3-Clause %{buildroot}%{_datadir}/%{name} for build_type in %{build_types}; do cd ${build_type} %cmake_install cd .. done %check for build_type in %{build_types}; do cd ${build_type} %ctest cd .. done %files %dir %{_datadir}/%{name} %license %{_datadir}/%{name}/COPYING %license %{_datadir}/%{name}/BSD-3-Clause %doc %{_datadir}/%{name}/README.md %doc %{_datadir}/%{name}/README.simd %doc %{_datadir}/%{name}/TIPS %doc %{_datadir}/%{name}/CHANGELOG %{_libdir}/libkissfft-int16_t.so.* %{_libdir}/libkissfft-int32_t.so.* %{_libdir}/libkissfft-float.so.* %{_libdir}/libkissfft-double.so.* %{_libdir}/libkissfft-simd.so.* %{_bindir}/fastconv-int16_t %{_bindir}/fastconvr-int16_t %{_bindir}/fft-int16_t %{_bindir}/psdpng-int16_t %{_bindir}/fastconv-int32_t %{_bindir}/fastconvr-int32_t %{_bindir}/fft-int32_t %{_bindir}/psdpng-int32_t %{_bindir}/fastconv-float %{_bindir}/fastconvr-float %{_bindir}/fft-float %{_bindir}/psdpng-float %{_bindir}/fastconv-double %{_bindir}/fastconvr-double %{_bindir}/fft-double %{_bindir}/psdpng-double %{_bindir}/fastconv-simd %{_bindir}/fastconvr-simd %{_bindir}/fft-simd %files devel %dir %{_includedir}/kissfft %{_includedir}/kissfft/kiss_fft.h %{_includedir}/kissfft/kissfft.hh %{_includedir}/kissfft/kiss_fftndr.h %{_includedir}/kissfft/kiss_fftr.h %{_includedir}/kissfft/kiss_fftnd.h %{_libdir}/libkissfft-int16_t.so %{_libdir}/libkissfft-int32_t.so %{_libdir}/libkissfft-float.so %{_libdir}/libkissfft-double.so %{_libdir}/libkissfft-simd.so %dir %{_libdir}/cmake/%{name}/ %{_libdir}/cmake/%{name}/*.cmake %{_libdir}/pkgconfig/*.pc /usr/share/kissfft/BSD-3-Clause /usr/share/kissfft/CHANGELOG /usr/share/kissfft/COPYING /usr/share/kissfft/README.md /usr/share/kissfft/README.simd /usr/share/kissfft/TIPS %changelog * Thu Dec 01 2022 Benson Muite - 131.1.0-1 - Initial packaging