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