108 lines
2.6 KiB
RPMSpec
108 lines
2.6 KiB
RPMSpec
Name: vamp-plugin-sdk
|
|
Version: 2.5
|
|
Release: 1
|
|
Summary: An API for audio analysis and feature extraction plugins
|
|
|
|
Group: System Environment/Libraries
|
|
License: BSD
|
|
URL: http://www.vamp-plugins.org/
|
|
Source0: http://code.soundsoftware.ac.uk/attachments/download/690/vamp-plugin-sdk-2.5.tar.gz
|
|
# https://sourceforge.net/tracker/?func=detail&aid=1884043&group_id=192001&atid=939644
|
|
Patch0: %{name}-2.5-libdir.patch
|
|
|
|
BuildRequires: libsndfile-devel
|
|
#Requires:
|
|
|
|
%description
|
|
Vamp is an API for C and C++ plugins that process sampled audio data
|
|
to produce descriptive output (measurements or semantic observations).
|
|
|
|
%package devel
|
|
Summary: Development files for %{name}
|
|
Group: Development/Libraries
|
|
Requires: %{name} = %{version}-%{release}
|
|
Requires: pkgconfig
|
|
|
|
%description devel
|
|
The %{name}-devel package contains libraries and header files for
|
|
developing applications that use %{name}.
|
|
|
|
%package static
|
|
Summary: Static libraries for %{name}
|
|
Group: Development/Libraries
|
|
Requires: %{name}-devel = %{version}-%{release}
|
|
|
|
%description static
|
|
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
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
%install
|
|
# fix libdir
|
|
find . -name '*.pc.in' -exec sed -i 's|/lib|/%{_lib}|' {} ';'
|
|
make install DESTDIR=$RPM_BUILD_ROOT #INSTALL_PREFIX=%{_prefix} LIB=/%{_lib}
|
|
|
|
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
|
|
|
# create Makefile for examples
|
|
cd examples
|
|
echo CXXFLAGS=$RPM_OPT_FLAGS -fpic >> Makefile-%{_arch}
|
|
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
|
|
|
|
|
|
%check
|
|
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc COPYING README
|
|
%{_libdir}/*.so.*
|
|
%{_libdir}/vamp
|
|
|
|
%files devel
|
|
%defattr(-,root,root,-)
|
|
%doc examples
|
|
%{_bindir}/vamp-*
|
|
%{_includedir}/*
|
|
%{_libdir}/*.so
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
%files static
|
|
%defattr(-,root,root,-)
|
|
%{_libdir}/*.a
|
|
|
|
|
|
%changelog
|
|
* Thu May 13 2021 He Rengui <herengui@uniontech.com> - 2.5-1
|
|
- package init
|