soundtouch/soundtouch.spec
2019-11-19 11:57:15 +08:00

66 lines
2.0 KiB
RPMSpec

Name: soundtouch
Version: 2.1.0
Release: 2
Summary: LGPL-licensed open-source audio processing library for changing Tempo, Pitch and Playback Rates
License: LGPLv2+
URL: http://www.surina.net/soundtouch/
Source0: https://gitlab.com/soundtouch/soundtouch/-/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: gcc-c++ autoconf automake libtool
%description
SoundTouch is an open-source audio processing library for changing the Tempo, Pitch and
Playback Rates of audio streams or audio files. The library additionally supports estimating
stable beats-per-minute rates for audio tracks.
%package devel
Summary: Development files for the soundtouch library
Requires: %{name} = %{version}-%{release} pkgconfig
%description devel
This package contain the libraries and header files that are needed for doing soundtouch applications.
%prep
%autosetup -p1
sed -i 's|-O3||' source/SoundTouch/Makefile.*
sed -i 's|-O3||' source/SoundStretch/Makefile.*
autoreconf -iv
%define ltversion %(echo %{version} | tr '.' ':')
sed -i 's/-rpath $(libdir)/-rpath $(libdir) -version-number %{ltversion}/' source/SoundTouch/Makefile.in
sed -i 's|\r||g' README.html source/SoundTouch/RateTransposer.cpp
%build
%configure --disable-dependency-tracking --enable-shared
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%make_build V=1
%install
%make_install
%delete_la
ln -s soundtouch.pc %{buildroot}%{_libdir}/pkgconfig/libSoundTouch.pc
ln -s soundtouch.pc %{buildroot}%{_libdir}/pkgconfig/soundtouch-1.0.pc
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%license COPYING.TXT
%doc README.html
%{_bindir}/soundstretch
%{_libdir}/lib*.so.*
%files devel
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/%{name}
%{_datadir}/aclocal/%{name}.m4
%exclude %{_docdir}/%{name}
%changelog
* Thu Oct 17 2019 Lijin Yang <yanglijin@huawei.com> - 2.1.0-2
- Package init