[packages/chromaprint] - updated to 0.7 - added ffmpeg patch (ffmpeg API update for all obsolete and most of deprecated cal

qboosh qboosh at pld-linux.org
Wed Oct 10 19:22:45 CEST 2012


commit 93381a8e19d85f6a9f467c1386246444773d41e7
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Oct 10 19:22:02 2012 +0200

    - updated to 0.7
    - added ffmpeg patch (ffmpeg API update for all obsolete and most of deprecated calls as of ffmpeg 1.0)
    - ffmpeg is preferred over fftw for FFT transform (slightly faster, does not necessarily enforce GPL),
      is already used by fpcollect tool
    - python binding has been moved to separate package
    - pl

 chromaprint-ffmpeg.patch |  40 +++++++++++++++++++
 chromaprint.spec         | 100 +++++++++++++++++++++++++----------------------
 2 files changed, 93 insertions(+), 47 deletions(-)
---
diff --git a/chromaprint.spec b/chromaprint.spec
index 25784d6..4dfe511 100644
--- a/chromaprint.spec
+++ b/chromaprint.spec
@@ -1,14 +1,19 @@
 Summary:	Library implementing the AcoustID fingerprinting
+Summary(pl.UTF-8):	Biblioteka implementująca odciski AcoustID
 Name:		chromaprint
-Version:	0.5
+Version:	0.7
 Release:	1
-License:	LGPL v2+
+License:	LGPL v2.1+
 Group:		Libraries
-URL:		http://www.acoustid.org/chromaprint/
 Source0:	https://github.com/downloads/lalinsky/chromaprint/%{name}-%{version}.tar.gz
-BuildRequires:	cmake
-BuildRequires:	fftw3-devel >= 3
-BuildRequires:	python
+# Source0-md5:	3005fc2c69b9ef4a5c6787ef9355a855
+Patch0:		%{name}-ffmpeg.patch
+URL:		http://www.acoustid.org/chromaprint/
+BuildRequires:	boost-devel
+BuildRequires:	cmake >= 2.6
+BuildRequires:	ffmpeg-devel
+BuildRequires:	libstdc++-devel
+BuildRequires:	taglib-devel
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -16,67 +21,74 @@ Chromaprint library is the core component of the AcoustID project.
 It's a client-side library that implements a custom algorithm for
 extracting fingerprints from raw audio sources.
 
-The library exposes a simple C API and the package also includes
-bindings for the Python language. The documentation for the C API can
-be found in the main header file.
+The library exposes a simple C API and the Python language binding is
+also available. The documentation for the C API can be found in the
+main header file.
+
+%description -l pl.UTF-8
+Biblioteka Chromaprint to główny element projektu AcoustID. Jest to
+biblioteka kliencka implementująca własny algorytm wydobywania
+odcisków identyfikacyjnych z surowych strumieni dźwiękowych.
+
+Biblioteka udostępnia proste API C. Dostępne są także wiązania dla
+Pythona. Dokumentację dla API C można znaleźć w głównym pliku
+nagłówkowym.
 
 %package -n libchromaprint
 Summary:	Library implementing the AcoustID fingerprinting
-Group:		Development/Libraries
+Summary(pl.UTF-8):	Biblioteka implementująca odciski AcoustID
+Group:		Libraries
 
 %description -n libchromaprint
 Chromaprint library is the core component of the AcoustID project.
 It's a client-side library that implements a custom algorithm for
 extracting fingerprints from raw audio sources.
 
-The library exposes a simple C API and the package also includes
-bindings for the Python language. The documentation for the C API can
-be found in the main header file.
+The library exposes a simple C API and the Python language binding
+is also available. The documentation for the C API can be found in the
+main header file.
+
+%description -n libchromaprint -l pl.UTF-8
+Biblioteka Chromaprint to główny element projektu AcoustID. Jest to
+biblioteka kliencka implementująca własny algorytm wydobywania
+odcisków identyfikacyjnych z surowych strumieni dźwiękowych.
+
+Biblioteka udostępnia proste API C. Dostępne są także wiązania dla
+Pythona. Dokumentację dla API C można znaleźć w głównym pliku
+nagłówkowym.
 
 %package -n libchromaprint-devel
-Summary:	Headers for developing programs that will use %{name}
+Summary:	Headers for developing programs that will use libchromaprint
+Summary(pl.UTF-8):	Pliki nagłówkowe do tworzenia programów wykorzystujących libchromaprint
 Group:		Development/Libraries
 Requires:	libchromaprint = %{version}-%{release}
-Requires:	pkgconfig
 
 %description -n libchromaprint-devel
 This package contains the headers that programmers will need to
-develop applications which will use %{name}.
-
-%package -n python-chromaprint
-Summary:	Python module for %{name}
-License:	MIT
-Group:		Development/Libraries
-Requires:	libchromaprint = %{version}-%{release}
+develop applications which will use libchromaprint.
 
-%description -n python-chromaprint
-This package contains the python module to use %{name}.
+%description -n libchromaprint-devel -l pl.UTF-8
+Ten pakiet zawiera pliki nagłówkowe potrzebne programistom do
+tworzenia aplikacji wykorzystujących bibliotekę libchromaprint.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
-# examples require ffmpeg, so turn off examples
-%cmake \
-	-DBUILD_EXAMPLES=off \
-	-DBUILD_TESTS=off
+%cmake . \
+	-DBUILD_TOOLS=ON \
+	-DWITH_AVFFT=ON
 
 %{__make}
 
-cd python
-CFLAGS="%{rpmcflags}" \
-%{__python} setup.py build
-
 %install
 rm -rf $RPM_BUILD_ROOT
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-cd python
-%{__python} setup.py install \
-	--skip-build \
-	--optimize=2 \
-	--root=$RPM_BUILD_ROOT
+# omitted by make install
+install -D tools/fpcollect $RPM_BUILD_ROOT%{_bindir}/fpcollect
 
 %clean
 rm  -rf $RPM_BUILD_ROOT
@@ -86,19 +98,13 @@ rm  -rf $RPM_BUILD_ROOT
 
 %files -n libchromaprint
 %defattr(644,root,root,755)
-%doc CHANGES.txt COPYING.txt NEWS.txt README.txt
+%doc CHANGES.txt NEWS.txt README.txt
+%attr(755,root,root) %{_bindir}/fpcollect
 %attr(755,root,root) %{_libdir}/libchromaprint.so.*.*.*
-%ghost %{_libdir}/libchromaprint.so.0
+%attr(755,root,root) %ghost %{_libdir}/libchromaprint.so.0
 
 %files -n libchromaprint-devel
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libchromaprint.so
 %{_includedir}/chromaprint.h
-%{_libdir}/libchromaprint.so
 %{_pkgconfigdir}/libchromaprint.pc
-
-# MIT licensed
-%files -n python-chromaprint
-%defattr(644,root,root,755)
-%doc python/examples python/LICENSE
-%{py_sitescriptdir}/chromaprint
-%{py_sitescriptdir}/*.egg-info
diff --git a/chromaprint-ffmpeg.patch b/chromaprint-ffmpeg.patch
new file mode 100644
index 0000000..dc14601
--- /dev/null
+++ b/chromaprint-ffmpeg.patch
@@ -0,0 +1,40 @@
+--- chromaprint-0.7/src/ext/ffmpeg_decoder.h.orig	2012-09-05 20:05:36.000000000 +0200
++++ chromaprint-0.7/src/ext/ffmpeg_decoder.h	2012-10-10 17:59:58.632685943 +0200
+@@ -80,7 +80,7 @@
+ 		avcodec_close(m_codec_ctx);
+ 	}
+ 	if (m_format_ctx) {
+-		av_close_input_file(m_format_ctx);
++		avformat_close_input(&m_format_ctx);
+ 	}
+ 	//av_audio_convert_free(m_convert_ctx);
+ 	av_free(m_buffer2);
+@@ -89,12 +89,12 @@
+ 
+ inline bool Decoder::Open()
+ {
+-	if (av_open_input_file(&m_format_ctx, m_file_name.c_str(), NULL, 0, NULL) != 0) {
++	if (avformat_open_input(&m_format_ctx, m_file_name.c_str(), NULL, NULL) != 0) {
+ 		m_error = "Couldn't open the file." + m_file_name;
+ 		return false;
+ 	}
+ 
+-	if (av_find_stream_info(m_format_ctx) < 0) {
++	if (avformat_find_stream_info(m_format_ctx, NULL) < 0) {
+ 		m_error = "Couldn't find stream information in the file.";
+ 		return false;
+ 	}
+@@ -129,11 +129,11 @@
+ 		return false;
+ 	}
+ 
+-	if (m_codec_ctx->sample_fmt != SAMPLE_FMT_S16) {
++	if (m_codec_ctx->sample_fmt != AV_SAMPLE_FMT_S16) {
+ 		m_error = "Unsupported sample format.\n";
+ 		return false;
+ 	}
+-	/*m_convert_ctx = av_audio_convert_alloc(SAMPLE_FMT_S16, 1,
++	/*m_convert_ctx = av_audio_convert_alloc(AV_SAMPLE_FMT_S16, 1,
+ 	                                       m_codec_ctx->sample_fmt, 1,
+ 										   NULL, 0);
+ 	if (!m_convert_ctx) {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/chromaprint.git/commitdiff/93381a8e19d85f6a9f467c1386246444773d41e7



More information about the pld-cvs-commit mailing list