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