]> git.pld-linux.org Git - packages/aubio.git/blob - aubio.spec
- upstream fix for ffmpeg 6, rel 6
[packages/aubio.git] / aubio.spec
1 #
2 # Conditional build:
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
7 #
8 %if %{without python3}
9 %undefine       with_apidocs
10 %endif
11 Summary:        aubio - library for audio labelling
12 Summary(pl.UTF-8):      aubio - biblioteka do oznaczania dźwięku
13 Name:           aubio
14 Version:        0.4.9
15 Release:        6
16 License:        GPL v3+
17 Group:          Libraries
18 Source0:        https://aubio.org/pub/%{name}-%{version}.tar.bz2
19 # Source0-md5:  50c9c63b15a2692378af5d602892f16a
20 Patch0:         ffmpeg6.patch
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
24 BuildRequires:  fftw3-single-devel >= 3.0.0
25 BuildRequires:  jack-audio-connection-kit-devel >= 0.15.0
26 BuildRequires:  libsamplerate-devel >= 0.0.15
27 BuildRequires:  libsndfile-devel >= 1.0.4
28 BuildRequires:  pkgconfig
29 BuildRequires:  txt2man
30 %if %{with python2} || %{with python3}
31 BuildRequires:  rpm-pythonprov
32 BuildRequires:  rpmbuild(macros) >= 1.714
33 %endif
34 %if %{with python2}
35 BuildRequires:  python-devel >= 1:2.5
36 BuildRequires:  python-numpy-devel
37 BuildRequires:  python-setuptools
38 %if %{with tests}
39 BuildRequires:  python-pytest
40 %endif
41 %endif
42 %if %{with python3}
43 BuildRequires:  python3-devel >= 1:3.2
44 BuildRequires:  python3-numpy-devel
45 BuildRequires:  python3-setuptools
46 %if %{with tests}
47 BuildRequires:  python3-pytest
48 %endif
49 %endif
50 BuildRequires:  sed >= 4.0
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
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60 %description
61 aubio is a library for audio labelling.
62
63 %description -l pl.UTF-8
64 aubio to biblioteka do oznaczania dźwięku.
65
66 %package devel
67 Summary:        Header files for aubio library
68 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki aubio
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
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
101 %package progs
102 Summary:        Example applications using aubio library
103 Summary(pl.UTF-8):      Przykładowe programy korzystajace z biblioteki aubio
104 Group:          Applications/Sound
105 Requires:       %{name} = %{version}-%{release}
106 Requires:       jack-audio-connection-kit-libs >= 0.15.0
107
108 %description progs
109 A few examples of applications using aubio library:
110 - aubioonset: outputs the onset detected.
111 - aubionotes: uses both onset and pitch to extract symbolic music data
112   from an audio source and emit MIDI like data.
113 - aubiocut: a Python script that takes an input sound and creates one
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.
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
123   symbolicznych danych muzycznych ze źródła dźwięku i stworzenia danych
124   typu MIDI.
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
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.
131
132 %package -n python-aubio
133 Summary:        aubio Python 2 bindings
134 Summary(pl.UTF-8):      Wiązania Pythona 2 do biblioteki aubio
135 Group:          Libraries/Python
136 Requires:       %{name} = %{version}-%{release}
137
138 %description -n python-aubio
139 aubio Python 2 bindings.
140
141 %description -n python-aubio -l pl.UTF-8
142 Wiązania Pythona 2 do biblioteki aubio.
143
144 %package -n python3-aubio
145 Summary:        aubio Python 3 bindings
146 Summary(pl.UTF-8):      Wiązania Pythona 3 do biblioteki aubio
147 Group:          Libraries/Python
148 Requires:       %{name} = %{version}-%{release}
149
150 %description -n python3-aubio
151 aubio Python 3 bindings.
152
153 %description -n python3-aubio -l pl.UTF-8
154 Wiązania Pythona 3 do biblioteki aubio.
155
156 %prep
157 %setup -q
158 %patch0 -p1
159
160 %build
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} \
170         --disable-atlas \
171         --enable-avcodec \
172         %{?with_apidocs:--enable-docs} \
173         --enable-fftw3f \
174         --enable-jack \
175         --enable-samplerate \
176         --enable-sndfile
177
178 ./waf build -v
179
180 %if %{with python2}
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
188 %endif
189
190 %if %{with python3}
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
205 %endif
206
207 %install
208 rm -rf $RPM_BUILD_ROOT
209
210 ./waf install -v \
211         --destdir=$RPM_BUILD_ROOT \
212         --libdir=%{_libdir} \
213         --prefix=%{_prefix} \
214         --libexecdir=%{_libexecdir}
215
216 %if %{with python2}
217 %py_install
218 %endif
219
220 %if %{with python3}
221 %py3_install
222 %endif
223
224 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/libaubio-doc
225
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)
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
237
238 %files devel
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_libdir}/libaubio.so
241 %{_includedir}/aubio
242 %{_pkgconfigdir}/aubio.pc
243
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
252 %files progs
253 %defattr(644,root,root,755)
254 %attr(755,root,root) %{_bindir}/aubio
255 %attr(755,root,root) %{_bindir}/aubiomfcc
256 %attr(755,root,root) %{_bindir}/aubionotes
257 %attr(755,root,root) %{_bindir}/aubioonset
258 %attr(755,root,root) %{_bindir}/aubiopitch
259 %attr(755,root,root) %{_bindir}/aubioquiet
260 %attr(755,root,root) %{_bindir}/aubiotrack
261 %{_mandir}/man1/aubio.1*
262 %{_mandir}/man1/aubiomfcc.1*
263 %{_mandir}/man1/aubionotes.1*
264 %{_mandir}/man1/aubioonset.1*
265 %{_mandir}/man1/aubiopitch.1*
266 %{_mandir}/man1/aubioquiet.1*
267 %{_mandir}/man1/aubiotrack.1*
268
269 %if %{with python2}
270 %files -n python-aubio
271 %defattr(644,root,root,755)
272 %dir %{py_sitedir}/aubio
273 %{py_sitedir}/aubio/*.py*
274 %attr(755,root,root) %{py_sitedir}/aubio/_aubio.so
275 %{py_sitedir}/aubio-%{version}-py*.egg-info
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
289 %{py3_sitedir}/aubio-%{version}-py*.egg-info
290 %attr(755,root,root) %{_bindir}/aubiocut
291 %{_mandir}/man1/aubiocut.1*
292 %endif
This page took 0.238689 seconds and 4 git commands to generate.