%define major 2 %define libname %mklibname %{name} %{major} %define develname %mklibname -d %{name} %define staticdevelname %mklibname -d %{name} -s Summary: An API for audio analysis and feature extraction plugins Name: vamp-plugin-sdk Version: 2.4 Release: %mkrel 2 License: BSD Group: System/Libraries URL: http://www.vamp-plugins.org/ Source0: http://downloads.sourceforge.net/vamp/vamp-plugin-sdk-%{version}.tar.gz Patch0: %{name}-2.4-libdir.patch BuildRequires: libsndfile-devel %description Vamp is an API for C and C++ plugins that process sampled audio data to produce descriptive output (measurements or semantic observations). %package -n %{libname} Summary: An API for audio analysis and feature extraction plugins library Group: System/Libraries %description -n %{libname} Vamp is an API for C and C++ plugins that process sampled audio data to produce descriptive output (measurements or semantic observations). %package -n %{develname} Summary: Development files (headers) for SLV2 Group: Development/C Requires: %{libname} = %{version} Provides: %{name}-devel = %{version} Requires: pkgconfig %description -n %{develname} Vamp is an API for C and C++ plugins that process sampled audio data to produce descriptive output (measurements or semantic observations). The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package -n %{staticdevelname} Summary: Development files (headers) for SLV2 Group: Development/C Requires: %{develname} = %{version} Provides: %{name}-static-devel = %{version} %description -n %{staticdevelname} Vamp is an API for C and C++ plugins that process sampled audio data to produce descriptive output (measurements or semantic observations). The %{name}-static package contains library files for developing static applications that use %{name}. %prep %setup -q %patch0 -p1 -b .libdir sed -i 's|/lib/vamp|/%{_lib}/vamp|g' src/vamp-hostsdk/PluginHostAdapter.cpp sed -i 's|/lib/|/%{_lib}/|g' src/vamp-hostsdk/PluginLoader.cpp %build ./configure --prefix=/usr \ --libdir=%{_libdir} \ --bindir=%{_bindir} \ --sbindir=%{_sbindir} \ --includedir=%{_includedir} #make %make %install rm -rf %{buildroot} # fix libdir find . -name '*.pc.in' -exec sed -i 's|/lib|/%{_lib}|' {} ';' make install DESTDIR=%{buildroot} LIBDIR=%{_libdir} find %{buildroot} -name '*.la' -exec rm -f {} ';' # create Makefile for examples cd examples echo CXXFLAGS=$RPM_OPT_FLAGS -fpic >> Makefile echo bundle: `ls *.o` >> Makefile echo -e "\t"g++ \$\(CXXFLAGS\) -shared -Wl,-Bsymbolic \ -o vamp-example-plugins.so \ *.o \$\(pkg-config --libs vamp-sdk\) >> Makefile echo `ls *.cpp`: >> Makefile echo -e "\t"g++ \$\(CXXFLAGS\) -c $*.cpp >> Makefile echo clean: >> Makefile echo -e "\t"-rm *.o *.so >> Makefile # clean directory up so we can package the sources make clean %clean rm -rf %{buildroot} %files -n %{libname} %doc COPYING README %{_libdir}/*.so.* %files -n %{develname} %doc examples %{_includedir}/* %{_libdir}/*.so %{_libdir}/vamp/* %{_bindir}/vamp-rdf-template-generator %{_bindir}/vamp-simple-host %{_libdir}/pkgconfig/*.pc %files -n %{staticdevelname} %{_libdir}/*.a %changelog * Mon Jan 14 2013 umeabot <umeabot> 2.4-2.mga3 + Revision: 385226 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Mon Aug 13 2012 luigiwalser <luigiwalser> 2.4-1.mga3 + Revision: 281008 - 2.4 - spec fixes from mdv * Thu Mar 24 2011 boklm <boklm> 2.1-3.mga1 + Revision: 76217 - rebuild for bug #497 * Tue Mar 08 2011 ennael <ennael> 2.1-2.mga1 + Revision: 66680 - clean spec file - imported package vamp-plugin-sdk