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