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