- BR: iconv
[packages/asterisk-sounds-extra.git] / asterisk-sounds-extra.spec
1 Summary:        Extra sounds for Asterisk
2 Name:           asterisk-sounds-extra
3 Version:        1.4.11
4 Release:        1
5 License:        CC-BY-SA
6 Group:          Applications/Sound
7 URL:            http://www.asterisk.org/
8 Source0:        http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-alaw-%{version}.tar.gz
9 # Source0-md5:  3a0bfe79e9e83d12a4b519dab1dc4c48
10 Source1:        http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-g722-%{version}.tar.gz
11 # Source1-md5:  be2bfa1ab8e52ed334798d11549653b1
12 Source2:        http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-g729-%{version}.tar.gz
13 # Source2-md5:  ae5e738ab6b2b15834a907cdd982cb77
14 Source3:        http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-gsm-%{version}.tar.gz
15 # Source3-md5:  5479cb4cb81d678304d96f35e4933a11
16 Source4:        http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-siren7-%{version}.tar.gz
17 # Source4-md5:  38326a003d905fea32f4cad3b075ee0d
18 Source5:        http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-siren14-%{version}.tar.gz
19 # Source5-md5:  cf518c3b4e8293680377a312d365e095
20 Source6:        http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-sln16-%{version}.tar.gz
21 # Source6-md5:  1ed34b754c9729f45a290441d458eede
22 Source7:        http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-ulaw-%{version}.tar.gz
23 # Source7-md5:  556a9b77235194644d6a7f7068d3ddaa
24 Source8:        http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-wav-%{version}.tar.gz
25 # Source8-md5:  1dff0265f8051d4ee44d6772bd93d528
26 Source20:       http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-fr-alaw-%{version}.tar.gz
27 # Source20-md5: 6423eeab5fa32797f318147095bdfbb1
28 Source21:       http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-fr-g722-%{version}.tar.gz
29 # Source21-md5: 3253a6c1ff07301f63b069aaa911c132
30 Source22:       http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-fr-g729-%{version}.tar.gz
31 # Source22-md5: a06e5e08335df9d2ec2617095998b638
32 Source23:       http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-fr-gsm-%{version}.tar.gz
33 # Source23-md5: bd72c1f57f9e1ab64ee109612aa2ae7b
34 Source24:       http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-fr-siren7-%{version}.tar.gz
35 # Source24-md5: 64b4115558eeb1d0d501f9da96852eff
36 Source25:       http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-fr-siren14-%{version}.tar.gz
37 # Source25-md5: 4e1daf6f7f1e74447719ef070cdcab39
38 Source26:       http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-fr-sln16-%{version}.tar.gz
39 # Source26-md5: 76e559d433fba3b0017d4a5635319b86
40 Source27:       http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-fr-ulaw-%{version}.tar.gz
41 # Source27-md5: 7b2050a9e2363104b12f7394ca2db8d1
42 Source28:       http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-fr-wav-%{version}.tar.gz
43 # Source28-md5: e7836238d8d74dcecf72f384731217f9
44 BuildRequires:  iconv
45 BuildArch:      noarch
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %define         sounds_dir      %{_datadir}/asterisk/sounds
49
50 %description
51 Extra sound files for Asterisk.
52
53 %package en
54 Summary:        Extra English sound files for Asterisk
55 Group:          Applications/Sound
56 Requires:       asterisk >= 1.4.0
57
58 %description en
59 Extra English sound files for Asterisk.
60
61 %package en-alaw
62 Summary:        Extra English ALAW sound files for Asterisk
63 Group:          Applications/Sound
64 Requires:       asterisk >= 1.4.0
65 Requires:       asterisk-sounds-extra-en = %{version}-%{release}
66 Provides:       asterisk-sounds-extra = %{version}-%{release}
67
68 %description en-alaw
69 Extra English ALAW sound files for Asterisk.
70
71 %package en-g722
72 Summary:        Extra English G.722 sound files for Asterisk
73 Group:          Applications/Sound
74 Requires:       asterisk >= 1.4.0
75 Requires:       asterisk-sounds-extra-en = %{version}-%{release}
76 Provides:       asterisk-sounds-extra = %{version}-%{release}
77
78 %description en-g722
79 Extra English G.722 sound files for Asterisk.
80
81 %package en-g729
82 Summary:        Extra English G.729 sound files for Asterisk
83 Group:          Applications/Sound
84 Requires:       asterisk >= 1.4.0
85 Requires:       asterisk-sounds-extra-en = %{version}-%{release}
86 Provides:       asterisk-sounds-extra = %{version}-%{release}
87
88 %description en-g729
89 Extra English G.729 sound files for Asterisk.
90
91 %package en-gsm
92 Summary:        Extra English GSM sound files for Asterisk
93 Group:          Applications/Sound
94 Requires:       asterisk >= 1.4.0
95 Requires:       asterisk-sounds-extra-en = %{version}-%{release}
96 Provides:       asterisk-sounds-extra = %{version}-%{release}
97
98 %description en-gsm
99 Extra English GSM sound files for Asterisk.
100
101 %package en-siren7
102 Summary:        Extra English Siren7 sound files for Asterisk
103 Group:          Applications/Sound
104 Requires:       asterisk >= 1.4.0
105 Requires:       asterisk-sounds-extra-en = %{version}-%{release}
106 Provides:       asterisk-sounds-extra = %{version}-%{release}
107
108 %description en-siren7
109 Extra English Siren7 sound files for Asterisk.
110
111 %package en-siren14
112 Summary:        Extra English GSM sound files for Asterisk
113 Group:          Applications/Sound
114 Requires:       asterisk >= 1.4.0
115 Requires:       asterisk-sounds-extra-en = %{version}-%{release}
116 Provides:       asterisk-sounds-extra = %{version}-%{release}
117
118 %description en-siren14
119 Extra English Siren14 sound files for Asterisk.
120
121 %package en-sln16
122 Summary:        Extra English SLN16 sound files for Asterisk
123 Group:          Applications/Sound
124 Requires:       asterisk >= 1.4.0
125 Requires:       asterisk-sounds-extra-en = %{version}-%{release}
126 Provides:       asterisk-sounds-extra = %{version}-%{release}
127
128 %description en-sln16
129 Extra English SLN16 sound files for Asterisk.
130
131 %package en-ulaw
132 Summary:        Extra English ULAW sound files for Asterisk
133 Group:          Applications/Sound
134 Requires:       asterisk >= 1.4.0
135 Requires:       asterisk-sounds-extra-en = %{version}-%{release}
136 Provides:       asterisk-sounds-extra = %{version}-%{release}
137
138 %description en-ulaw
139 Extra English ULAW sound files for Asterisk.
140
141 %package en-wav
142 Summary:        Extra English WAV sound files for Asterisk
143 Group:          Applications/Sound
144 Requires:       asterisk >= 1.4.0
145 Requires:       asterisk-sounds-extra-en = %{version}-%{release}
146 Provides:       asterisk-sounds-extra = %{version}-%{release}
147
148 %description en-wav
149 Extra English WAV sound files for Asterisk.
150
151 %package fr
152 Summary:        Extra English sound files for Asterisk
153 Group:          Applications/Sound
154 Requires:       asterisk >= 1.4.0
155
156 %description fr
157 Extra French sound files for Asterisk.
158
159 %package fr-alaw
160 Summary:        Extra French ALAW sound files for Asterisk
161 Group:          Applications/Sound
162 Requires:       asterisk >= 1.4.0
163 Requires:       asterisk-sounds-extra-fr = %{version}-%{release}
164 Provides:       asterisk-sounds-extra = %{version}-%{release}
165
166 %description fr-alaw
167 Extra French ALAW sound files for Asterisk.
168
169 %package fr-g722
170 Summary:        Extra French G.722 sound files for Asterisk
171 Group:          Applications/Sound
172 Requires:       asterisk >= 1.4.0
173 Requires:       asterisk-sounds-extra-fr = %{version}-%{release}
174 Provides:       asterisk-sounds-extra = %{version}-%{release}
175
176 %description fr-g722
177 Extra French G.722 sound files for Asterisk.
178
179 %package fr-g729
180 Summary:        Extra French G.729 sound files for Asterisk
181 Group:          Applications/Sound
182 Requires:       asterisk >= 1.4.0
183 Requires:       asterisk-sounds-extra-fr = %{version}-%{release}
184 Provides:       asterisk-sounds-extra = %{version}-%{release}
185
186 %description fr-g729
187 Extra French G.729 sound files for Asterisk.
188
189 %package fr-gsm
190 Summary:        Extra French GSM sound files for Asterisk
191 Group:          Applications/Sound
192 Requires:       asterisk >= 1.4.0
193 Requires:       asterisk-sounds-extra-fr = %{version}-%{release}
194 Provides:       asterisk-sounds-extra = %{version}-%{release}
195
196 %description fr-gsm
197 Extra French GSM sound files for Asterisk.
198
199 %package fr-siren7
200 Summary:        Extra French Siren7 sound files for Asterisk
201 Group:          Applications/Sound
202 Requires:       asterisk >= 1.4.0
203 Requires:       asterisk-sounds-extra-fr = %{version}-%{release}
204 Provides:       asterisk-sounds-extra = %{version}-%{release}
205
206 %description fr-siren7
207 Extra French Siren7 sound files for Asterisk.
208
209 %package fr-siren14
210 Summary:        Extra French Siren14 sound files for Asterisk
211 Group:          Applications/Sound
212 Requires:       asterisk >= 1.4.0
213 Requires:       asterisk-sounds-extra-fr = %{version}-%{release}
214 Provides:       asterisk-sounds-extra = %{version}-%{release}
215
216 %description fr-siren14
217 Extra French Siren14 sound files for Asterisk.
218
219 %package fr-sln16
220 Summary:        Extra French SLN16 sound files for Asterisk
221 Group:          Applications/Sound
222 Requires:       asterisk >= 1.4.0
223 Requires:       asterisk-sounds-extra-fr = %{version}-%{release}
224 Provides:       asterisk-sounds-extra = %{version}-%{release}
225
226 %description fr-sln16
227 Extra French SLN16 sound files for Asterisk.
228
229 %package fr-ulaw
230 Summary:        Extra French ULAW sound files for Asterisk
231 Group:          Applications/Sound
232 Requires:       asterisk >= 1.4.0
233 Requires:       asterisk-sounds-extra-fr = %{version}-%{release}
234 Provides:       asterisk-sounds-extra = %{version}-%{release}
235
236 %description fr-ulaw
237 Extra French ULAW sound files for Asterisk.
238
239 %package fr-wav
240 Summary:        Extra French WAV sound files for Asterisk
241 Group:          Applications/Sound
242 Requires:       asterisk >= 1.4.0
243 Requires:       asterisk-sounds-extra-fr = %{version}-%{release}
244 Provides:       asterisk-sounds-extra = %{version}-%{release}
245
246 %description fr-wav
247 Extra French WAV sound files for Asterisk.
248
249 %prep
250 %setup -qcT
251
252 if [ -f /proc/$PPID/environ ]; then
253         # import env from parent process
254         unset LC_ALL
255         export $(tr '\0' '\n' < /proc/$PPID/environ | grep -E '^(LC_|LANG)')
256         if locale | grep -Eqi 'utf-?8'; then
257                 echo >&2 "You should re-run rpmbuild with LANG=C LC_ALL=C, see https://bugs.launchpad.net/pld-linux/+bug/501593"
258                 exit 1
259         fi
260 fi
261
262 for file in %{S:0} %{S:1} %{S:2} %{S:3} %{S:4} %{S:5} %{S:6} %{S:7} %{S:8}; do
263         tar --list --file $file | grep -E '.(alaw|g722|g729|gsm|siren7|siren14|sln16|ulaw|wav)$' | sed -e 's!^!%{sounds_dir}/!' > `basename $file .tar.gz`.list
264         tar --extract --directory . --file $file
265 done
266
267 mkdir fr
268 for file in %{S:20} %{S:21} %{S:22} %{S:23} %{S:24} %{S:25} %{S:26} %{S:27} %{S:28}; do
269         tar --list --file $file | grep -E '.(alaw|g722|g729|gsm|siren7|siren14|sln16|ulaw|wav)$' | sed -e 's!^!%{sounds_dir}/fr/!' > `basename $file .tar.gz`.list
270         tar --extract --directory ./fr/  --file $file
271 done
272
273 iconv -f iso-8859-1 -t utf-8 < fr/extra-sounds-fr.txt > fr/extra-sounds-fr.txt.tmp
274 touch --reference fr/extra-sounds-fr.txt fr/extra-sounds-fr.txt.tmp
275 mv fr/extra-sounds-fr.txt.tmp fr/extra-sounds-fr.txt
276
277 %install
278 rm -rf $RPM_BUILD_ROOT
279 install -d $RPM_BUILD_ROOT%{sounds_dir}/{,fr}
280
281 for file in $(cat *.list | sed -e 's!^%{sounds_dir}/!!'); do
282         install -d $RPM_BUILD_ROOT%{sounds_dir}/$(dirname $file)
283         cp -p $file $RPM_BUILD_ROOT%{sounds_dir}/$file
284 done
285
286 %clean
287 rm -rf $RPM_BUILD_ROOT
288
289 %files en
290 %defattr(644,root,root,755)
291 %doc extra-sounds-en.txt
292 %doc CHANGES-asterisk-extra-en-%{version}
293 %dir %{sounds_dir}/ha
294 %dir %{sounds_dir}/wx
295
296 %files en-alaw -f asterisk-extra-sounds-en-alaw-%{version}.list
297 %defattr(644,root,root,755)
298 %doc asterisk-extra-sounds-en-alaw-%{version}.list
299
300 %files en-g722 -f asterisk-extra-sounds-en-g722-%{version}.list
301 %defattr(644,root,root,755)
302 %doc asterisk-extra-sounds-en-g722-%{version}.list
303
304 %files en-g729 -f asterisk-extra-sounds-en-g729-%{version}.list
305 %defattr(644,root,root,755)
306 %doc asterisk-extra-sounds-en-g729-%{version}.list
307
308 %files en-gsm -f asterisk-extra-sounds-en-gsm-%{version}.list
309 %defattr(644,root,root,755)
310 %doc asterisk-extra-sounds-en-gsm-%{version}.list
311
312 %files en-siren7 -f asterisk-extra-sounds-en-siren7-%{version}.list
313 %defattr(644,root,root,755)
314 %doc asterisk-extra-sounds-en-siren7-%{version}.list
315
316 %files en-siren14 -f asterisk-extra-sounds-en-siren14-%{version}.list
317 %defattr(644,root,root,755)
318 %doc asterisk-extra-sounds-en-gsm-%{version}.list
319
320 %files en-sln16 -f asterisk-extra-sounds-en-sln16-%{version}.list
321 %defattr(644,root,root,755)
322 %doc asterisk-extra-sounds-en-sln16-%{version}.list
323
324 %files en-ulaw -f asterisk-extra-sounds-en-ulaw-%{version}.list
325 %defattr(644,root,root,755)
326 %doc asterisk-extra-sounds-en-ulaw-%{version}.list
327
328 %files en-wav -f asterisk-extra-sounds-en-wav-%{version}.list
329 %defattr(644,root,root,755)
330 %doc asterisk-extra-sounds-en-wav-%{version}.list
331
332 %files fr
333 %defattr(644,root,root,755)
334 %doc fr/extra-sounds-fr.txt
335 %doc fr/CHANGES-asterisk-extra-fr-%{version}
336 %doc fr/CHANGES-asterisk-extra-fr-1.4.txt
337 %doc fr/CREDITS-core-extra-fr.txt
338 %doc fr/MISSING.txt
339 %dir %{sounds_dir}/fr/ha
340 %dir %{sounds_dir}/fr/wx
341
342 %files fr-alaw -f asterisk-extra-sounds-fr-alaw-%{version}.list
343 %defattr(644,root,root,755)
344 %doc asterisk-extra-sounds-fr-alaw-%{version}.list
345
346 %files fr-g722 -f asterisk-extra-sounds-fr-g722-%{version}.list
347 %defattr(644,root,root,755)
348 %doc asterisk-extra-sounds-fr-g722-%{version}.list
349
350 %files fr-g729 -f asterisk-extra-sounds-fr-g729-%{version}.list
351 %defattr(644,root,root,755)
352 %doc asterisk-extra-sounds-fr-g729-%{version}.list
353
354 %files fr-gsm -f asterisk-extra-sounds-fr-gsm-%{version}.list
355 %defattr(644,root,root,755)
356 %doc asterisk-extra-sounds-fr-gsm-%{version}.list
357
358 %files fr-siren7 -f asterisk-extra-sounds-fr-siren7-%{version}.list
359 %defattr(644,root,root,755)
360 %doc asterisk-extra-sounds-fr-siren7-%{version}.list
361
362 %files fr-siren14 -f asterisk-extra-sounds-fr-siren14-%{version}.list
363 %defattr(644,root,root,755)
364 %doc asterisk-extra-sounds-fr-siren14-%{version}.list
365
366 %files fr-sln16 -f asterisk-extra-sounds-fr-sln16-%{version}.list
367 %defattr(644,root,root,755)
368 %doc asterisk-extra-sounds-fr-sln16-%{version}.list
369
370 %files fr-ulaw -f asterisk-extra-sounds-fr-ulaw-%{version}.list
371 %defattr(644,root,root,755)
372 %doc asterisk-extra-sounds-fr-ulaw-%{version}.list
373
374 %files fr-wav -f asterisk-extra-sounds-fr-wav-%{version}.list
375 %defattr(644,root,root,755)
376 %doc asterisk-extra-sounds-fr-wav-%{version}.list
This page took 0.10319 seconds and 3 git commands to generate.