2 # - cgi-bin package - separate, because of suid-root
3 # - separate plugins into packages
4 # - use shared versions of lpc10, gsm,...
6 # - fix bluetooth patch
7 # - package commandline tools (aelparse etc.)
10 %bcond_with rxfax # without rx (also tx :-D) fax
11 %bcond_with bluetooth # without bluetooth support (NFT)
12 %bcond_with zhone # zhone hack
13 %bcond_with zhone_hack # huge hack workarounding broken zhone channel banks which start randomly
14 # issuing pulse-dialled calls to weird numbers
15 %bcond_with bristuff # BRIstuff (Junghanns.NET BRI adapters) support
16 %bcond_with verbose # verbose build
18 %define _spandsp_version 0.0.2pre26
21 Summary(pl.UTF-8): Centralka (PBX) Asterisk
24 Release: 3%{?with_bristuff:.bristuff}
26 Group: Applications/System
27 Source0: http://downloads.digium.com/pub/asterisk/releases/%{name}-%{version}.tar.gz
28 # Source0-md5: e40cc69fb53e1cad9f30d1d533383efd
30 Source2: %{name}.sysconfig
31 Source3: http://downloads.digium.com/pub/telephony/sounds/releases/%{name}-core-sounds-en-gsm-1.4.13.tar.gz
32 # Source3-md5: 65add705003e9aebdb4cd03bd1a26f97
33 Source4: http://downloads.digium.com/pub/telephony/sounds/%{name}-moh-freeplay-wav.tar.gz
34 # Source4-md5: e523fc2b4ac524f45da7815e97780540
35 Source5: %{name}.logrotate
36 Source10: http://soft-switch.org/downloads/spandsp/spandsp-%{_spandsp_version}/asterisk-1.2.x/app_txfax.c
37 # Source10-md5: 8c8fcb263b76897022b4c28052a7b439
38 Source11: http://soft-switch.org/downloads/spandsp/spandsp-%{_spandsp_version}/asterisk-1.2.x/app_rxfax.c
39 # Source11-md5: ab6983b51c412883545b36993d704999
40 Patch0: %{name}-m4.patch
41 Patch1: %{name}-configure.patch
42 Patch2: %{name}-no_k6_on_sparc.patch
43 Patch3: %{name}-lib.patch
44 Patch4: %{name}-ppc.patch
45 # http://soft-switch.org/downloads/spandsp/spandsp-%{_spandsp_version}/asterisk-1.2.x/apps_Makefile.patch
46 Patch10: %{name}-txfax-Makefile.patch
47 Patch11: %{name}-fix-ptlib.patch
48 Patch12: %{name}-chan_bluetooth.patch
49 Patch13: %{name}-zhone.patch
50 # http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/bristuff
51 Patch14: %{name}-bristuff.patch
52 Patch15: %{name}-bristuff-build.patch
53 Patch16: %{name}-bristuff-libpri.patch
54 URL: http://www.asterisk.org/
55 BuildRequires: OSPToolkit
56 BuildRequires: SDL_image-devel
57 BuildRequires: alsa-lib-devel
58 BuildRequires: autoconf
59 BuildRequires: automake
61 %{?with_bluetooth:BuildRequires: bluez-devel}
62 BuildRequires: curl-devel
63 BuildRequires: dahdi-linux-devel
64 BuildRequires: dahdi-tools-devel
65 BuildRequires: freetds-devel >= 0.63
67 BuildRequires: gcc >= 5:3.4
68 BuildRequires: gmime22-devel
69 BuildRequires: iksemel-devel
70 BuildRequires: imap-static
71 BuildRequires: jack-audio-connection-kit-devel
72 BuildRequires: libcap-devel
73 BuildRequires: libogg-devel
74 BuildRequires: libvorbis-devel
75 BuildRequires: mISDNuser-devel
76 BuildRequires: mysql-devel
77 BuildRequires: ncurses-devel
78 BuildRequires: net-snmp-devel
79 BuildRequires: newt-devel
80 BuildRequires: openais-devel
81 BuildRequires: openh323-devel
82 BuildRequires: openldap-devel
83 BuildRequires: openssl-devel >= 0.9.7d
84 BuildRequires: pam-devel
85 BuildRequires: pkgconfig
86 BuildRequires: popt-devel
87 BuildRequires: portaudio-devel
88 BuildRequires: postgresql-devel
89 BuildRequires: pwlib-devel
90 BuildRequires: radiusclient-ng-devel
91 BuildRequires: rpmbuild(macros) >= 1.268
92 BuildRequires: sed >= 4.0
93 BuildRequires: spandsp-devel
94 %{?with_rxfax:BuildRequires: spandsp-devel-%{_spandsp_version}}
95 BuildRequires: speex-devel
96 BuildRequires: sqlite-devel
97 BuildRequires: sqlite3-devel
98 BuildRequires: unixODBC-devel
99 BuildRequires: xorg-lib-libX11-devel
100 BuildRequires: zlib-devel
102 BuildRequires: libgsmat-devel
103 BuildRequires: libpri-bristuff-devel >= 1.2.4
105 BuildRequires: libpri-devel >= 1.2.4
107 Requires(post,preun): /sbin/chkconfig
109 %requires_eq openh323
111 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
114 Asterisk is an Open Source PBX and telephony development platform that
115 can both replace a conventional PBX and act as a platform for
116 developing custom telephony applications for delivering dynamic
117 content over a telephone similarly to how one can deliver dynamic
118 content through a web browser using CGI and a web server.
120 Asterisk talks to a variety of telephony hardware including BRI, PRI,
121 POTS, and IP telephony clients using the Inter-Asterisk eXchange
122 protocol (e.g. gnophone or miniphone). For more information and a
123 current list of supported hardware, see http://www.asterisk.org/.
125 %description -l pl.UTF-8
126 Asterisk to wolnodostępna centralka (PBX) i platforma programistyczna
127 dla telefonii, mogąca zastąpić konwencjonalne PBX-y oraz służyć jako
128 platforma do rozwijania własnych aplikacji telefonicznych do
129 przekazywania dynamicznej treści przez telefon, podobnie jak można
130 przekazywać dynamiczną treść przez przeglądarkę WWW przy użyciu CGI i
133 Asterisk współpracuje z wielorakim sprzętem telefonicznym, w tym BRI,
134 PRI, POTS oraz klienty telefonii IP używające protokołu Inter-Asterisk
135 eXchange (np. gnophone lub miniphone). Więcej informacji i listę
136 obsługiwanego sprzętu można znaleźć pod http://www.asterisk.org/.
139 Summary: Header files for Asterisk platform
140 Summary(pl.UTF-8): Pliki nagłówkowe platformy Asterisk
144 Header files for Asterisk development platform.
146 %description devel -l pl.UTF-8
147 Pliki nagłówkowe platformy programistycznej Asterisk.
150 Summary: Example files for the Asterisk PBX
151 Summary(pl.UTF-8): Pliki przykładowe dla centralki Asterisk
152 Group: Applications/System
153 Requires: %{name} = %{version}-%{release}
155 %description examples
156 Example files for the Asterisk PBX.
158 %description examples -l pl.UTF-8
159 Pliki przykładowe dla centralki Asterisk.
164 %{?with_zhone:sed -i -e 's|.*#define.*ZHONE_HACK.*|#define ZHONE_HACK 1|g' channels/chan_zap.c}
185 %{?with_bluetooth:%patch12 -p1}
186 %{?with_zhonehack:%patch13 -p1}
193 sed -i -e "s#/usr/lib/#/usr/%{_lib}/#g#" Makefile
195 mkdir -p imap/c-client
196 ln -s %{_libdir}/libc-client.a imap/c-client/c-client.a
197 ln -s %{_includedir}/imap/* imap/c-client/
198 echo '-lssl -lpam' > imap/c-client/LDFLAGS
203 %{__aclocal} -I autoconf
207 export CPPFLAGS="%{rpmcppflags} -I/usr/include/openh323"
208 export WGET="/bin/true"
210 %{?with_bristuff:--with-gsmat=%{_prefix}} \
211 --with-imap="`pwd`"/imap
214 %{?with_bristuff:grep '^#define HAVE_GSMAT 1' include/asterisk/autoconfig.h || exit 1}
216 cp -f .cleancount .lastclean
218 %{__make} -j1 -C menuselect \
219 %{?with_verbose:NOISY_BUILD=yes} \
221 OPTIMIZE="%{rpmcflags}"
224 %{?with_verbose:NOISY_BUILD=yes} \
226 OPTIMIZE="%{rpmcflags}" \
227 CHANNEL_LIBS+=chan_bluetooth.so || :
229 # rerun needed; asterisk want's that
231 %{?with_verbose:NOISY_BUILD=yes} \
233 OPTIMIZE="%{rpmcflags}" \
234 CHANNEL_LIBS+=chan_bluetooth.so
236 # it requires doxygen - I don't know if we should do this...
240 %{?with_bristuff:objdump -p channels/chan_zap.so | grep -qE 'NEEDED +libgsmat\.so' || exit 1}
243 rm -rf $RPM_BUILD_ROOT
244 install -d $RPM_BUILD_ROOT{/var/{log/asterisk/cdr-csv,spool/asterisk/monitor},/etc/{rc.d/init.d,sysconfig,logrotate.d}}
246 install %{SOURCE3} sounds
247 install %{SOURCE4} sounds
248 install %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
250 %{__make} -j1 install \
251 DESTDIR=$RPM_BUILD_ROOT
252 %{__make} -j1 samples \
253 DESTDIR=$RPM_BUILD_ROOT
255 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
256 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
259 rm -rf $RPM_BUILD_ROOT
262 /sbin/chkconfig --add asterisk
263 # this was insane; breaking all current calls
264 #%%service asterisk restart "Asterisk daemon"
267 if [ "$1" = "0" ]; then
268 %service asterisk stop
269 /sbin/chkconfig --del asterisk
273 %defattr(644,root,root,755)
274 %doc BUGS ChangeLog CHANGES CREDITS README* UPGRADE.txt configs doc/*.txt
275 %attr(755,root,root) %{_sbindir}/*
276 %dir %{_sysconfdir}/asterisk
277 %attr(754,root,root) /etc/rc.d/init.d/%{name}
278 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
279 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
280 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/*.conf
281 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/*.adsi
282 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/*.lua
283 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/extensions.ael
284 %dir %{_libdir}/asterisk
285 %dir %{_libdir}/asterisk/modules
286 %attr(755,root,root) %{_libdir}/asterisk/modules/*.so
287 %dir /var/lib/asterisk
288 %dir /var/lib/asterisk/agi-bin
289 %dir /var/lib/asterisk/images
290 %dir /var/lib/asterisk/keys
291 %dir /var/lib/asterisk/moh
292 /var/lib/asterisk/moh/*.wav
293 %dir /var/lib/asterisk/sounds
294 %dir /var/lib/asterisk/sounds/en
295 %dir /var/lib/asterisk/sounds/en/digits
296 %dir /var/lib/asterisk/sounds/en/dictate
297 %dir /var/lib/asterisk/sounds/en/followme
298 %dir /var/lib/asterisk/sounds/en/letters
299 %dir /var/lib/asterisk/sounds/en/phonetic
300 %dir /var/lib/asterisk/sounds/en/silence
301 /var/lib/asterisk/images/*.jpg
302 /var/lib/asterisk/keys/*.pub
303 /var/lib/asterisk/phoneprov
304 /var/lib/asterisk/sounds/en/*.gsm
305 /var/lib/asterisk/sounds/en/digits/*.gsm
306 /var/lib/asterisk/sounds/en/dictate/*.gsm
307 /var/lib/asterisk/sounds/en/followme/*.gsm
308 /var/lib/asterisk/sounds/en/letters/*.gsm
309 /var/lib/asterisk/sounds/en/phonetic/*.gsm
310 /var/lib/asterisk/sounds/en/silence/*.gsm
311 /var/lib/asterisk/static-http
312 %dir /var/spool/asterisk
313 %dir /var/spool/asterisk/monitor
314 #%%dir /var/spool/asterisk/vm
315 %dir /var/spool/asterisk/voicemail
316 %dir /var/spool/asterisk/voicemail/default
317 %dir /var/spool/asterisk/voicemail/default/1234
318 %dir /var/spool/asterisk/voicemail/default/1234/en
319 %dir /var/log/asterisk
320 %dir /var/log/asterisk/cdr-csv
321 %{_mandir}/man8/asterisk.8*
322 %{_mandir}/man8/astgenkey.8*
323 %{_mandir}/man8/autosupport.8*
324 %{_mandir}/man8/safe_asterisk.8*
325 %dir /var/lib/asterisk/firmware
326 %dir /var/lib/asterisk/firmware/iax
327 /var/lib/asterisk/firmware/iax/iaxy.bin
330 %defattr(644,root,root,755)
331 %attr(755,root,root) /var/lib/asterisk/agi-bin/agi-test.agi
332 %attr(755,root,root) /var/lib/asterisk/agi-bin/eagi-sphinx-test
333 %attr(755,root,root) /var/lib/asterisk/agi-bin/eagi-test
334 %attr(755,root,root) /var/lib/asterisk/agi-bin/jukebox.agi
335 /var/spool/asterisk/voicemail/default/1234/en/busy.gsm
336 /var/spool/asterisk/voicemail/default/1234/en/unavail.gsm
338 #%dir /var/lib/asterisk/agi-bin/*
341 %defattr(644,root,root,755)
342 %dir %{_includedir}/asterisk
343 %{_includedir}/asterisk/*.h
344 %{_includedir}/asterisk.h