]>
Commit | Line | Data |
---|---|---|
3c0e7068 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without ffmpeg # fpcalc build + libchromaprint using avfft | |
4 | %bcond_with fftw3 # libchromaprint using fftw3 instead of avfft | |
5 | # | |
6 | %if %{without ffmpeg} | |
7 | %define with_fftw3 1 | |
8 | %endif | |
042a8798 | 9 | Summary: Library implementing the AcoustID fingerprinting |
93381a8e | 10 | Summary(pl.UTF-8): Biblioteka implementująca odciski AcoustID |
042a8798 | 11 | Name: chromaprint |
bfa832a0 | 12 | Version: 1.5.1 |
64f23281 | 13 | Release: 2 |
93381a8e | 14 | License: LGPL v2.1+ |
042a8798 | 15 | Group: Libraries |
60b4586a JB |
16 | #Source0Download: https://github.com/acoustid/chromaprint/releases |
17 | Source0: https://github.com/acoustid/chromaprint/releases/download/v%{version}/%{name}-%{version}.tar.gz | |
bfa832a0 | 18 | # Source0-md5: 54e71f86bcf1d34989db639044ba9628 |
64f23281 JR |
19 | Patch0: ffmpeg5.patch |
20 | Patch1: ffmpeg5-decode-retry.patch | |
dd097dae | 21 | URL: https://acoustid.org/chromaprint |
6142e94f | 22 | BuildRequires: cmake >= 3.3 |
3c0e7068 JB |
23 | %{?with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.6} |
24 | %{?with_fftw3:BuildRequires: fftw3-devel >= 3} | |
6142e94f | 25 | BuildRequires: libstdc++-devel >= 6:4.7 |
93381a8e | 26 | BuildRequires: taglib-devel |
3c0e7068 | 27 | Requires: libchromaprint = %{version}-%{release} |
042a8798 ER |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
30 | %description | |
31 | Chromaprint library is the core component of the AcoustID project. | |
32 | It's a client-side library that implements a custom algorithm for | |
33 | extracting fingerprints from raw audio sources. | |
34 | ||
93381a8e JB |
35 | The library exposes a simple C API and the Python language binding is |
36 | also available. The documentation for the C API can be found in the | |
37 | main header file. | |
38 | ||
39 | %description -l pl.UTF-8 | |
40 | Biblioteka Chromaprint to główny element projektu AcoustID. Jest to | |
41 | biblioteka kliencka implementująca własny algorytm wydobywania | |
42 | odcisków identyfikacyjnych z surowych strumieni dźwiękowych. | |
43 | ||
44 | Biblioteka udostępnia proste API C. Dostępne są także wiązania dla | |
45 | Pythona. Dokumentację dla API C można znaleźć w głównym pliku | |
46 | nagłówkowym. | |
042a8798 ER |
47 | |
48 | %package -n libchromaprint | |
49 | Summary: Library implementing the AcoustID fingerprinting | |
93381a8e JB |
50 | Summary(pl.UTF-8): Biblioteka implementująca odciski AcoustID |
51 | Group: Libraries | |
042a8798 ER |
52 | |
53 | %description -n libchromaprint | |
54 | Chromaprint library is the core component of the AcoustID project. | |
55 | It's a client-side library that implements a custom algorithm for | |
56 | extracting fingerprints from raw audio sources. | |
57 | ||
93381a8e JB |
58 | The library exposes a simple C API and the Python language binding |
59 | is also available. The documentation for the C API can be found in the | |
60 | main header file. | |
61 | ||
62 | %description -n libchromaprint -l pl.UTF-8 | |
63 | Biblioteka Chromaprint to główny element projektu AcoustID. Jest to | |
64 | biblioteka kliencka implementująca własny algorytm wydobywania | |
65 | odcisków identyfikacyjnych z surowych strumieni dźwiękowych. | |
66 | ||
67 | Biblioteka udostępnia proste API C. Dostępne są także wiązania dla | |
68 | Pythona. Dokumentację dla API C można znaleźć w głównym pliku | |
69 | nagłówkowym. | |
042a8798 ER |
70 | |
71 | %package -n libchromaprint-devel | |
93381a8e JB |
72 | Summary: Headers for developing programs that will use libchromaprint |
73 | Summary(pl.UTF-8): Pliki nagłówkowe do tworzenia programów wykorzystujących libchromaprint | |
042a8798 ER |
74 | Group: Development/Libraries |
75 | Requires: libchromaprint = %{version}-%{release} | |
042a8798 ER |
76 | |
77 | %description -n libchromaprint-devel | |
78 | This package contains the headers that programmers will need to | |
93381a8e | 79 | develop applications which will use libchromaprint. |
042a8798 | 80 | |
93381a8e JB |
81 | %description -n libchromaprint-devel -l pl.UTF-8 |
82 | Ten pakiet zawiera pliki nagłówkowe potrzebne programistom do | |
83 | tworzenia aplikacji wykorzystujących bibliotekę libchromaprint. | |
042a8798 ER |
84 | |
85 | %prep | |
bfa832a0 | 86 | %setup -q |
64f23281 JR |
87 | %patch0 -p1 |
88 | %patch1 -p1 | |
042a8798 ER |
89 | |
90 | %build | |
60b4586a JB |
91 | install -d build |
92 | cd build | |
93 | %cmake .. \ | |
e281636f | 94 | %{?with_ffmpeg:-DBUILD_TOOLS=ON} \ |
3c0e7068 JB |
95 | %{!?with_fftw3:-DWITH_AVFFT=ON} \ |
96 | %{?with_fftw3:-DWITH_FFTW3=ON} | |
042a8798 ER |
97 | |
98 | %{__make} | |
99 | ||
042a8798 ER |
100 | %install |
101 | rm -rf $RPM_BUILD_ROOT | |
60b4586a JB |
102 | |
103 | %{__make} -C build install \ | |
042a8798 ER |
104 | DESTDIR=$RPM_BUILD_ROOT |
105 | ||
042a8798 ER |
106 | %clean |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | ||
109 | %post -n libchromaprint -p /sbin/ldconfig | |
110 | %postun -n libchromaprint -p /sbin/ldconfig | |
111 | ||
3c0e7068 JB |
112 | %if %{with ffmpeg} |
113 | %files | |
114 | %defattr(644,root,root,755) | |
115 | %attr(755,root,root) %{_bindir}/fpcalc | |
116 | %endif | |
117 | ||
042a8798 ER |
118 | %files -n libchromaprint |
119 | %defattr(644,root,root,755) | |
dd097dae | 120 | %doc NEWS.txt README.md |
042a8798 | 121 | %attr(755,root,root) %{_libdir}/libchromaprint.so.*.*.* |
3c0e7068 | 122 | %attr(755,root,root) %ghost %{_libdir}/libchromaprint.so.1 |
042a8798 ER |
123 | |
124 | %files -n libchromaprint-devel | |
125 | %defattr(644,root,root,755) | |
93381a8e | 126 | %attr(755,root,root) %{_libdir}/libchromaprint.so |
042a8798 | 127 | %{_includedir}/chromaprint.h |
042a8798 | 128 | %{_pkgconfigdir}/libchromaprint.pc |