]>
Commit | Line | Data |
---|---|---|
8ac733fc PG |
1 | # TODO: |
2 | # - cgi-bin package - separate, because of suid-root | |
ac237e7b | 3 | # - separate plugins into packages |
80067fcb | 4 | # - use shared versions of lpc10, gsm,... |
dd54f70d | 5 | # - CFLAGS passing |
7605fc79 AM |
6 | # - fix bluetooth patch |
7 | # - package commandline tools (aelparse etc.) | |
fb0589cb JB |
8 | # |
9 | # Conditional build: | |
7605fc79 AM |
10 | %bcond_with rxfax # without rx (also tx :-D) fax |
11 | %bcond_with bluetooth # without bluetooth support (NFT) | |
62ea1c5e | 12 | %bcond_with zhone # zhone hack |
496d7f51 | 13 | |
cfc5e383 | 14 | %define _spandsp_version 0.0.2pre26 |
fb0589cb | 15 | # |
8ac733fc | 16 | Summary: Asterisk PBX |
3dd43888 | 17 | Summary(pl.UTF-8): Centralka (PBX) Asterisk |
8ac733fc | 18 | Name: asterisk |
a66e72d5 | 19 | Version: 1.4.13 |
62ea1c5e | 20 | Release: 1 |
8ac733fc PG |
21 | License: GPL v2 |
22 | Group: Applications/System | |
7605fc79 | 23 | Source0: http://ftp.digium.com/pub/asterisk/releases/%{name}-%{version}.tar.gz |
a66e72d5 | 24 | # Source0-md5: 49b73114831c21cc9784d3b3f4fb5bec |
48b81789 PG |
25 | Source1: %{name}.init |
26 | Source2: %{name}.sysconfig | |
d9d47f94 AM |
27 | Source3: http://ftp.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-en-gsm-1.4.6.tar.gz |
28 | # Source3-md5: 02e582b6c7de58e5eaba220229c0a71a | |
7605fc79 AM |
29 | Source4: http://ftp.digium.com/pub/telephony/sounds/asterisk-moh-freeplay-wav.tar.gz |
30 | # Source4-md5: e523fc2b4ac524f45da7815e97780540 | |
31 | Patch1: %{name}-configure.patch | |
93f9bb41 | 32 | Patch2: %{name}-no_k6_on_sparc.patch |
5658cdd6 | 33 | Patch3: %{name}-lib.patch |
8d0a3e58 | 34 | Patch8: %{name}-awk.patch |
496d7f51 | 35 | Source10: http://soft-switch.org/downloads/spandsp/spandsp-%{_spandsp_version}/asterisk-1.2.x/app_txfax.c |
19b2566c | 36 | # Source10-md5: 8c8fcb263b76897022b4c28052a7b439 |
496d7f51 | 37 | Source11: http://soft-switch.org/downloads/spandsp/spandsp-%{_spandsp_version}/asterisk-1.2.x/app_rxfax.c |
19b2566c AM |
38 | # Source11-md5: ab6983b51c412883545b36993d704999 |
39 | # http://soft-switch.org/downloads/spandsp/spandsp-%{_spandsp_version}/asterisk-1.2.x/apps_Makefile.patch | |
40 | Patch10: %{name}-txfax-Makefile.patch | |
7605fc79 AM |
41 | Patch11: %{name}-fix-ptlib.patch |
42 | Patch12: %{name}-chan_bluetooth.patch | |
8c7a2ffa | 43 | URL: http://www.asterisk.org/ |
7605fc79 AM |
44 | BuildRequires: autoconf |
45 | BuildRequires: automake | |
7346b8fc | 46 | BuildRequires: bison |
7605fc79 | 47 | %{?with_bluetooth:BuildRequires: bluez-devel} |
8a8cbd07 | 48 | BuildRequires: freetds >= 0.63 |
7346b8fc | 49 | BuildRequires: gawk |
19b2566c | 50 | BuildRequires: gcc >= 5:3.4 |
7605fc79 AM |
51 | BuildRequires: iksemel-devel |
52 | BuildRequires: libpri-devel >= 1.2.4 | |
82475f50 PG |
53 | BuildRequires: mysql-devel |
54 | BuildRequires: ncurses-devel | |
12ec33bf | 55 | BuildRequires: openssl-devel >= 0.9.7d |
fa4054d8 | 56 | BuildRequires: rpmbuild(macros) >= 1.268 |
591f7fb9 | 57 | BuildRequires: sed >= 4.0 |
7605fc79 | 58 | %{?with_rxfax:BuildRequires: spandsp-devel-%{_spandsp_version}} |
fa4054d8 | 59 | BuildRequires: speex-devel |
405b262e | 60 | BuildRequires: unixODBC-devel |
7605fc79 | 61 | BuildRequires: zaptel-devel >= 1.2.10 |
82475f50 | 62 | BuildRequires: zlib-devel |
7605fc79 AM |
63 | BuildRequires: openh323-devel |
64 | BuildRequires: pwlib-devel | |
b9bcfe5b | 65 | Requires(post,preun): /sbin/chkconfig |
fa4054d8 | 66 | Requires: rc-scripts |
7605fc79 AM |
67 | %requires_eq openh323 |
68 | %requires_eq pwlib | |
8ac733fc PG |
69 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
70 | ||
71 | %description | |
72 | Asterisk is an Open Source PBX and telephony development platform that | |
73 | can both replace a conventional PBX and act as a platform for | |
74 | developing custom telephony applications for delivering dynamic | |
75 | content over a telephone similarly to how one can deliver dynamic | |
76 | content through a web browser using CGI and a web server. | |
77 | ||
78 | Asterisk talks to a variety of telephony hardware including BRI, PRI, | |
79 | POTS, and IP telephony clients using the Inter-Asterisk eXchange | |
80 | protocol (e.g. gnophone or miniphone). For more information and a | |
8c7a2ffa | 81 | current list of supported hardware, see http://www.asterisk.org/. |
de95e0fb | 82 | |
82de9d0d JR |
83 | %description -l pl.UTF-8 |
84 | Asterisk to wolnodostępna centralka (PBX) i platforma programistyczna | |
85 | dla telefonii, mogąca zastąpić konwencjonalne PBX-y oraz służyć jako | |
86 | platforma do rozwijania własnych aplikacji telefonicznych do | |
87 | przekazywania dynamicznej treści przez telefon, podobnie jak można | |
88 | przekazywać dynamiczną treść przez przeglądarkę WWW przy użyciu CGI i | |
de95e0fb JB |
89 | serwera WWW. |
90 | ||
82de9d0d JR |
91 | Asterisk współpracuje z wielorakim sprzętem telefonicznym, w tym BRI, |
92 | PRI, POTS oraz klienty telefonii IP używające protokołu Inter-Asterisk | |
93 | eXchange (np. gnophone lub miniphone). Więcej informacji i listę | |
94 | obsługiwanego sprzętu można znaleźć pod http://www.asterisk.org/. | |
8ac733fc PG |
95 | |
96 | %package devel | |
de95e0fb | 97 | Summary: Header files for Asterisk platform |
3dd43888 | 98 | Summary(pl.UTF-8): Pliki nagłówkowe platformy Asterisk |
8ac733fc | 99 | Group: Development |
8ac733fc PG |
100 | |
101 | %description devel | |
de95e0fb | 102 | Header files for Asterisk development platform. |
8ac733fc | 103 | |
82de9d0d JR |
104 | %description devel -l pl.UTF-8 |
105 | Pliki nagłówkowe platformy programistycznej Asterisk. | |
8ac733fc | 106 | |
a838f328 | 107 | %package examples |
108 | Summary: Example files for the Asterisk PBX | |
3dd43888 | 109 | Summary(pl.UTF-8): Pliki przykładowe dla centralki Asterisk |
a838f328 | 110 | Group: Applications/System |
fb0589cb | 111 | Requires: %{name} = %{version}-%{release} |
a838f328 | 112 | |
113 | %description examples | |
fb0589cb | 114 | Example files for the Asterisk PBX. |
a838f328 | 115 | |
82de9d0d JR |
116 | %description examples -l pl.UTF-8 |
117 | Pliki przykładowe dla centralki Asterisk. | |
a838f328 | 118 | |
8ac733fc | 119 | %prep |
7605fc79 | 120 | %setup -q -n %{name}-%{version} |
62ea1c5e AM |
121 | |
122 | %{?with_zhone:sed -i -e 's|.*#define.*ZHONE_HACK.*|#define ZHONE_HACK 1|g' channels/chan_zap.c} | |
123 | ||
e621aa3e | 124 | #%patch1 -p1 |
7605fc79 AM |
125 | #%patch2 -p1 |
126 | #%patch3 -p1 | |
f5a8d2bc | 127 | #%patch4 -p1 |
128 | #%patch5 -p1 | |
129 | #%patch6 -p1 | |
130 | #%patch7 -p1 | |
8d0a3e58 | 131 | %patch8 -p1 |
f5a8d2bc | 132 | #%patch9 -p1 |
8ac733fc | 133 | |
496d7f51 | 134 | %if %{with rxfax} |
135 | cd apps | |
19b2566c | 136 | %patch10 -p0 |
fa4054d8 ER |
137 | cp %{SOURCE10} . |
138 | cp %{SOURCE11} . | |
496d7f51 | 139 | %endif |
140 | ||
7605fc79 AM |
141 | %patch11 -p1 |
142 | ||
143 | %if %{with bluetooth} | |
144 | %patch12 -p1 | |
145 | %endif | |
146 | ||
147 | sed -i -e "s#/usr/lib/#/usr/%{_lib}/#g#" Makefile | |
4f8d0ca9 | 148 | |
8ac733fc | 149 | %build |
dd54f70d | 150 | rm -f pbx/.depend |
3074f789 | 151 | |
7605fc79 AM |
152 | %{__aclocal} |
153 | %{__autoconf} | |
154 | ||
e621aa3e | 155 | CPPFLAGS="-I/usr/include/openh323"; export CPPFLAGS |
7605fc79 AM |
156 | %configure |
157 | ||
158 | cp -f .cleancount .lastclean | |
159 | ||
2d4cecf8 | 160 | %{__make} -j1 -C menuselect \ |
e621aa3e AM |
161 | CC="%{__cc}" \ |
162 | OPTIMIZE="%{rpmcflags}" | |
163 | ||
164 | %{__make} -j1 \ | |
165 | CC="%{__cc}" \ | |
166 | OPTIMIZE="%{rpmcflags}" \ | |
2d4cecf8 AM |
167 | CHANNEL_LIBS+=chan_bluetooth.so || : |
168 | ||
169 | # rerun needed; asterisk want's that | |
170 | %{__make} -j1 \ | |
171 | CC="%{__cc}" \ | |
172 | OPTIMIZE="%{rpmcflags}" \ | |
e621aa3e | 173 | CHANNEL_LIBS+=chan_bluetooth.so |
39a285f2 | 174 | |
8ac733fc PG |
175 | # it requires doxygen - I don't know if we should do this... |
176 | #%{__make} progdocs | |
177 | ||
178 | %install | |
179 | rm -rf $RPM_BUILD_ROOT | |
1f0eb408 | 180 | install -d $RPM_BUILD_ROOT{/var/{log/asterisk/cdr-csv,spool/asterisk/monitor},/etc/{rc.d/init.d,sysconfig}} |
8729ab54 | 181 | |
7605fc79 AM |
182 | install %{SOURCE3} sounds |
183 | install %{SOURCE4} sounds | |
184 | ||
d54a6170 | 185 | %{__make} -j1 install \ |
87a2b1b8 | 186 | DESTDIR=$RPM_BUILD_ROOT |
d54a6170 | 187 | %{__make} -j1 samples \ |
a838f328 | 188 | DESTDIR=$RPM_BUILD_ROOT |
39a285f2 | 189 | |
48b81789 PG |
190 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
191 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
192 | ||
de95e0fb JB |
193 | %clean |
194 | rm -rf $RPM_BUILD_ROOT | |
195 | ||
80067fcb PG |
196 | %post |
197 | /sbin/chkconfig --add asterisk | |
195243b4 AM |
198 | # this was insane; breaking all current calls |
199 | #%%service asterisk restart "Asterisk daemon" | |
80067fcb PG |
200 | |
201 | %preun | |
202 | if [ "$1" = "0" ]; then | |
fa4054d8 | 203 | %service asterisk stop |
80067fcb PG |
204 | /sbin/chkconfig --del asterisk |
205 | fi | |
206 | ||
8ac733fc PG |
207 | %files |
208 | %defattr(644,root,root,755) | |
7605fc79 | 209 | %doc BUGS ChangeLog CHANGES CREDITS README* UPGRADE.txt configs doc/*.txt |
de95e0fb | 210 | %attr(755,root,root) %{_sbindir}/* |
8ac733fc | 211 | %dir %{_sysconfdir}/asterisk |
87a2b1b8 ER |
212 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
213 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} | |
214 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/*.conf | |
215 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/*.adsi | |
216 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/extensions.ael | |
8ac733fc PG |
217 | %dir %{_libdir}/asterisk |
218 | %dir %{_libdir}/asterisk/modules | |
de95e0fb | 219 | %attr(755,root,root) %{_libdir}/asterisk/modules/*.so |
8ac733fc PG |
220 | %dir /var/lib/asterisk |
221 | %dir /var/lib/asterisk/agi-bin | |
ac237e7b PG |
222 | %dir /var/lib/asterisk/images |
223 | %dir /var/lib/asterisk/keys | |
7605fc79 AM |
224 | %dir /var/lib/asterisk/moh |
225 | /var/lib/asterisk/moh/fpm-calm-river.wav | |
226 | /var/lib/asterisk/moh/fpm-sunshine.wav | |
227 | /var/lib/asterisk/moh/fpm-world-mix.wav | |
de95e0fb | 228 | %dir /var/lib/asterisk/sounds |
8ac733fc | 229 | %dir /var/lib/asterisk/sounds/digits |
f5a8d2bc | 230 | %dir /var/lib/asterisk/sounds/dictate |
7605fc79 | 231 | %dir /var/lib/asterisk/sounds/followme |
8c7a2ffa | 232 | %dir /var/lib/asterisk/sounds/letters |
233 | %dir /var/lib/asterisk/sounds/phonetic | |
bc8e0c20 | 234 | %dir /var/lib/asterisk/sounds/silence |
de95e0fb | 235 | /var/lib/asterisk/images/*.jpg |
de95e0fb | 236 | /var/lib/asterisk/keys/*.pub |
de95e0fb | 237 | /var/lib/asterisk/sounds/*.gsm |
ac237e7b | 238 | /var/lib/asterisk/sounds/digits/*.gsm |
f5a8d2bc | 239 | /var/lib/asterisk/sounds/dictate/*.gsm |
7605fc79 | 240 | /var/lib/asterisk/sounds/followme/*.gsm |
8c7a2ffa | 241 | /var/lib/asterisk/sounds/letters/*.gsm |
242 | /var/lib/asterisk/sounds/phonetic/*.gsm | |
bc8e0c20 | 243 | /var/lib/asterisk/sounds/silence/*.gsm |
8ac733fc | 244 | %dir /var/spool/asterisk |
9b09fef6 | 245 | %dir /var/spool/asterisk/monitor |
f5a8d2bc | 246 | #%%dir /var/spool/asterisk/vm |
a0ad6913 PG |
247 | %dir /var/spool/asterisk/voicemail |
248 | %dir /var/spool/asterisk/voicemail/default | |
6293eeaf | 249 | %dir /var/spool/asterisk/voicemail/default/1234 |
8729ab54 | 250 | %dir /var/log/asterisk |
1f0eb408 | 251 | %dir /var/log/asterisk/cdr-csv |
591f7fb9 | 252 | %{_mandir}/man8/asterisk.8* |
f5a8d2bc | 253 | %{_mandir}/man8/astgenkey.8* |
254 | %{_mandir}/man8/autosupport.8* | |
255 | %{_mandir}/man8/safe_asterisk.8* | |
d8121cb9 | 256 | %dir /var/lib/asterisk/firmware |
257 | %dir /var/lib/asterisk/firmware/iax | |
258 | /var/lib/asterisk/firmware/iax/iaxy.bin | |
8ac733fc | 259 | |
a838f328 | 260 | %files examples |
261 | %defattr(644,root,root,755) | |
262 | %attr(755,root,root) /var/lib/asterisk/agi-bin/agi-test.agi | |
263 | %attr(755,root,root) /var/lib/asterisk/agi-bin/eagi-sphinx-test | |
264 | %attr(755,root,root) /var/lib/asterisk/agi-bin/eagi-test | |
7605fc79 | 265 | %attr(755,root,root) /var/lib/asterisk/agi-bin/jukebox.agi |
a838f328 | 266 | /var/spool/asterisk/voicemail/default/1234/busy.gsm |
267 | /var/spool/asterisk/voicemail/default/1234/unavail.gsm | |
268 | ||
de95e0fb | 269 | #%dir /var/lib/asterisk/agi-bin/* |
8ac733fc PG |
270 | |
271 | %files devel | |
272 | %defattr(644,root,root,755) | |
273 | %dir %{_includedir}/asterisk | |
de95e0fb | 274 | %{_includedir}/asterisk/*.h |
7605fc79 | 275 | %{_includedir}/asterisk.h |