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