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