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