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