]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without alsa # ALSA support | |
4 | %bcond_with amr # AMR codecs (AMR-NB and AMR-WB) support | |
5 | # | |
6 | Summary: A general purpose sound file conversion tool | |
7 | Summary(de.UTF-8): Mehrzweck-Sounddatei-Konvertierungs-Tool | |
8 | Summary(es.UTF-8): Herramienta para conversión de archivos de sonido | |
9 | Summary(fr.UTF-8): outil général de conversion de fichiers son | |
10 | Summary(pl.UTF-8): Program do konwersji plików dźwiękowych | |
11 | Summary(pt_BR.UTF-8): Ferramenta para conversão de arquivos de som | |
12 | Summary(ru.UTF-8): Утилита общего назначения для работы со звуковыми файлами | |
13 | Summary(tr.UTF-8): Genel amaçlı ses dosyası çevirme aracı | |
14 | Summary(uk.UTF-8): Утиліта загального призначення для роботи із звуковими файлами | |
15 | Name: sox | |
16 | Version: 14.1.0 | |
17 | Release: 4 | |
18 | License: GPL v2+ (sox), LGPL v2+ (libsox) | |
19 | Group: Applications/Sound | |
20 | Source0: http://dl.sourceforge.net/sox/%{name}-%{version}.tar.gz | |
21 | # Source0-md5: b8e2cb3d615d3830347a0948dd8b74a8 | |
22 | Patch0: %{name}-system-lpc10.patch | |
23 | Patch1: %{name}-ffmpeg.patch | |
24 | URL: http://sox.sourceforge.net/ | |
25 | %{?with_alsa:BuildRequires: alsa-lib-devel} | |
26 | %{?with_amr:BuildRequires: amrnb-devel} | |
27 | %{?with_amr:BuildRequires: amrwb-devel} | |
28 | BuildRequires: autoconf >= 2.50 | |
29 | BuildRequires: automake | |
30 | BuildRequires: ffmpeg-devel >= 0.4.9-4.20080930.1 | |
31 | BuildRequires: flac-devel | |
32 | BuildRequires: ladspa-devel | |
33 | BuildRequires: lame-libs-devel | |
34 | BuildRequires: libao-devel | |
35 | BuildRequires: libgsm-devel | |
36 | BuildRequires: libltdl-devel | |
37 | BuildRequires: libmad-devel | |
38 | BuildRequires: libpng-devel | |
39 | BuildRequires: libsamplerate-devel | |
40 | BuildRequires: libsndfile-devel | |
41 | BuildRequires: libtool | |
42 | BuildRequires: libvorbis-devel >= 1:1.0 | |
43 | BuildRequires: lpc10-devel | |
44 | BuildRequires: wavpack-devel | |
45 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
46 | ||
47 | %description | |
48 | SoX (Sound eXchange) is a sound file format converter for Linux, UNIX | |
49 | and DOS PCs. The self-described 'Swiss Army knife of sound tools,' SoX | |
50 | can convert between many different digitized sound formats and perform | |
51 | simple sound manipulation functions, including sound effects. | |
52 | ||
53 | Install the sox package if you'd like to convert sound file formats or | |
54 | manipulate some sounds. | |
55 | ||
56 | %description -l es.UTF-8 | |
57 | sox se autodenomina "navaja suiza de las herramientas de sonido". | |
58 | Entiende varios formatos de sonidos digitalizados, pudiendo hacer | |
59 | conversiones entre estos formatos y desempeñar funciones sencillas de | |
60 | manejo de sonido. | |
61 | ||
62 | %description -l pl.UTF-8 | |
63 | SoX (Sound eXchange) jest konwerterem formatów plików dźwiękowych dla | |
64 | Linuksa, Uniksa i Dosa. SoX może wykonywać konwersję między wieloma | |
65 | formatami cyfrowego dźwięku. Może także dokonywać prostych manipulacji | |
66 | na dźwięku, wliczając w to różne efekty dźwiękowe. | |
67 | ||
68 | %description -l ru.UTF-8 | |
69 | Как говорится в документации, "швейцарский армейский нож звуковых | |
70 | утилит", sox умеет конвертировать звуковые файлы самых разнообразных | |
71 | форматов и производить несложную их обработку. С прилагаемым скриптом | |
72 | также может быть использован для проигрывания звуковых файлов. | |
73 | ||
74 | %description -l pt_BR.UTF-8 | |
75 | O sox se autodenomina "canivete suíço das ferramentas de som". Ele | |
76 | entende vários formatos de sons digitalizados, podendo fazer | |
77 | conversões entre esses formatos e desempenhar funções simples de | |
78 | manipulação de som. | |
79 | ||
80 | %description -l uk.UTF-8 | |
81 | В документації цей пакет названо "швейцарським армійським ножиком | |
82 | звукових утиліт". Він вміє конвертувати звукові файли | |
83 | найрізноманітніших форматів та виконувати нескладну їх обробку. В | |
84 | пакет входить скрипт, який можна використовувати для програвання | |
85 | звукових файлів. | |
86 | ||
87 | %package devel | |
88 | Summary: Header files for the SoX sound file format converter library | |
89 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki SoX do konwertowania plików dźwiękowych | |
90 | Group: Development/Libraries | |
91 | Requires: %{name} = %{version}-%{release} | |
92 | ||
93 | %description devel | |
94 | This package contains the header files needed for compiling | |
95 | applications which will use the SoX sound file format converter. | |
96 | ||
97 | %description devel -l pl.UTF-8 | |
98 | Ten pakiet zawiera pliki nagłówkowe potrzebne do kompilacji aplikacji, | |
99 | wykorzystujących konwerter formatów plików dźwiękowych SoX. | |
100 | ||
101 | %package static | |
102 | Summary: Static SoX sound file format converter library | |
103 | Summary(pl.UTF-8): Biblioteka statyczna SoX do konwertowania plików dźwiękowych | |
104 | Group: Development/Libraries | |
105 | Requires: %{name}-devel = %{version}-%{release} | |
106 | ||
107 | %description static | |
108 | Static SoX sound file format converter library. | |
109 | ||
110 | %description static -l pl.UTF-8 | |
111 | Biblioteka statyczna SoX do konwertowania plików dźwiękowych. | |
112 | ||
113 | %package fmt-amr | |
114 | Summary: SoX modules with AMR-NB and AMR-WB format support | |
115 | Summary(pl.UTF-8): Moduły SoX obsługujące formaty AMR-NB i AMR-WB | |
116 | Group: Libraries | |
117 | Requires: %{name} = %{version}-%{release} | |
118 | ||
119 | %description fmt-amr | |
120 | SoX modules with AMR-NB and AMR-WB format support. | |
121 | ||
122 | %description fmt-amr -l pl.UTF-8 | |
123 | Moduły SoX obsługujące formaty AMR-NB i AMR-WB. | |
124 | ||
125 | %package fmt-ffmpeg | |
126 | Summary: SoX module which uses ffmpeg codecs | |
127 | Summary(pl.UTF-8): Moduł SoX wykorzystujący kodeki ffmpeg | |
128 | # ffmpeg in PLD is compiled as GPL | |
129 | License: GPL v2+ | |
130 | Group: Libraries | |
131 | Requires: %{name} = %{version}-%{release} | |
132 | ||
133 | %description fmt-ffmpeg | |
134 | SoX module which uses ffmpeg codecs. | |
135 | ||
136 | %description fmt-ffmpeg -l pl.UTF-8 | |
137 | Moduł SoX wykorzystujący kodeki ffmpeg. | |
138 | ||
139 | %package fmt-lpc10 | |
140 | Summary: SoX module with LPC10 format support | |
141 | Summary(pl.UTF-8): Moduł SoX obsługujący format LPC10 | |
142 | Group: Libraries | |
143 | Requires: %{name} = %{version}-%{release} | |
144 | ||
145 | %description fmt-lpc10 | |
146 | SoX module with LPC10 format support. | |
147 | ||
148 | %description fmt-lpc10 -l pl.UTF-8 | |
149 | Moduł SoX obsługujący format LPC10. | |
150 | ||
151 | %package fmt-mp3 | |
152 | Summary: SoX module with MP3 format support | |
153 | Summary(pl.UTF-8): Moduł SoX obsługujący format MP3 | |
154 | # libmad is GPLed, libmp3lame can contain GPL parts (and in PLD it does) | |
155 | License: GPL v2+ | |
156 | Group: Libraries | |
157 | ||
158 | %description fmt-mp3 | |
159 | SoX module with MP3 format support. It uses libmad for decoding and | |
160 | LAME for encoding. | |
161 | ||
162 | %description fmt-mp3 -l pl.UTF-8 | |
163 | Moduł SoX obsługujący format MP3. Wykorzystuje do dekodowania | |
164 | bibliotekę libmad, a do kodowania - LAME. | |
165 | ||
166 | %prep | |
167 | %setup -q | |
168 | %patch0 -p1 | |
169 | %patch1 -p1 | |
170 | ||
171 | %build | |
172 | %{__libtoolize} | |
173 | %{__aclocal} -I m4 | |
174 | %{__autoconf} | |
175 | %{__autoheader} | |
176 | %{__automake} | |
177 | %configure \ | |
178 | --enable-ltdl-install=no \ | |
179 | %{!?with_alsa:--disable-alsa-dsp} \ | |
180 | %{!?with_amr:--without-amr-nb --without-amr-wb} | |
181 | ||
182 | %{__make} | |
183 | ||
184 | %install | |
185 | rm -rf $RPM_BUILD_ROOT | |
186 | ||
187 | %{__make} install \ | |
188 | DESTDIR=$RPM_BUILD_ROOT | |
189 | ||
190 | echo "#!/bin/sh" > $RPM_BUILD_ROOT%{_bindir}/soxplay | |
191 | echo "" >> $RPM_BUILD_ROOT%{_bindir}/soxplay | |
192 | echo '%{_bindir}/sox $1 -t .au - > /dev/audio' >> $RPM_BUILD_ROOT%{_bindir}/soxplay | |
193 | ||
194 | rm -f $RPM_BUILD_ROOT%{_mandir}/man1/{play,rec}.1 | |
195 | echo '.so sox.1' > $RPM_BUILD_ROOT%{_mandir}/man1/play.1 | |
196 | echo '.so sox.1' > $RPM_BUILD_ROOT%{_mandir}/man1/rec.1 | |
197 | ||
198 | rm -f $RPM_BUILD_ROOT%{_libdir}/sox/*.{la,a} | |
199 | ||
200 | %clean | |
201 | rm -rf $RPM_BUILD_ROOT | |
202 | ||
203 | %post -p /sbin/ldconfig | |
204 | %postun -p /sbin/ldconfig | |
205 | ||
206 | %files | |
207 | %defattr(644,root,root,755) | |
208 | # COPYING contains only notes, not GPL/LGPL texts | |
209 | %doc AUTHORS COPYING ChangeLog README src/monkey.* | |
210 | %attr(755,root,root) %{_bindir}/play | |
211 | %attr(755,root,root) %{_bindir}/rec | |
212 | %attr(755,root,root) %{_bindir}/sox | |
213 | %attr(755,root,root) %{_bindir}/soxi | |
214 | %attr(755,root,root) %{_bindir}/soxplay | |
215 | %attr(755,root,root) %{_libdir}/libsfx.so.*.*.* | |
216 | %attr(755,root,root) %ghost %{_libdir}/libsfx.so.0 | |
217 | %attr(755,root,root) %{_libdir}/libsox.so.*.*.* | |
218 | %attr(755,root,root) %ghost %{_libdir}/libsox.so.0 | |
219 | %dir %{_libdir}/sox | |
220 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_aifc.so* | |
221 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_aiff.so* | |
222 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_al.so* | |
223 | %if %{with alsa} | |
224 | # R: alsa-lib | |
225 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_alsa.so* | |
226 | %endif | |
227 | # R: libao | |
228 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_ao.so* | |
229 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_au.so* | |
230 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_avr.so* | |
231 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_caf.so* | |
232 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_cdr.so* | |
233 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_cvsd.so* | |
234 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_dat.so* | |
235 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_dvms.so* | |
236 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_f4.so* | |
237 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_f8.so* | |
238 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_fap.so* | |
239 | # R: flac | |
240 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_flac.so* | |
241 | # R: libgsm | |
242 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_gsm.so* | |
243 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_hcom.so* | |
244 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_htk.so* | |
245 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_ima.so* | |
246 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_la.so* | |
247 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_lu.so* | |
248 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_maud.so* | |
249 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_mat4.so* | |
250 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_mat5.so* | |
251 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_nul.so* | |
252 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_oss.so* | |
253 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_paf.so* | |
254 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_prc.so* | |
255 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_pvf.so* | |
256 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_raw.so* | |
257 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_s1.so* | |
258 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_s2.so* | |
259 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_s3.so* | |
260 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_s4.so* | |
261 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_sf.so* | |
262 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_sd2.so* | |
263 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_smp.so* | |
264 | # R: libsndfile | |
265 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_sndfile.so* | |
266 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_sounder.so* | |
267 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_soundtool.so* | |
268 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_sphere.so* | |
269 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_svx.so* | |
270 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_txw.so* | |
271 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_u1.so* | |
272 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_u2.so* | |
273 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_u3.so* | |
274 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_u4.so* | |
275 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_ul.so* | |
276 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_voc.so* | |
277 | # R: libogg libvorbis | |
278 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_vorbis.so* | |
279 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_vox.so* | |
280 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_w64.so* | |
281 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_wav.so* | |
282 | # R: wavpack | |
283 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_wavpack.so* | |
284 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_wve.so* | |
285 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_xa.so* | |
286 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_xi.so* | |
287 | %{_mandir}/man1/play.1* | |
288 | %{_mandir}/man1/rec.1* | |
289 | %{_mandir}/man1/sox.1* | |
290 | %{_mandir}/man1/soxi.1* | |
291 | %{_mandir}/man7/soxeffect.7* | |
292 | %{_mandir}/man7/soxformat.7* | |
293 | ||
294 | %files devel | |
295 | %defattr(644,root,root,755) | |
296 | %attr(755,root,root) %{_libdir}/libsfx.so | |
297 | %attr(755,root,root) %{_libdir}/libsox.so | |
298 | %{_libdir}/libsfx.la | |
299 | %{_libdir}/libsox.la | |
300 | %{_includedir}/sox.h | |
301 | %{_includedir}/soxstdint.h | |
302 | %{_pkgconfigdir}/sox.pc | |
303 | %{_mandir}/man3/libsox.3* | |
304 | ||
305 | %files static | |
306 | %defattr(644,root,root,755) | |
307 | %{_libdir}/libsfx.a | |
308 | %{_libdir}/libsox.a | |
309 | ||
310 | %if %{with amr} | |
311 | %files fmt-amr | |
312 | %defattr(644,root,root,755) | |
313 | # R: amr-nb | |
314 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_amr_nb.so* | |
315 | # R: amr-wb | |
316 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_amr_wb.so* | |
317 | %endif | |
318 | ||
319 | %files fmt-ffmpeg | |
320 | %defattr(644,root,root,755) | |
321 | # R: ffmpeg-libs | |
322 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_ffmpeg.so* | |
323 | ||
324 | %files fmt-lpc10 | |
325 | %defattr(644,root,root,755) | |
326 | # R: lpc10 | |
327 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_lpc10.so* | |
328 | ||
329 | %files fmt-mp3 | |
330 | %defattr(644,root,root,755) | |
331 | # R: lame-libs libmad | |
332 | %attr(755,root,root) %{_libdir}/sox/libsox_fmt_mp3.so* |