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