]> git.pld-linux.org Git - packages/chromaprint.git/blobdiff - chromaprint.spec
- upstream fixes for ffmpeg 5+, rel 2
[packages/chromaprint.git] / chromaprint.spec
index 8320dca1c7f8e0f3a36334572010ee8f24990d45..5015e31692ff9f3273541996351cea537d617993 100644 (file)
@@ -1,20 +1,30 @@
+#
+# Conditional build:
+%bcond_without ffmpeg  # fpcalc build + libchromaprint using avfft
+%bcond_with    fftw3   # libchromaprint using fftw3 instead of avfft
+#
+%if %{without ffmpeg}
+%define        with_fftw3      1
+%endif
 Summary:       Library implementing the AcoustID fingerprinting
 Summary(pl.UTF-8):     Biblioteka implementująca odciski AcoustID
 Name:          chromaprint
-Version:       0.7
-Release:       5
+Version:       1.5.1
+Release:       2
 License:       LGPL v2.1+
 Group:         Libraries
-Source0:       https://github.com/downloads/lalinsky/chromaprint/%{name}-%{version}.tar.gz
-# Source0-md5: 3005fc2c69b9ef4a5c6787ef9355a855
-Patch0:                %{name}-ffmpeg.patch
-Patch1:                %{name}-ffmpeg2.0.patch
-URL:           http://www.acoustid.org/chromaprint/
-BuildRequires: boost-devel
-BuildRequires: cmake >= 2.6
-BuildRequires: ffmpeg-devel
-BuildRequires: libstdc++-devel
+#Source0Download: https://github.com/acoustid/chromaprint/releases
+Source0:       https://github.com/acoustid/chromaprint/releases/download/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 54e71f86bcf1d34989db639044ba9628
+Patch0:                ffmpeg5.patch
+Patch1:                ffmpeg5-decode-retry.patch
+URL:           https://acoustid.org/chromaprint
+BuildRequires: cmake >= 3.3
+%{?with_ffmpeg:BuildRequires:  ffmpeg-devel >= 0.6}
+%{?with_fftw3:BuildRequires:   fftw3-devel >= 3}
+BuildRequires: libstdc++-devel >= 6:4.7
 BuildRequires: taglib-devel
+Requires:      libchromaprint = %{version}-%{release}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -78,19 +88,20 @@ tworzenia aplikacji wykorzystujących bibliotekę libchromaprint.
 %patch1 -p1
 
 %build
-%cmake . \
-       -DBUILD_TOOLS=ON \
-       -DWITH_AVFFT=ON
+install -d build
+cd build
+%cmake .. \
+       %{?with_ffmpeg:-DBUILD_TOOLS=ON} \
+       %{!?with_fftw3:-DWITH_AVFFT=ON} \
+       %{?with_fftw3:-DWITH_FFTW3=ON}
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__make} install \
-       DESTDIR=$RPM_BUILD_ROOT
 
-# omitted by make install
-install -D tools/fpcollect $RPM_BUILD_ROOT%{_bindir}/fpcollect
+%{__make} -C build install \
+       DESTDIR=$RPM_BUILD_ROOT
 
 %clean
 rm  -rf $RPM_BUILD_ROOT
@@ -98,12 +109,17 @@ rm  -rf $RPM_BUILD_ROOT
 %post  -n libchromaprint -p /sbin/ldconfig
 %postun        -n libchromaprint -p /sbin/ldconfig
 
+%if %{with ffmpeg}
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/fpcalc
+%endif
+
 %files -n libchromaprint
 %defattr(644,root,root,755)
-%doc CHANGES.txt NEWS.txt README.txt
-%attr(755,root,root) %{_bindir}/fpcollect
+%doc NEWS.txt README.md
 %attr(755,root,root) %{_libdir}/libchromaprint.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libchromaprint.so.0
+%attr(755,root,root) %ghost %{_libdir}/libchromaprint.so.1
 
 %files -n libchromaprint-devel
 %defattr(644,root,root,755)
This page took 0.09986 seconds and 4 git commands to generate.