File soxr.spec of Package soxr
#
# spec file for package soxr
#
# 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/
#
%define soname 0
%define lsr_soname 0
Name: soxr
Summary: SoX Resampler library
License: LGPL-2.1
Group: Productivity/Multimedia/Sound/Editors and Convertors
Version: 0.1.1
Release: 0
Url: http://soxr.sourceforge.net/
Source0: http://downloads.sourceforge.net/soxr/soxr-%{version}-Source.tar.xz
BuildRequires: cmake
BuildRequires: pkg-config
%description
The SoX Resampler library `libsoxr' performs one-dimensional sample-rate
conversion—it may be used, for example, to resample PCM-encoded audio.
%package -n libsoxr%{soname}
Summary: Development files for soxr
Group: System/Libraries
%description -n libsoxr%{soname}
The SoX Resampler library `libsoxr' performs one-dimensional sample-rate
conversion—it may be used, for example, to resample PCM-encoded audio.
%package -n libsoxr-lsr%{lsr_soname}
Summary: libsamplerate compatibility layer
Group: System/Libraries
%description -n libsoxr-lsr%{lsr_soname}
libsamplerate compatibility layer on top of libsoxr.
%package -n libsoxr-devel
Summary: Development files for soxr
Group: Development/Libraries/C and C++
Requires: libsoxr%{soname} = %{version}
%description -n libsoxr-devel
Development files for soxr.
%package -n libsoxr-lsr-devel
Summary: Development files for soxr-lsr
Group: Development/Libraries/C and C++
Requires: libsoxr-lsr%{lsr_soname} = %{version}
%description -n libsoxr-lsr-devel
Development files for soxr-lsr.
%prep
%setup -q -n soxr-%{version}-Source
%build
%cmake -DDOC_INSTALL_DIR=%{_defaultdocdir}/libsoxr%{soname}/ \
-DCMAKE_SKIP_RPATH=OFF
make %{?_smp_mflags}
%install
%cmake_install
%check
cd build
make test
%post -n libsoxr%{soname} -p /sbin/ldconfig
%postun -n libsoxr%{soname} -p /sbin/ldconfig
%post -n libsoxr-lsr%{lsr_soname} -p /sbin/ldconfig
%postun -n libsoxr-lsr%{lsr_soname} -p /sbin/ldconfig
%files -n libsoxr%{soname}
%defattr(-,root,root,-)
%{_libdir}/libsoxr.so.%{soname}*
%{_defaultdocdir}/libsoxr%{soname}/
%exclude %{_defaultdocdir}/libsoxr%{soname}/examples/
%files -n libsoxr-lsr%{lsr_soname}
%defattr(-,root,root,-)
%{_libdir}/libsoxr-lsr.so.%{soname}*
%files -n libsoxr-devel
%defattr(-,root,root,-)
%{_libdir}/libsoxr.so
%{_libdir}/pkgconfig/soxr.pc
%{_includedir}/soxr.h
%{_defaultdocdir}/libsoxr%{soname}/examples/
%files -n libsoxr-lsr-devel
%defattr(-,root,root,-)
%{_libdir}/libsoxr-lsr.so
%{_libdir}/pkgconfig/soxr-lsr.pc
%{_includedir}/soxr-lsr.h
%changelog