File libspandsp2.spec of Package libspandsp2
%define realname spandsp
%define realver 0.0.6
%define snapdate 20180108
%define extraver dev%{snapdate}
%define srcext tar.gz
# turn off the generation of debuginfo rpm (RH9) ??
%global debug_package %{nil}
# Common info
Name: libspandsp2
Version: %{realver}%{?extraver:~%{extraver}}
Release: wiz%{?extraver:0.}1
License: LGPL-2.1
Group: System/Libraries
URL: http://www.soft-switch.org/
Summary: A DSP library for Telephony and SoftFAX
# Install-time parameters
Provides: spandsp = %{version}-%{release}
Provides: libspandsp = %{version}-%{release}
# Build-time parameters
BuildRequires: pkg-config
BuildRequires: libsndfile-devel
BuildRequires: libpcap-devel
BuildRequires: libxml2-devel
BuildRequires: libtiff-devel libjpeg-devel
%if 0%{?suse_version}
BuildRequires: fftw3-devel
%else
BuildRequires: fftw-devel
%endif
BuildRoot: %{_tmppath}/%{name}-root
Source: http://www.soft-switch.org/downloads/spandsp/%{?extraver:snapshots/}%{realname}-%{snapdate}.%{srcext}
%description
SpanDSP is a library of DSP functions for telephony, in the 8000 sample
per second world of E1s, T1s, and higher order PCM channels. It
contains low level functions, such as basic filters. It also contains
higher level functions, such as cadenced supervisory tone detection,
and a complete software FAX machine.
%package -n %{realname}-devel
Group: Development/Languages/C and C++
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
Requires: libtiff-devel
Provides: %{name}-devel = %{version}-%{release}
Provides: libspandsp-devel = %{version}-%{release}
%description -n %{realname}-devel
Development files for %{name}
# Preparation step (unpackung and patching if necessary)
%prep
%setup -q -n %{realname}-%{realver}
%build
_CFLAGS='%{optflags} %{?gcc_lto}'
_LDFLAGS='-Wl,--as-needed -Wl,--strip-all -Wl,--no-undefined -Wl,-z,now -Wl,-z,relro %{?gcc_lto}'
%configure \
--disable-static \
CFLAGS="$_CFLAGS" \
LDFLAGS="$_LDFLAGS"
%{__make} %{?_smp_mflags}
%install
%{__make} install DESTDIR=%{buildroot}
%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%files
%defattr(-,root,root)
%doc AUTHORS COPYING DueDiligence NEWS README
%{_libdir}/libspandsp.so.*
# Development stuff
%files -n %{realname}-devel
%defattr(-,root,root)
%{_libdir}/pkgconfig/spandsp.pc
%dir %{_includedir}/spandsp/private/
%dir %{_includedir}/spandsp/
%{_includedir}/spandsp/private/*.h
%{_includedir}/spandsp/*.h
%{_includedir}/spandsp.h
%{_libdir}/libspandsp.so
%exclude %{_libdir}/*.la
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%changelog