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