Version: 1.5
[packages/asterisk-sounds-extra.git] / asterisk-sounds-extra.spec
CommitLineData
563490f8
JK
1Summary: Extra sounds for Asterisk
2Name: asterisk-sounds-extra
29a431fd 3Version: 1.5
563490f8
JK
4Release: 1
5License: CC-BY-SA
6Group: Applications/Sound
7URL: http://www.asterisk.org/
8Source0: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-alaw-%{version}.tar.gz
29a431fd 9# Source0-md5: bdba5cb16c8b63bc8d3d028bf11eb0c2
563490f8 10Source1: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-g722-%{version}.tar.gz
29a431fd 11# Source1-md5: 73a7e043ff96b14888f8555322f1e714
563490f8 12Source2: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-g729-%{version}.tar.gz
29a431fd 13# Source2-md5: 4fde4b0e4e18d376dfe12421dfce98a5
563490f8 14Source3: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-gsm-%{version}.tar.gz
29a431fd 15# Source3-md5: 49f2baefc7aad424f30ff18d883501d2
563490f8 16Source4: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-siren7-%{version}.tar.gz
29a431fd 17# Source4-md5: ccef2e73071478ce9a1b21ce2a973369
563490f8 18Source5: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-siren14-%{version}.tar.gz
29a431fd 19# Source5-md5: 4d5d38cb5c4fefa814a0ff638091fde3
563490f8 20Source6: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-sln16-%{version}.tar.gz
29a431fd 21# Source6-md5: 21de173f4fe8f3d304da7933b10528b3
563490f8 22Source7: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-ulaw-%{version}.tar.gz
29a431fd 23# Source7-md5: 2a93dce31f413abd1170f2b444a1fd41
563490f8 24Source8: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-wav-%{version}.tar.gz
29a431fd 25# Source8-md5: db8820abddccf16819c9f22e9f649ac3
563490f8 26Source20: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-fr-alaw-%{version}.tar.gz
29a431fd 27# Source20-md5: c674c8a48db5cd5ffab976472dcb94f6
563490f8 28Source21: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-fr-g722-%{version}.tar.gz
29a431fd 29# Source21-md5: 0a1d2b337fdbbfc991d87900a4695ef7
563490f8 30Source22: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-fr-g729-%{version}.tar.gz
29a431fd 31# Source22-md5: 657cc123af57521bc0acaac0bf4fe3dc
563490f8 32Source23: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-fr-gsm-%{version}.tar.gz
29a431fd 33# Source23-md5: 8bbdb050e481fe490fd5e0aa92ac4c9f
563490f8 34Source24: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-fr-siren7-%{version}.tar.gz
29a431fd 35# Source24-md5: e8cd10d86ffc902b0d6080aa37de7fe4
563490f8 36Source25: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-fr-siren14-%{version}.tar.gz
29a431fd 37# Source25-md5: 08c64e164fd121b030baba499df9ddb0
563490f8 38Source26: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-fr-sln16-%{version}.tar.gz
29a431fd 39# Source26-md5: 94497e330128fd1378694dcb4217a7d2
563490f8 40Source27: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-fr-ulaw-%{version}.tar.gz
29a431fd 41# Source27-md5: 0dd6a6eb77a5062cb7fc9a1c53749940
563490f8 42Source28: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-fr-wav-%{version}.tar.gz
29a431fd 43# Source28-md5: 4e280c91ce77802cdfce15afaed860c8
dbd38277 44BuildRequires: iconv
563490f8
JK
45BuildArch: noarch
46BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48%define sounds_dir %{_datadir}/asterisk/sounds
49
50%description
51Extra sound files for Asterisk.
52
53%package en
54Summary: Extra English sound files for Asterisk
55Group: Applications/Sound
56Requires: asterisk >= 1.4.0
57
58%description en
59Extra English sound files for Asterisk.
60
61%package en-alaw
62Summary: Extra English ALAW sound files for Asterisk
63Group: Applications/Sound
64Requires: asterisk >= 1.4.0
65Requires: asterisk-sounds-extra-en = %{version}-%{release}
66Provides: asterisk-sounds-extra = %{version}-%{release}
67
68%description en-alaw
69Extra English ALAW sound files for Asterisk.
70
71%package en-g722
72Summary: Extra English G.722 sound files for Asterisk
73Group: Applications/Sound
74Requires: asterisk >= 1.4.0
75Requires: asterisk-sounds-extra-en = %{version}-%{release}
76Provides: asterisk-sounds-extra = %{version}-%{release}
77
78%description en-g722
79Extra English G.722 sound files for Asterisk.
80
81%package en-g729
82Summary: Extra English G.729 sound files for Asterisk
83Group: Applications/Sound
84Requires: asterisk >= 1.4.0
85Requires: asterisk-sounds-extra-en = %{version}-%{release}
86Provides: asterisk-sounds-extra = %{version}-%{release}
87
88%description en-g729
89Extra English G.729 sound files for Asterisk.
90
91%package en-gsm
92Summary: Extra English GSM sound files for Asterisk
93Group: Applications/Sound
94Requires: asterisk >= 1.4.0
95Requires: asterisk-sounds-extra-en = %{version}-%{release}
96Provides: asterisk-sounds-extra = %{version}-%{release}
97
98%description en-gsm
99Extra English GSM sound files for Asterisk.
100
101%package en-siren7
102Summary: Extra English Siren7 sound files for Asterisk
103Group: Applications/Sound
104Requires: asterisk >= 1.4.0
105Requires: asterisk-sounds-extra-en = %{version}-%{release}
106Provides: asterisk-sounds-extra = %{version}-%{release}
107
108%description en-siren7
109Extra English Siren7 sound files for Asterisk.
110
111%package en-siren14
112Summary: Extra English GSM sound files for Asterisk
113Group: Applications/Sound
114Requires: asterisk >= 1.4.0
115Requires: asterisk-sounds-extra-en = %{version}-%{release}
116Provides: asterisk-sounds-extra = %{version}-%{release}
117
118%description en-siren14
119Extra English Siren14 sound files for Asterisk.
120
121%package en-sln16
122Summary: Extra English SLN16 sound files for Asterisk
123Group: Applications/Sound
124Requires: asterisk >= 1.4.0
125Requires: asterisk-sounds-extra-en = %{version}-%{release}
126Provides: asterisk-sounds-extra = %{version}-%{release}
127
128%description en-sln16
129Extra English SLN16 sound files for Asterisk.
130
131%package en-ulaw
132Summary: Extra English ULAW sound files for Asterisk
133Group: Applications/Sound
134Requires: asterisk >= 1.4.0
135Requires: asterisk-sounds-extra-en = %{version}-%{release}
136Provides: asterisk-sounds-extra = %{version}-%{release}
137
138%description en-ulaw
139Extra English ULAW sound files for Asterisk.
140
141%package en-wav
142Summary: Extra English WAV sound files for Asterisk
143Group: Applications/Sound
144Requires: asterisk >= 1.4.0
145Requires: asterisk-sounds-extra-en = %{version}-%{release}
146Provides: asterisk-sounds-extra = %{version}-%{release}
147
148%description en-wav
149Extra English WAV sound files for Asterisk.
150
563490f8
JK
151%package fr
152Summary: Extra English sound files for Asterisk
153Group: Applications/Sound
154Requires: asterisk >= 1.4.0
155
156%description fr
157Extra French sound files for Asterisk.
158
159%package fr-alaw
160Summary: Extra French ALAW sound files for Asterisk
161Group: Applications/Sound
162Requires: asterisk >= 1.4.0
163Requires: asterisk-sounds-extra-fr = %{version}-%{release}
164Provides: asterisk-sounds-extra = %{version}-%{release}
165
166%description fr-alaw
167Extra French ALAW sound files for Asterisk.
168
169%package fr-g722
170Summary: Extra French G.722 sound files for Asterisk
171Group: Applications/Sound
172Requires: asterisk >= 1.4.0
173Requires: asterisk-sounds-extra-fr = %{version}-%{release}
174Provides: asterisk-sounds-extra = %{version}-%{release}
175
176%description fr-g722
177Extra French G.722 sound files for Asterisk.
178
179%package fr-g729
180Summary: Extra French G.729 sound files for Asterisk
181Group: Applications/Sound
182Requires: asterisk >= 1.4.0
183Requires: asterisk-sounds-extra-fr = %{version}-%{release}
184Provides: asterisk-sounds-extra = %{version}-%{release}
185
186%description fr-g729
187Extra French G.729 sound files for Asterisk.
188
189%package fr-gsm
190Summary: Extra French GSM sound files for Asterisk
191Group: Applications/Sound
192Requires: asterisk >= 1.4.0
193Requires: asterisk-sounds-extra-fr = %{version}-%{release}
194Provides: asterisk-sounds-extra = %{version}-%{release}
195
196%description fr-gsm
197Extra French GSM sound files for Asterisk.
198
199%package fr-siren7
200Summary: Extra French Siren7 sound files for Asterisk
201Group: Applications/Sound
202Requires: asterisk >= 1.4.0
203Requires: asterisk-sounds-extra-fr = %{version}-%{release}
204Provides: asterisk-sounds-extra = %{version}-%{release}
205
206%description fr-siren7
207Extra French Siren7 sound files for Asterisk.
208
209%package fr-siren14
210Summary: Extra French Siren14 sound files for Asterisk
211Group: Applications/Sound
212Requires: asterisk >= 1.4.0
213Requires: asterisk-sounds-extra-fr = %{version}-%{release}
214Provides: asterisk-sounds-extra = %{version}-%{release}
215
216%description fr-siren14
217Extra French Siren14 sound files for Asterisk.
218
219%package fr-sln16
220Summary: Extra French SLN16 sound files for Asterisk
221Group: Applications/Sound
222Requires: asterisk >= 1.4.0
223Requires: asterisk-sounds-extra-fr = %{version}-%{release}
224Provides: asterisk-sounds-extra = %{version}-%{release}
225
226%description fr-sln16
227Extra French SLN16 sound files for Asterisk.
228
229%package fr-ulaw
230Summary: Extra French ULAW sound files for Asterisk
231Group: Applications/Sound
232Requires: asterisk >= 1.4.0
233Requires: asterisk-sounds-extra-fr = %{version}-%{release}
234Provides: asterisk-sounds-extra = %{version}-%{release}
235
236%description fr-ulaw
237Extra French ULAW sound files for Asterisk.
238
239%package fr-wav
240Summary: Extra French WAV sound files for Asterisk
241Group: Applications/Sound
242Requires: asterisk >= 1.4.0
243Requires: asterisk-sounds-extra-fr = %{version}-%{release}
244Provides: asterisk-sounds-extra = %{version}-%{release}
245
246%description fr-wav
247Extra French WAV sound files for Asterisk.
248
249%prep
213c9aa4 250%setup -qcT
563490f8
JK
251
252if [ -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
260fi
261
262for 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
265done
266
563490f8
JK
267mkdir fr
268for 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
271done
272
273iconv -f iso-8859-1 -t utf-8 < fr/extra-sounds-fr.txt > fr/extra-sounds-fr.txt.tmp
274touch --reference fr/extra-sounds-fr.txt fr/extra-sounds-fr.txt.tmp
275mv fr/extra-sounds-fr.txt.tmp fr/extra-sounds-fr.txt
276
277%install
278rm -rf $RPM_BUILD_ROOT
213c9aa4 279install -d $RPM_BUILD_ROOT%{sounds_dir}/{,fr}
563490f8
JK
280
281for 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
284done
285
286%clean
287rm -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}
29a431fd 293%doc CREDITS-asterisk-extra-en-%{version}
213c9aa4
ER
294%dir %{sounds_dir}/ha
295%dir %{sounds_dir}/wx
563490f8
JK
296
297%files en-alaw -f asterisk-extra-sounds-en-alaw-%{version}.list
298%defattr(644,root,root,755)
299%doc asterisk-extra-sounds-en-alaw-%{version}.list
300
301%files en-g722 -f asterisk-extra-sounds-en-g722-%{version}.list
302%defattr(644,root,root,755)
303%doc asterisk-extra-sounds-en-g722-%{version}.list
304
305%files en-g729 -f asterisk-extra-sounds-en-g729-%{version}.list
306%defattr(644,root,root,755)
307%doc asterisk-extra-sounds-en-g729-%{version}.list
308
309%files en-gsm -f asterisk-extra-sounds-en-gsm-%{version}.list
310%defattr(644,root,root,755)
311%doc asterisk-extra-sounds-en-gsm-%{version}.list
312
313%files en-siren7 -f asterisk-extra-sounds-en-siren7-%{version}.list
314%defattr(644,root,root,755)
315%doc asterisk-extra-sounds-en-siren7-%{version}.list
316
317%files en-siren14 -f asterisk-extra-sounds-en-siren14-%{version}.list
318%defattr(644,root,root,755)
319%doc asterisk-extra-sounds-en-gsm-%{version}.list
320
321%files en-sln16 -f asterisk-extra-sounds-en-sln16-%{version}.list
322%defattr(644,root,root,755)
323%doc asterisk-extra-sounds-en-sln16-%{version}.list
324
325%files en-ulaw -f asterisk-extra-sounds-en-ulaw-%{version}.list
326%defattr(644,root,root,755)
327%doc asterisk-extra-sounds-en-ulaw-%{version}.list
328
329%files en-wav -f asterisk-extra-sounds-en-wav-%{version}.list
330%defattr(644,root,root,755)
331%doc asterisk-extra-sounds-en-wav-%{version}.list
332
563490f8
JK
333%files fr
334%defattr(644,root,root,755)
335%doc fr/extra-sounds-fr.txt
336%doc fr/CHANGES-asterisk-extra-fr-%{version}
29a431fd 337%doc fr/CREDITS-asterisk-extra-fr-%{version}
563490f8 338%doc fr/MISSING.txt
213c9aa4
ER
339%dir %{sounds_dir}/fr/ha
340%dir %{sounds_dir}/fr/wx
563490f8
JK
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.092579 seconds and 4 git commands to generate.