# debuginfo not supported for static libraries, RB #209316 %global debug_package %{nil} %global version 1.3.0 %global srcname kiss_fft %global srcver %(echo %{version} | sed -e 's/\\.//g') Name: kiss-fft Version: %{version} Release: 1%{?dist} Summary: Fast Fourier Transform library License: BSD URL: https://sourceforge.net/projects/kissfft Source0: http://downloads.sourceforge.net/kissfft/%{srcname}%{srcver}.zip # build static library Source1: Makefile.libs # use the libraries in tests (not intended for upstream) Patch1: %{name}-library.patch # https://sourceforge.net/p/kissfft/code/ci/fbe1bb0bc7b94ec252842b8b7e3f3347ec75d92f/tree/kissfft.hh?diff=effd3ec61a1c4a2141fb04ab9a76d78be0459cce Patch2: %{name}-header.patch BuildRequires: fftw-devel BuildRequires: libtool # for tests BuildRequires: numpy BuildRequires: python2 %if 0%{?rhel} && 0%{?rhel} <= 6 BuildRequires: procps %else BuildRequires: procps-ng %endif %description A Fast Fourier Transform based up on the principle, "Keep It Simple, Stupid". Kiss FFT is a very small, reasonably efficient, mixed radix FFT library that can use either fixed or floating point data types. %package devel Summary: Fast Fourier Transform library Provides: %{name}-static = %{version}-%{release} %description devel A Fast Fourier Transform based up on the principle, "Keep It Simple, Stupid". Kiss FFT is a very small, reasonably efficient, mixed radix FFT library that can use either fixed or floating point data types. Header files and static library are provided. %prep %setup -q -n %{srcname}%{srcver} %patch1 -p1 %patch2 -p1 %build for type in float double int16 int32; do mkdir build_${type} pushd build_${type} CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" \ DATATYPE=${type} \ make %{?_smp_mflags} -f %{SOURCE1} libdir=%{_libdir} srcdir=.. popd done %install for type in float double int16 int32; do pushd build_${type} CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" \ DATATYPE=${type} \ DESTDIR=%{buildroot} \ make %{?_smpflags} -f %{SOURCE1} libdir=%{_libdir} srcdir=.. install popd done %check while read type suffix; do DATATYPE=${type} \ SUFFIX=${suffix} \ make -C tools clean all CFLAGS="%{optflags}" CFLAGADD="%{optflags}" \ DATATYPE=${type} \ SUFFIX=${suffix} \ make -C test clean test done << EOF float _float double _double int16_t _int16 int32_t _int32 EOF %files devel %{!?_licensedir:%global license %doc} %license COPYING %doc CHANGELOG README %{_includedir}/kissfft/ %{_libdir}/libkiss_fft_*.a %{_libdir}/libkiss_fftnd_*.a %{_libdir}/libkiss_fftndr_*.a %{_libdir}/libkiss_fftr_*.a %{_libdir}/libkiss_kfc_*.a %changelog * Sun Dec 27 2015 František Dvořák - 1.3.0-1 - Initial package