From 57a509e4c25057efa40386d203af9c4535801be5 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Thu, 2 Jul 2020 21:54:32 +0200 Subject: [PATCH] - updated to 0.4.9 - removed obsolete ffmpeg4 patch --- aubio.spec | 127 ++++++++++++++++++++++++++++++++++---------------- ffmpeg4.patch | 11 ----- 2 files changed, 88 insertions(+), 50 deletions(-) delete mode 100644 ffmpeg4.patch diff --git a/aubio.spec b/aubio.spec index 9383bb0..cb4b1c1 100644 --- a/aubio.spec +++ b/aubio.spec @@ -1,22 +1,25 @@ # # Conditional build: -%bcond_without python2 # python bindings -%bcond_without python3 # python bindings +%bcond_without python2 # CPython 2.x bindings +%bcond_without python3 # CPython 3.x bindings +%bcond_with tests # (python) tests (some inexact failures, missing test data) +%bcond_without apidocs # API (Sphinx and doxygen) documentation # +%if %{without python3} +%undefine with_apidocs +%endif Summary: aubio - library for audio labelling Summary(pl.UTF-8): aubio - biblioteka do oznaczania dźwięku Name: aubio -Version: 0.4.3 -Release: 7 +Version: 0.4.9 +Release: 1 License: GPL v3+ Group: Libraries -Source0: http://aubio.piem.org/pub/%{name}-%{version}.tar.bz2 -# Source0-md5: 52a960cfc8a3e3125f3a258545d1c7e5 -Patch0: ffmpeg4.patch -URL: http://aubio.piem.org/ -BuildRequires: alsa-lib-devel >= 0.9.0 -BuildRequires: doxygen -BuildRequires: ffmpeg-devel +Source0: https://aubio.org/pub/%{name}-%{version}.tar.bz2 +# Source0-md5: 50c9c63b15a2692378af5d602892f16a +URL: https://aubio.org/ +# libavcodec >= 54.35.0, libavformat >= 52.3.0, libavutil >= 52.3.0, libswresample >= 1.2.0 || libavresample >= 1.0.1 +BuildRequires: ffmpeg-devel >= 1.1 BuildRequires: fftw3-single-devel >= 3.0.0 BuildRequires: jack-audio-connection-kit-devel >= 0.15.0 BuildRequires: libsamplerate-devel >= 0.0.15 @@ -28,16 +31,29 @@ BuildRequires: rpm-pythonprov BuildRequires: rpmbuild(macros) >= 1.714 %endif %if %{with python2} -BuildRequires: python-devel +BuildRequires: python-devel >= 1:2.5 BuildRequires: python-numpy-devel BuildRequires: python-setuptools +%if %{with tests} +BuildRequires: python-pytest +%endif %endif %if %{with python3} -BuildRequires: python3-devel +BuildRequires: python3-devel >= 1:3.2 BuildRequires: python3-numpy-devel BuildRequires: python3-setuptools +%if %{with tests} +BuildRequires: python3-pytest +%endif %endif BuildRequires: sed >= 4.0 +%if %{with apidocs} +BuildRequires: doxygen +BuildRequires: sphinx-pdg-3 +%endif +Requires: ffmpeg-libs >= 1.1 +Requires: libsamplerate >= 0.0.15 +Requires: libsndfile >= 1.0.4 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -51,12 +67,6 @@ Summary: Header files for aubio library Summary(pl.UTF-8): Pliki nagłówkowe biblioteki aubio Group: Development/Libraries Requires: %{name} = %{version}-%{release} -Requires: fftw3-single-devel >= 3.0.0 -Requires: libsamplerate-devel >= 0.0.15 -# for libaubioext: -# alsa-lib-devel >= 0.9.0 -# jack-audio-connection-kit-devel >= 0.15.0 -# libsndfile-devel >= 1.0.4 %description devel Header files for aubio library. @@ -76,11 +86,23 @@ Static aubio library. %description static -l pl.UTF-8 Statyczna biblioteka aubio. +%package apidocs +Summary: API documentation for aubio library +Summary(pl.UTF-8): Dokumentacja API biblioteki aubio +Group: Documentation + +%description apidocs +API documentation for aubio library. + +%description apidocs -l pl.UTF-8 +Dokumentacja API biblioteki aubio. + %package progs Summary: Example applications using aubio library Summary(pl.UTF-8): Przykładowe programy korzystajace z biblioteki aubio Group: Applications/Sound Requires: %{name} = %{version}-%{release} +Requires: jack-audio-connection-kit-libs >= 0.15.0 %description progs A few examples of applications using aubio library: @@ -107,32 +129,31 @@ Kilka przykładowych aplikacji korzystających z biblioteki dubio: dźwiękowych. %package -n python-aubio -Summary: aubio Python bindings -Summary(pl.UTF-8): Wiązania Pythona do biblioteki aubio +Summary: aubio Python 2 bindings +Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki aubio Group: Libraries/Python Requires: %{name} = %{version}-%{release} %description -n python-aubio -aubio Python bindings. +aubio Python 2 bindings. %description -n python-aubio -l pl.UTF-8 -Wiązania Pythona do biblioteki aubio. +Wiązania Pythona 2 do biblioteki aubio. %package -n python3-aubio -Summary: aubio Python bindings -Summary(pl.UTF-8): Wiązania Pythona do biblioteki aubio +Summary: aubio Python 3 bindings +Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki aubio Group: Libraries/Python Requires: %{name} = %{version}-%{release} %description -n python3-aubio -aubio Python bindings. +aubio Python 3 bindings. %description -n python3-aubio -l pl.UTF-8 -Wiązania Pythona do biblioteki aubio. +Wiązania Pythona 3 do biblioteki aubio. %prep %setup -q -%patch0 -p1 %build export CC="%{__cc}" @@ -144,22 +165,41 @@ export LDFLAGS="%{rpmldflags}" --prefix=%{_prefix} \ --libdir=%{_libdir} \ --libexecdir=%{_libexecdir} \ + --disable-atlas \ + --enable-avcodec \ + %{?with_apidocs:--enable-docs} \ --enable-fftw3f \ --enable-jack \ - --enable-sndfile \ - --enable-avcodec \ --enable-samplerate \ - --disable-atlas \ - --enable-docs + --enable-sndfile ./waf build -v %if %{with python2} -%py_build %{?with_tests:test} +%py_build + +%if %{with tests} +LD_LIBRARY_PATH=$(pwd)/build/src \ +PYTHONPATH=$(readlink -f build-2/lib.*) \ +%{__python} -m unittest discover -s python/tests +%endif %endif %if %{with python3} -%py3_build %{?with_tests:test} +%py3_build + +%if %{with tests} +LD_LIBRARY_PATH=$(pwd)/build/src \ +PYTHONPATH=$(readlink -f build-3/lib.*) \ +%{__python3} -m unittest discover -s python/tests +%endif +%endif + +%if %{with apidocs} +LD_LIBRARY_PATH=$(pwd)/build/src \ +PYTHONPATH=$(readlink -f build-3/lib.*) \ +%{__make} -C doc html \ + SPHINXBUILD=sphinx-build-3 %endif %install @@ -179,7 +219,7 @@ rm -rf $RPM_BUILD_ROOT %py3_install %endif -rm -r $RPM_BUILD_ROOT%{_docdir}/libaubio-doc +%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/libaubio-doc %clean rm -rf $RPM_BUILD_ROOT @@ -195,19 +235,28 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(644,root,root,755) -%doc doc/web/html/* %attr(755,root,root) %{_libdir}/libaubio.so -%{_includedir}/%{name} +%{_includedir}/aubio %{_pkgconfigdir}/aubio.pc +%files static +%defattr(644,root,root,755) +%{_libdir}/libaubio.a + +%files apidocs +%defattr(644,root,root,755) +%doc doc/_build/html/{_downloads,_static,*.html,*.js} build/api + %files progs %defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/aubio %attr(755,root,root) %{_bindir}/aubiomfcc %attr(755,root,root) %{_bindir}/aubionotes %attr(755,root,root) %{_bindir}/aubioonset %attr(755,root,root) %{_bindir}/aubiopitch %attr(755,root,root) %{_bindir}/aubioquiet %attr(755,root,root) %{_bindir}/aubiotrack +%{_mandir}/man1/aubio.1* %{_mandir}/man1/aubiomfcc.1* %{_mandir}/man1/aubionotes.1* %{_mandir}/man1/aubioonset.1* @@ -221,7 +270,7 @@ rm -rf $RPM_BUILD_ROOT %dir %{py_sitedir}/aubio %{py_sitedir}/aubio/*.py* %attr(755,root,root) %{py_sitedir}/aubio/_aubio.so -%{py_sitedir}/aubio*.egg-info +%{py_sitedir}/aubio-%{version}-py*.egg-info %if %{without python3} %attr(755,root,root) %{_bindir}/aubiocut %{_mandir}/man1/aubiocut.1* @@ -235,7 +284,7 @@ rm -rf $RPM_BUILD_ROOT %{py3_sitedir}/aubio/__pycache__ %{py3_sitedir}/aubio/*.py %attr(755,root,root) %{py3_sitedir}/aubio/_aubio.*.so -%{py3_sitedir}/aubio*.egg-info +%{py3_sitedir}/aubio-%{version}-py*.egg-info %attr(755,root,root) %{_bindir}/aubiocut %{_mandir}/man1/aubiocut.1* %endif diff --git a/ffmpeg4.patch b/ffmpeg4.patch deleted file mode 100644 index 409b7a0..0000000 --- a/ffmpeg4.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- aubio-0.4.3/src/io/source_avcodec.c~ 2016-07-25 02:51:30.000000000 +0200 -+++ aubio-0.4.3/src/io/source_avcodec.c 2018-04-29 01:29:40.145074749 +0200 -@@ -43,7 +43,7 @@ - #include "fmat.h" - #include "source_avcodec.h" - --#define AUBIO_AVCODEC_MAX_BUFFER_SIZE FF_MIN_BUFFER_SIZE -+#define AUBIO_AVCODEC_MAX_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE - - struct _aubio_source_avcodec_t { - uint_t hop_size; -- 2.44.0