977d939
Name:           soundtouch
977d939
Version:        1.3.1
32bbcaf
Release:        7%{?dist}
977d939
Summary:        Audio Processing library for changing Tempo, Pitch and Playback Rates
977d939
License:        LGPL
977d939
Group:          System Environment/Libraries
977d939
URL:            http://sky.prohosting.com/oparviai/soundtouch/
977d939
Source0:        %{name}-%{version}.tar.gz
977d939
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
977d939
BuildRequires:  gcc-c++ libtool
977d939
977d939
%description
977d939
SoundTouch is a LGPL-licensed open-source audio processing library for
977d939
changing the Tempo, Pitch and Playback Rates of audio streams or
977d939
files. The SoundTouch library is suited for application developers
977d939
writing sound processing tools that require tempo/pitch control
977d939
functionality, or just for playing around with the sound effects.
977d939
977d939
The SoundTouch library source kit includes an example utility
977d939
SoundStretch which allows processing .wav audio files from a
977d939
command-line interface.
977d939
977d939
977d939
%package devel
977d939
Summary:  Libraries, includes, etc to develop soundtouch applications
977d939
Group:    Development/Libraries
977d939
Requires: soundtouch = %{version}-%{release}
977d939
Requires: pkgconfig
977d939
977d939
%description devel
977d939
Libraries, include files, etc you can use to develop soundtouch applications.
977d939
977d939
977d939
%prep
977d939
%setup -q
977d939
# set correct version for .so build
977d939
%define ltversion %(echo %{version} | tr '.' ':')
977d939
sed -i 's/-rpath $(libdir)/-rpath $(libdir) -version-number %{ltversion}/' \
977d939
  source/SoundTouch/Makefile.in
c7d963e
# force use of our CFLAGS
405eab7
%ifarch %{ix86}
405eab7
sed -i 's|-O3 -msse|$(CFLAGS) -msse|' source/SoundTouch/Makefile.*
405eab7
%else
c7d963e
sed -i 's|-O3 -msse|$(CFLAGS)|' source/SoundTouch/Makefile.*
405eab7
%endif
c7d963e
sed -i 's|-O3|$(CFLAGS)|' source/example/*/Makefile.*
32bbcaf
# fix compile with automake-1.10
32bbcaf
for i in install-sh depcomp missing; do
32bbcaf
  ln -f -s /usr/share/automake-1.10/$i config/$i
32bbcaf
done
977d939
# cleanup a bit
32bbcaf
chmod -x README.html source/SoundTouch/RateTransposer.cpp
32bbcaf
sed -i 's|\r||g' README.html COPYING.TXT source/SoundTouch/RateTransposer.cpp
977d939
977d939
977d939
%build
977d939
%configure --disable-dependency-tracking --disable-static --enable-shared
977d939
# Don't use rpath!   
977d939
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
977d939
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
977d939
make %{?_smp_mflags}
977d939
977d939
977d939
%install
977d939
rm -rf $RPM_BUILD_ROOT
977d939
make install DESTDIR=$RPM_BUILD_ROOT
977d939
rm $RPM_BUILD_ROOT%{_libdir}/*.la
977d939
977d939
# remove redundant installed docs
977d939
rm -rf $RPM_BUILD_ROOT%{_prefix}/doc/%{name}
977d939
977d939
# some soundtouch using packages expect the pkgconfig to be called
977d939
# libSoundTouch instead of soundtouch-1.0, probably it used to be called
977d939
# libSoundTouch in the past, so lets provide a compat symlink for these:
977d939
ln -s soundtouch-1.0.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libSoundTouch.pc
977d939
977d939
# soundtouch installs an autoheader generated header file which could very
977d939
# well conflict with other autoheader generated header files, so we override
977d939
# this with our own version which contains only the bare minimum:
977d939
echo '#define FLOAT_SAMPLES 1' \
977d939
  > $RPM_BUILD_ROOT%{_includedir}/soundtouch/soundtouch_config.h
977d939
977d939
977d939
%clean
977d939
rm -rf $RPM_BUILD_ROOT
977d939
977d939
977d939
%post -p /sbin/ldconfig
977d939
977d939
%postun -p /sbin/ldconfig 
977d939
977d939
977d939
%files
977d939
%defattr(-,root,root,-)
977d939
%doc COPYING.TXT README.html
977d939
%{_bindir}/soundstretch
977d939
%{_libdir}/lib*.so.*
977d939
977d939
%files devel
977d939
%defattr(-,root,root,-)
977d939
%{_libdir}/lib*.so
977d939
%{_libdir}/pkgconfig/*.pc
977d939
%{_includedir}/%{name}
977d939
%{_datadir}/aclocal/%{name}.m4
977d939
977d939
977d939
%changelog
32bbcaf
* Mon Feb 19 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.3.1-7
32bbcaf
- Fix building with automake-1.10
32bbcaf
49b7150
* Tue Aug 29 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.3.1-6
49b7150
- FE6 Rebuild
49b7150
c7d963e
* Wed Aug  2 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.3.1-5
c7d963e
- Patch makefiles so that our RPM_OPT_FLAGS get used instead of the custom
c7d963e
  upstream CFLAGS.
c7d963e
977d939
* Mon Jul 31 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.3.1-4
977d939
- Add Requires: pkgconfig to -devel subpackage
977d939
- Replace installed autoheader generated header file with our own version
977d939
  which contains only the nescesarry soundtouch specific defines, thus avoiding
977d939
  possible conflicts with other autoheader generated headers.
977d939
977d939
* Mon Jul 31 2006 Paul F. Johnson <paul@all-the-johnsons.co.uk> 1.3.1-3
977d939
- Add BR libtool
977d939
977d939
* Mon Jul 31 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.3.1-2
977d939
- Add BR: automake, because upstream uses symlinks to instead of copies of some
977d939
  needed automake files.
977d939
977d939
* Sat Jul 29 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.3.1-1
977d939
- New upstream version 1.3.1
977d939
- Minor specfile cleanups for livna submission.
977d939
- Give the .so a proper version instead of 0.0.0
977d939
- Don't use rpath in soundstretch binary
977d939
977d939
* Thu Aug 26 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 1.2.1-1
977d939
- initial build.