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