spandsp/spandsp.spec

147 lines
4.0 KiB
RPMSpec
Raw Normal View History

#
# spec file for package spandsp
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: spandsp
%define lname libspandsp2
Summary: A DSP library for Telephony and SoftFAX
License: LGPL-2.1 and GPL-2.0
Group: Development/Libraries/C and C++
Version: 0.0.6pre21
Release: 0
Url: http://soft-switch.org/
#DL-URL: http://soft-switch.org/downloads/spandsp/
Source0: %name-%version.tar.xz
Source1: baselibs.conf
Patch1: spandsp-autoconf.diff
Patch2: spandsp-pkgconfig1.diff
Patch3: spandsp-path.diff
Patch4: spandsp-lrint.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: docbook-xsl-stylesheets
BuildRequires: doxygen
BuildRequires: libtiff-devel
BuildRequires: libtool
BuildRequires: libxslt
BuildRequires: pkgconfig
BuildRequires: xz
%define tests 0
%if 0%{?tests}
BuildRequires: fftw3-devel
BuildRequires: fltk-devel
BuildRequires: gcc-c++
BuildRequires: libpcap-devel
BuildRequires: pkgconfig(audiofile)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(sndfile)
BuildRequires: pkgconfig(xproto)
%endif
%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 devel
Summary: Development files for the SpanDSP library
License: LGPL-2.1
Group: Development/Libraries/C and C++
Requires: %lname = %{version}
Requires: glibc-devel
Requires: libtiff-devel
%description devel
This package contains files that are needed for developing or compiling
software that uses the spandsp library.
%package -n %lname
Summary: A DSP library for Telephony and SoftFAX
License: LGPL-2.1
Group: System/Libraries
%description -n %lname
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 doc
Summary: Documentation for the libspandsp API
License: LGPL-2.1 and GPL-2.0
Group: Documentation/HTML
%if 0%{?suse_version} >= 1130
BuildArch: noarch
%endif
%description doc
This package contains documentation for the libspandsp API.
%prep
%setup -qn %name-0.0.6
%patch -P 1 -P 2 -P 3 -P 4 -p1
%build
autoreconf -fiv
%configure \
%ifarch i586 i686
--enable-mmx \
%endif
%ifarch x86_64
--enable-sse --enable-sse2 \
%endif
--disable-static \
--enable-doc \
--with-pic
make %{?_smp_mflags}
%check
%if 0%{?tests}
make check %{?_smp_mflags}
%endif
%install
b="%buildroot";
make install DESTDIR="$b";
mkdir -p "$b/%_docdir/%name";
cp -a COPYING AUTHORS NEWS README DueDiligence \
ChangeLog doc/api/html "$b/%_docdir/%name";
find "$b" -name "*.la" -delete
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files devel
%defattr(-,root,root)
%_includedir/*
%_libdir/lib%name.so
%_libdir/pkgconfig/*.pc
%files -n %lname
%defattr(-,root,root)
%_libdir/lib%name.so.2*
%files doc
%defattr(-,root,root)
%doc %_docdir/%name
%changelog