]>
Commit | Line | Data |
---|---|---|
79fb52b2 | 1 | # |
8eebf965 | 2 | # Conditional build: |
57a509e4 JB |
3 | %bcond_without python2 # CPython 2.x bindings |
4 | %bcond_without python3 # CPython 3.x bindings | |
5 | %bcond_with tests # (python) tests (some inexact failures, missing test data) | |
6 | %bcond_without apidocs # API (Sphinx and doxygen) documentation | |
8eebf965 | 7 | # |
57a509e4 JB |
8 | %if %{without python3} |
9 | %undefine with_apidocs | |
10 | %endif | |
691d98ed JB |
11 | Summary: aubio - library for audio labelling |
12 | Summary(pl.UTF-8): aubio - biblioteka do oznaczania dźwięku | |
79fb52b2 | 13 | Name: aubio |
57a509e4 | 14 | Version: 0.4.9 |
7d316ed5 | 15 | Release: 6 |
6b1bcd9b | 16 | License: GPL v3+ |
79fb52b2 | 17 | Group: Libraries |
57a509e4 JB |
18 | Source0: https://aubio.org/pub/%{name}-%{version}.tar.bz2 |
19 | # Source0-md5: 50c9c63b15a2692378af5d602892f16a | |
7d316ed5 | 20 | Patch0: ffmpeg6.patch |
57a509e4 JB |
21 | URL: https://aubio.org/ |
22 | # libavcodec >= 54.35.0, libavformat >= 52.3.0, libavutil >= 52.3.0, libswresample >= 1.2.0 || libavresample >= 1.0.1 | |
23 | BuildRequires: ffmpeg-devel >= 1.1 | |
21b138b4 JB |
24 | BuildRequires: fftw3-single-devel >= 3.0.0 |
25 | BuildRequires: jack-audio-connection-kit-devel >= 0.15.0 | |
21b138b4 JB |
26 | BuildRequires: libsamplerate-devel >= 0.0.15 |
27 | BuildRequires: libsndfile-devel >= 1.0.4 | |
21b138b4 | 28 | BuildRequires: pkgconfig |
6b1bcd9b JK |
29 | BuildRequires: txt2man |
30 | %if %{with python2} || %{with python3} | |
21b138b4 | 31 | BuildRequires: rpm-pythonprov |
6b1bcd9b JK |
32 | BuildRequires: rpmbuild(macros) >= 1.714 |
33 | %endif | |
34 | %if %{with python2} | |
57a509e4 | 35 | BuildRequires: python-devel >= 1:2.5 |
6b1bcd9b JK |
36 | BuildRequires: python-numpy-devel |
37 | BuildRequires: python-setuptools | |
57a509e4 JB |
38 | %if %{with tests} |
39 | BuildRequires: python-pytest | |
40 | %endif | |
6b1bcd9b JK |
41 | %endif |
42 | %if %{with python3} | |
57a509e4 | 43 | BuildRequires: python3-devel >= 1:3.2 |
6b1bcd9b JK |
44 | BuildRequires: python3-numpy-devel |
45 | BuildRequires: python3-setuptools | |
57a509e4 JB |
46 | %if %{with tests} |
47 | BuildRequires: python3-pytest | |
48 | %endif | |
8eebf965 | 49 | %endif |
cefd6b85 | 50 | BuildRequires: sed >= 4.0 |
57a509e4 JB |
51 | %if %{with apidocs} |
52 | BuildRequires: doxygen | |
53 | BuildRequires: sphinx-pdg-3 | |
54 | %endif | |
55 | Requires: ffmpeg-libs >= 1.1 | |
56 | Requires: libsamplerate >= 0.0.15 | |
57 | Requires: libsndfile >= 1.0.4 | |
79fb52b2 SS |
58 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
59 | ||
60 | %description | |
691d98ed JB |
61 | aubio is a library for audio labelling. |
62 | ||
63 | %description -l pl.UTF-8 | |
64 | aubio to biblioteka do oznaczania dźwięku. | |
79fb52b2 SS |
65 | |
66 | %package devel | |
9d374366 SS |
67 | Summary: Header files for aubio library |
68 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki aubio | |
79fb52b2 SS |
69 | Group: Development/Libraries |
70 | Requires: %{name} = %{version}-%{release} | |
71 | ||
72 | %description devel | |
73 | Header files for aubio library. | |
74 | ||
75 | %description devel -l pl.UTF-8 | |
76 | Pliki nagłówkowe biblioteki aubio. | |
77 | ||
78 | %package static | |
79 | Summary: Static aubio library | |
80 | Summary(pl.UTF-8): Statyczna biblioteka aubio | |
81 | Group: Development/Libraries | |
82 | Requires: %{name}-devel = %{version}-%{release} | |
83 | ||
84 | %description static | |
85 | Static aubio library. | |
86 | ||
87 | %description static -l pl.UTF-8 | |
88 | Statyczna biblioteka aubio. | |
89 | ||
57a509e4 JB |
90 | %package apidocs |
91 | Summary: API documentation for aubio library | |
92 | Summary(pl.UTF-8): Dokumentacja API biblioteki aubio | |
93 | Group: Documentation | |
94 | ||
95 | %description apidocs | |
96 | API documentation for aubio library. | |
97 | ||
98 | %description apidocs -l pl.UTF-8 | |
99 | Dokumentacja API biblioteki aubio. | |
100 | ||
b9d3858a SS |
101 | %package progs |
102 | Summary: Example applications using aubio library | |
691d98ed JB |
103 | Summary(pl.UTF-8): Przykładowe programy korzystajace z biblioteki aubio |
104 | Group: Applications/Sound | |
b9d3858a | 105 | Requires: %{name} = %{version}-%{release} |
57a509e4 | 106 | Requires: jack-audio-connection-kit-libs >= 0.15.0 |
b9d3858a SS |
107 | |
108 | %description progs | |
109 | A few examples of applications using aubio library: | |
691d98ed | 110 | - aubioonset: outputs the onset detected. |
b9d3858a | 111 | - aubionotes: uses both onset and pitch to extract symbolic music data |
6b1bcd9b | 112 | from an audio source and emit MIDI like data. |
691d98ed | 113 | - aubiocut: a Python script that takes an input sound and creates one |
6b1bcd9b JK |
114 | new sample at each detected onset or beat. The slices produced by |
115 | aubiocut are useful for use with a sequencer such as Hydrogen. | |
691d98ed JB |
116 | - aubiopitch: a Python script to extract pitch tracks from sound |
117 | files. | |
118 | ||
119 | %description progs -l pl.UTF-8 | |
120 | Kilka przykładowych aplikacji korzystających z biblioteki dubio: | |
121 | - aubioonset - wypisuje wykryty początek. | |
122 | - aubionotes - wykorzystuje początek i wysokość do wyciągnięcia | |
6b1bcd9b JK |
123 | symbolicznych danych muzycznych ze źródła dźwięku i stworzenia danych |
124 | typu MIDI. | |
691d98ed JB |
125 | - aubiocut - skrypt Pythona pobierający dźwięk wejściowy i tworzący |
126 | nową próbkę dla każdego wykrytego początku lub taktu. Fragmenty | |
6b1bcd9b JK |
127 | tworzone przez aubiocut są przydatne do wykorzystania przez sekwencer, |
128 | jak np. Hydrogen. | |
129 | - aubiopitch - skrypt Pythona do wyciągania ścieżek wysokości z plików | |
130 | dźwiękowych. | |
b9d3858a | 131 | |
8eebf965 | 132 | %package -n python-aubio |
57a509e4 JB |
133 | Summary: aubio Python 2 bindings |
134 | Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki aubio | |
8eebf965 SS |
135 | Group: Libraries/Python |
136 | Requires: %{name} = %{version}-%{release} | |
137 | ||
138 | %description -n python-aubio | |
57a509e4 | 139 | aubio Python 2 bindings. |
691d98ed JB |
140 | |
141 | %description -n python-aubio -l pl.UTF-8 | |
57a509e4 | 142 | Wiązania Pythona 2 do biblioteki aubio. |
8eebf965 | 143 | |
6b1bcd9b | 144 | %package -n python3-aubio |
57a509e4 JB |
145 | Summary: aubio Python 3 bindings |
146 | Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki aubio | |
6b1bcd9b JK |
147 | Group: Libraries/Python |
148 | Requires: %{name} = %{version}-%{release} | |
149 | ||
150 | %description -n python3-aubio | |
57a509e4 | 151 | aubio Python 3 bindings. |
6b1bcd9b JK |
152 | |
153 | %description -n python3-aubio -l pl.UTF-8 | |
57a509e4 | 154 | Wiązania Pythona 3 do biblioteki aubio. |
6b1bcd9b | 155 | |
79fb52b2 SS |
156 | %prep |
157 | %setup -q | |
7d316ed5 | 158 | %patch0 -p1 |
79fb52b2 SS |
159 | |
160 | %build | |
6b1bcd9b JK |
161 | export CC="%{__cc}" |
162 | export CXX="%{__cxx}" | |
163 | export CFLAGS="%{rpmcflags}" | |
164 | export CXXFLAGS="%{rpmcxxflags}" | |
165 | export LDFLAGS="%{rpmldflags}" | |
166 | ./waf configure \ | |
167 | --prefix=%{_prefix} \ | |
168 | --libdir=%{_libdir} \ | |
169 | --libexecdir=%{_libexecdir} \ | |
57a509e4 JB |
170 | --disable-atlas \ |
171 | --enable-avcodec \ | |
172 | %{?with_apidocs:--enable-docs} \ | |
6b1bcd9b JK |
173 | --enable-fftw3f \ |
174 | --enable-jack \ | |
6b1bcd9b | 175 | --enable-samplerate \ |
57a509e4 | 176 | --enable-sndfile |
6b1bcd9b JK |
177 | |
178 | ./waf build -v | |
179 | ||
180 | %if %{with python2} | |
57a509e4 JB |
181 | %py_build |
182 | ||
183 | %if %{with tests} | |
184 | LD_LIBRARY_PATH=$(pwd)/build/src \ | |
185 | PYTHONPATH=$(readlink -f build-2/lib.*) \ | |
186 | %{__python} -m unittest discover -s python/tests | |
187 | %endif | |
6b1bcd9b JK |
188 | %endif |
189 | ||
190 | %if %{with python3} | |
57a509e4 JB |
191 | %py3_build |
192 | ||
193 | %if %{with tests} | |
194 | LD_LIBRARY_PATH=$(pwd)/build/src \ | |
195 | PYTHONPATH=$(readlink -f build-3/lib.*) \ | |
196 | %{__python3} -m unittest discover -s python/tests | |
197 | %endif | |
198 | %endif | |
199 | ||
200 | %if %{with apidocs} | |
201 | LD_LIBRARY_PATH=$(pwd)/build/src \ | |
202 | PYTHONPATH=$(readlink -f build-3/lib.*) \ | |
203 | %{__make} -C doc html \ | |
204 | SPHINXBUILD=sphinx-build-3 | |
6b1bcd9b | 205 | %endif |
79fb52b2 SS |
206 | |
207 | %install | |
208 | rm -rf $RPM_BUILD_ROOT | |
209 | ||
6b1bcd9b JK |
210 | ./waf install -v \ |
211 | --destdir=$RPM_BUILD_ROOT \ | |
212 | --libdir=%{_libdir} \ | |
213 | --prefix=%{_prefix} \ | |
214 | --libexecdir=%{_libexecdir} | |
79fb52b2 | 215 | |
6b1bcd9b JK |
216 | %if %{with python2} |
217 | %py_install | |
218 | %endif | |
219 | ||
220 | %if %{with python3} | |
221 | %py3_install | |
222 | %endif | |
223 | ||
57a509e4 | 224 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/libaubio-doc |
21b138b4 | 225 | |
79fb52b2 SS |
226 | %clean |
227 | rm -rf $RPM_BUILD_ROOT | |
228 | ||
229 | %post -p /sbin/ldconfig | |
230 | %postun -p /sbin/ldconfig | |
231 | ||
232 | %files | |
233 | %defattr(644,root,root,755) | |
6b1bcd9b JK |
234 | %doc AUTHORS ChangeLog README.md |
235 | %attr(755,root,root) %{_libdir}/libaubio.so.5.*.* | |
236 | %attr(755,root,root) %ghost %{_libdir}/libaubio.so.5 | |
79fb52b2 SS |
237 | |
238 | %files devel | |
239 | %defattr(644,root,root,755) | |
21b138b4 | 240 | %attr(755,root,root) %{_libdir}/libaubio.so |
57a509e4 | 241 | %{_includedir}/aubio |
21b138b4 | 242 | %{_pkgconfigdir}/aubio.pc |
79fb52b2 | 243 | |
57a509e4 JB |
244 | %files static |
245 | %defattr(644,root,root,755) | |
246 | %{_libdir}/libaubio.a | |
247 | ||
248 | %files apidocs | |
249 | %defattr(644,root,root,755) | |
250 | %doc doc/_build/html/{_downloads,_static,*.html,*.js} build/api | |
251 | ||
b9d3858a SS |
252 | %files progs |
253 | %defattr(644,root,root,755) | |
57a509e4 | 254 | %attr(755,root,root) %{_bindir}/aubio |
6b1bcd9b | 255 | %attr(755,root,root) %{_bindir}/aubiomfcc |
8eebf965 SS |
256 | %attr(755,root,root) %{_bindir}/aubionotes |
257 | %attr(755,root,root) %{_bindir}/aubioonset | |
6b1bcd9b JK |
258 | %attr(755,root,root) %{_bindir}/aubiopitch |
259 | %attr(755,root,root) %{_bindir}/aubioquiet | |
8eebf965 | 260 | %attr(755,root,root) %{_bindir}/aubiotrack |
57a509e4 | 261 | %{_mandir}/man1/aubio.1* |
6b1bcd9b | 262 | %{_mandir}/man1/aubiomfcc.1* |
21b138b4 JB |
263 | %{_mandir}/man1/aubionotes.1* |
264 | %{_mandir}/man1/aubioonset.1* | |
6b1bcd9b JK |
265 | %{_mandir}/man1/aubiopitch.1* |
266 | %{_mandir}/man1/aubioquiet.1* | |
21b138b4 | 267 | %{_mandir}/man1/aubiotrack.1* |
8eebf965 | 268 | |
6b1bcd9b | 269 | %if %{with python2} |
8eebf965 SS |
270 | %files -n python-aubio |
271 | %defattr(644,root,root,755) | |
21b138b4 | 272 | %dir %{py_sitedir}/aubio |
6b1bcd9b JK |
273 | %{py_sitedir}/aubio/*.py* |
274 | %attr(755,root,root) %{py_sitedir}/aubio/_aubio.so | |
57a509e4 | 275 | %{py_sitedir}/aubio-%{version}-py*.egg-info |
6b1bcd9b JK |
276 | %if %{without python3} |
277 | %attr(755,root,root) %{_bindir}/aubiocut | |
278 | %{_mandir}/man1/aubiocut.1* | |
279 | %endif | |
280 | %endif | |
281 | ||
282 | %if %{with python3} | |
283 | %files -n python3-aubio | |
284 | %defattr(644,root,root,755) | |
285 | %dir %{py3_sitedir}/aubio | |
286 | %{py3_sitedir}/aubio/__pycache__ | |
287 | %{py3_sitedir}/aubio/*.py | |
288 | %attr(755,root,root) %{py3_sitedir}/aubio/_aubio.*.so | |
57a509e4 | 289 | %{py3_sitedir}/aubio-%{version}-py*.egg-info |
21b138b4 | 290 | %attr(755,root,root) %{_bindir}/aubiocut |
21b138b4 | 291 | %{_mandir}/man1/aubiocut.1* |
21b138b4 | 292 | %endif |