a63d192
Name:           vamp-plugin-sdk
a659d35
Version:        2.1
a659d35
Release:        1%{?dist}
a63d192
Summary:        An API for audio analysis and feature extraction plugins
a63d192
a63d192
Group:          System Environment/Libraries
a63d192
License:        BSD
a63d192
URL:            http://www.vamp-plugins.org/
a63d192
Source0:        http://downloads.sourceforge.net/vamp/vamp-plugin-sdk-%{version}.tar.gz
a659d35
# https://sourceforge.net/tracker/?func=detail&aid=1884043&group_id=192001&atid=939644
a659d35
Patch0:         %{name}-2.1-libdir.patch
a659d35
# https://sourceforge.net/tracker/?func=detail&aid=1884030&group_id=192001&atid=939644
b68cf60
Patch1:         %{name}-2.0-gcc44.patch
a63d192
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
a63d192
a63d192
BuildRequires:  libsndfile-devel
a63d192
#Requires:
a63d192
a63d192
%description
a63d192
Vamp is an API for C and C++ plugins that process sampled audio data
a63d192
to produce descriptive output (measurements or semantic observations).
a63d192
a63d192
%package        devel
a63d192
Summary:        Development files for %{name}
a63d192
Group:          Development/Libraries
a63d192
Requires:       %{name} = %{version}-%{release}
a63d192
Requires:       pkgconfig
a63d192
a63d192
%description    devel
a63d192
The %{name}-devel package contains libraries and header files for
a63d192
developing applications that use %{name}.
a63d192
a63d192
%package        static
a63d192
Summary:        Static libraries for %{name}
a63d192
Group:          Development/Libraries
a63d192
Requires:       %{name}-devel = %{version}-%{release}
a63d192
a63d192
%description    static
a63d192
The %{name}-static package contains library files for
a63d192
developing static applications that use %{name}.
a63d192
a63d192
a63d192
%prep
4ea15c0
%setup -q
b516465
%patch0 -p1 -b .libdir
b68cf60
%patch1 -p1 -b .gcc44
e2d0e95
sed -i 's|/lib/vamp|/%{_lib}/vamp|g' src/vamp-hostsdk/PluginHostAdapter.cpp
3bccd40
sed -i 's|/lib/|/%{_lib}/|g' src/vamp-hostsdk/PluginLoader.cpp
a63d192
a63d192
a63d192
%build
b516465
%configure
b516465
make %{?_smp_mflags}
a63d192
a63d192
a63d192
%install
a63d192
rm -rf $RPM_BUILD_ROOT
a63d192
# fix libdir
a63d192
find . -name '*.pc.in' -exec sed -i 's|/lib|/%{_lib}|' {} ';'
e2d0e95
make install DESTDIR=$RPM_BUILD_ROOT #INSTALL_PREFIX=%{_prefix} LIB=/%{_lib}
a63d192
a63d192
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
a63d192
a63d192
# create Makefile for examples
a63d192
cd examples
a659d35
echo CXXFLAGS=$RPM_OPT_FLAGS -fpic >> Makefile-%{_arch}
a63d192
echo bundle: `ls *.o` >> Makefile
a63d192
echo -e "\t"g++ \$\(CXXFLAGS\) -shared -Wl,-Bsymbolic \
a63d192
     -o vamp-example-plugins.so \
a63d192
     *.o \$\(pkg-config --libs vamp-sdk\) >> Makefile
a63d192
echo `ls *.cpp`: >> Makefile
a63d192
echo -e "\t"g++ \$\(CXXFLAGS\) -c $*.cpp >> Makefile
a63d192
echo clean: >> Makefile
a63d192
echo -e "\t"-rm *.o *.so >> Makefile
a63d192
# clean directory up so we can package the sources
a63d192
make clean
a63d192
a63d192
3bccd40
%check
3bccd40
# Scan shared libs for unpatched '/lib' strings to prevent issues
3bccd40
# on 64-bit multilib platforms.
3bccd40
[ $(strings ${RPM_BUILD_ROOT}%{_libdir}/lib*.so.?|grep /lib|sed -e 's!/%{_lib}!/__FEDORA-LIB__!g'|grep -c /lib) -eq 0 ]
3bccd40
3bccd40
a63d192
%clean
a63d192
rm -rf $RPM_BUILD_ROOT
a63d192
a63d192
a63d192
%post -p /sbin/ldconfig
a63d192
a63d192
%postun -p /sbin/ldconfig
a63d192
a63d192
a63d192
%files
a63d192
%defattr(-,root,root,-)
a63d192
%doc COPYING README
a63d192
%{_libdir}/*.so.*
b516465
%{_libdir}/vamp
a63d192
a63d192
%files devel
a63d192
%defattr(-,root,root,-)
a63d192
%doc examples
b516465
%{_bindir}/vamp-*
a63d192
%{_includedir}/*
a63d192
%{_libdir}/*.so
a63d192
%{_libdir}/pkgconfig/*.pc
a63d192
a63d192
%files static
a63d192
%defattr(-,root,root,-)
a63d192
%{_libdir}/*.a
a63d192
a63d192
a63d192
%changelog
a659d35
* Fri May 28 2010 Michel Salim <salimma@fedoraproject.org> - 2.1-1
a659d35
- Update to 2.1
a659d35
- multilib fix: Makefile for examples is now arch-tagged
a659d35
9d40e76
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-6
9d40e76
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
9d40e76
3bccd40
* Tue Mar 31 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 2.0-5
3bccd40
- Add another sed libdir fix for PluginLoader.cpp (#469777)
3bccd40
  plus a check section to scan for libdir issues
3bccd40
246bbce
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-4
246bbce
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
246bbce
b68cf60
* Sun Feb  8 2009 Michel Salim <salimma@fedoraproject.org> - 2.0-3
b68cf60
- Fix compilation problem with GCC 4.4
b68cf60
e2d0e95
* Tue Dec 30 2008 Michel Salim <salimma@fedoraproject.org> - 2.0-2
e2d0e95
- More libdir fixes (bug #469777)
e2d0e95
b516465
* Sun Dec 14 2008 Michel Salim <salimma@fedoraproject.org> - 2.0-1
b516465
- Update to 2.0
b516465
4ea15c0
* Thu Jul 17 2008 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.3-1
4ea15c0
- Update to 1.3
4ea15c0
220dea1
* Thu Jan 31 2008 Michel Salim <michel.sylvan@gmail.com> - 1.1b-4
220dea1
- Add some #includes, needed due to GCC 4.3's header dependency cleanup
220dea1
a63d192
* Mon Jan 28 2008 Michel Salim <michel.sylvan@gmail.com> - 1.1b-3
a63d192
- Add examples to -devel subpackage
a63d192
- Fix .pc files
a63d192
- Preserve timestamps when installing
a63d192
a63d192
* Sun Jan 27 2008 Michel Salim <michel.sylvan@gmail.com> - 1.1b-2
a63d192
- Add missing build requirement on libsndfile-devel
a63d192
a63d192
* Wed Jan 16 2008 Michel Salim <michel.sylvan@gmail.com> - 1.1b-1
a63d192
- Initial Fedora package