]> git.pld-linux.org Git - packages/asterisk.git/blame - asterisk.spec
- add imap support
[packages/asterisk.git] / asterisk.spec
CommitLineData
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 17Summary: Asterisk PBX
3dd43888 18Summary(pl.UTF-8): Centralka (PBX) Asterisk
8ac733fc 19Name: asterisk
a66e72d5 20Version: 1.4.13
62ea1c5e 21Release: 1
8ac733fc
PG
22License: GPL v2
23Group: Applications/System
7605fc79 24Source0: http://ftp.digium.com/pub/asterisk/releases/%{name}-%{version}.tar.gz
a66e72d5 25# Source0-md5: 49b73114831c21cc9784d3b3f4fb5bec
48b81789
PG
26Source1: %{name}.init
27Source2: %{name}.sysconfig
d9d47f94
AM
28Source3: http://ftp.digium.com/pub/telephony/sounds/releases/asterisk-core-sounds-en-gsm-1.4.6.tar.gz
29# Source3-md5: 02e582b6c7de58e5eaba220229c0a71a
7605fc79
AM
30Source4: http://ftp.digium.com/pub/telephony/sounds/asterisk-moh-freeplay-wav.tar.gz
31# Source4-md5: e523fc2b4ac524f45da7815e97780540
046a2286 32Source5: %{name}.logrotate
7605fc79 33Patch1: %{name}-configure.patch
93f9bb41 34Patch2: %{name}-no_k6_on_sparc.patch
5658cdd6 35Patch3: %{name}-lib.patch
8d0a3e58 36Patch8: %{name}-awk.patch
496d7f51 37Source10: http://soft-switch.org/downloads/spandsp/spandsp-%{_spandsp_version}/asterisk-1.2.x/app_txfax.c
19b2566c 38# Source10-md5: 8c8fcb263b76897022b4c28052a7b439
496d7f51 39Source11: http://soft-switch.org/downloads/spandsp/spandsp-%{_spandsp_version}/asterisk-1.2.x/app_rxfax.c
19b2566c
AM
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
7605fc79
AM
43Patch11: %{name}-fix-ptlib.patch
44Patch12: %{name}-chan_bluetooth.patch
36a72b9c 45Patch13: %{name}-zhone.patch
8c7a2ffa 46URL: http://www.asterisk.org/
7605fc79
AM
47BuildRequires: autoconf
48BuildRequires: automake
7346b8fc 49BuildRequires: bison
7605fc79 50%{?with_bluetooth:BuildRequires: bluez-devel}
8a8cbd07 51BuildRequires: freetds >= 0.63
7346b8fc 52BuildRequires: gawk
19b2566c 53BuildRequires: gcc >= 5:3.4
7605fc79 54BuildRequires: iksemel-devel
6db22ae5 55BuildRequires: imap-static
7605fc79 56BuildRequires: libpri-devel >= 1.2.4
82475f50
PG
57BuildRequires: mysql-devel
58BuildRequires: ncurses-devel
12ec33bf 59BuildRequires: openssl-devel >= 0.9.7d
fa4054d8 60BuildRequires: rpmbuild(macros) >= 1.268
591f7fb9 61BuildRequires: sed >= 4.0
7605fc79 62%{?with_rxfax:BuildRequires: spandsp-devel-%{_spandsp_version}}
fa4054d8 63BuildRequires: speex-devel
405b262e 64BuildRequires: unixODBC-devel
7605fc79 65BuildRequires: zaptel-devel >= 1.2.10
82475f50 66BuildRequires: zlib-devel
7605fc79
AM
67BuildRequires: openh323-devel
68BuildRequires: pwlib-devel
b9bcfe5b 69Requires(post,preun): /sbin/chkconfig
fa4054d8 70Requires: rc-scripts
7605fc79
AM
71%requires_eq openh323
72%requires_eq pwlib
8ac733fc
PG
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
8c7a2ffa 85current list of supported hardware, see http://www.asterisk.org/.
de95e0fb 86
82de9d0d
JR
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
de95e0fb
JB
93serwera WWW.
94
82de9d0d
JR
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/.
8ac733fc
PG
99
100%package devel
de95e0fb 101Summary: Header files for Asterisk platform
3dd43888 102Summary(pl.UTF-8): Pliki nagłówkowe platformy Asterisk
8ac733fc 103Group: Development
8ac733fc
PG
104
105%description devel
de95e0fb 106Header files for Asterisk development platform.
8ac733fc 107
82de9d0d
JR
108%description devel -l pl.UTF-8
109Pliki nagłówkowe platformy programistycznej Asterisk.
8ac733fc 110
a838f328 111%package examples
112Summary: Example files for the Asterisk PBX
3dd43888 113Summary(pl.UTF-8): Pliki przykładowe dla centralki Asterisk
a838f328 114Group: Applications/System
fb0589cb 115Requires: %{name} = %{version}-%{release}
a838f328 116
117%description examples
fb0589cb 118Example files for the Asterisk PBX.
a838f328 119
82de9d0d
JR
120%description examples -l pl.UTF-8
121Pliki przykładowe dla centralki Asterisk.
a838f328 122
8ac733fc 123%prep
7605fc79 124%setup -q -n %{name}-%{version}
62ea1c5e
AM
125
126%{?with_zhone:sed -i -e 's|.*#define.*ZHONE_HACK.*|#define ZHONE_HACK 1|g' channels/chan_zap.c}
127
e621aa3e 128#%patch1 -p1
7605fc79
AM
129#%patch2 -p1
130#%patch3 -p1
f5a8d2bc 131#%patch4 -p1
132#%patch5 -p1
133#%patch6 -p1
134#%patch7 -p1
8d0a3e58 135%patch8 -p1
f5a8d2bc 136#%patch9 -p1
8ac733fc 137
496d7f51 138%if %{with rxfax}
139cd apps
19b2566c 140%patch10 -p0
fa4054d8
ER
141cp %{SOURCE10} .
142cp %{SOURCE11} .
496d7f51 143%endif
144
7605fc79
AM
145%patch11 -p1
146
147%if %{with bluetooth}
148%patch12 -p1
149%endif
150
36a72b9c
AM
151%patch13 -p1
152
7605fc79 153sed -i -e "s#/usr/lib/#/usr/%{_lib}/#g#" Makefile
4f8d0ca9 154
6db22ae5 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
8ac733fc 160%build
dd54f70d 161rm -f pbx/.depend
3074f789 162
7605fc79
AM
163%{__aclocal}
164%{__autoconf}
165
e621aa3e 166CPPFLAGS="-I/usr/include/openh323"; export CPPFLAGS
6db22ae5 167%configure \
168 --with-imap="`pwd`"/imap
7605fc79
AM
169
170cp -f .cleancount .lastclean
171
2d4cecf8 172%{__make} -j1 -C menuselect \
e621aa3e
AM
173 CC="%{__cc}" \
174 OPTIMIZE="%{rpmcflags}"
175
176%{__make} -j1 \
177 CC="%{__cc}" \
178 OPTIMIZE="%{rpmcflags}" \
2d4cecf8
AM
179 CHANNEL_LIBS+=chan_bluetooth.so || :
180
181# rerun needed; asterisk want's that
182%{__make} -j1 \
183 CC="%{__cc}" \
184 OPTIMIZE="%{rpmcflags}" \
e621aa3e 185 CHANNEL_LIBS+=chan_bluetooth.so
39a285f2 186
8ac733fc
PG
187# it requires doxygen - I don't know if we should do this...
188#%{__make} progdocs
189
190%install
191rm -rf $RPM_BUILD_ROOT
046a2286 192install -d $RPM_BUILD_ROOT{/var/{log/asterisk/cdr-csv,spool/asterisk/monitor},/etc/{rc.d/init.d,sysconfig,logrotate.d}}
8729ab54 193
7605fc79
AM
194install %{SOURCE3} sounds
195install %{SOURCE4} sounds
046a2286 196install %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
7605fc79 197
d54a6170 198%{__make} -j1 install \
87a2b1b8 199 DESTDIR=$RPM_BUILD_ROOT
d54a6170 200%{__make} -j1 samples \
a838f328 201 DESTDIR=$RPM_BUILD_ROOT
39a285f2 202
48b81789
PG
203install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
204install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
205
de95e0fb
JB
206%clean
207rm -rf $RPM_BUILD_ROOT
208
80067fcb
PG
209%post
210/sbin/chkconfig --add asterisk
195243b4
AM
211# this was insane; breaking all current calls
212#%%service asterisk restart "Asterisk daemon"
80067fcb
PG
213
214%preun
215if [ "$1" = "0" ]; then
fa4054d8 216 %service asterisk stop
80067fcb
PG
217 /sbin/chkconfig --del asterisk
218fi
219
8ac733fc
PG
220%files
221%defattr(644,root,root,755)
7605fc79 222%doc BUGS ChangeLog CHANGES CREDITS README* UPGRADE.txt configs doc/*.txt
de95e0fb 223%attr(755,root,root) %{_sbindir}/*
8ac733fc 224%dir %{_sysconfdir}/asterisk
87a2b1b8 225%attr(754,root,root) /etc/rc.d/init.d/%{name}
046a2286 226%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
87a2b1b8
ER
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
8ac733fc
PG
231%dir %{_libdir}/asterisk
232%dir %{_libdir}/asterisk/modules
de95e0fb 233%attr(755,root,root) %{_libdir}/asterisk/modules/*.so
8ac733fc
PG
234%dir /var/lib/asterisk
235%dir /var/lib/asterisk/agi-bin
ac237e7b
PG
236%dir /var/lib/asterisk/images
237%dir /var/lib/asterisk/keys
7605fc79
AM
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
de95e0fb 242%dir /var/lib/asterisk/sounds
8ac733fc 243%dir /var/lib/asterisk/sounds/digits
f5a8d2bc 244%dir /var/lib/asterisk/sounds/dictate
7605fc79 245%dir /var/lib/asterisk/sounds/followme
8c7a2ffa 246%dir /var/lib/asterisk/sounds/letters
247%dir /var/lib/asterisk/sounds/phonetic
bc8e0c20 248%dir /var/lib/asterisk/sounds/silence
de95e0fb 249/var/lib/asterisk/images/*.jpg
de95e0fb 250/var/lib/asterisk/keys/*.pub
de95e0fb 251/var/lib/asterisk/sounds/*.gsm
ac237e7b 252/var/lib/asterisk/sounds/digits/*.gsm
f5a8d2bc 253/var/lib/asterisk/sounds/dictate/*.gsm
7605fc79 254/var/lib/asterisk/sounds/followme/*.gsm
8c7a2ffa 255/var/lib/asterisk/sounds/letters/*.gsm
256/var/lib/asterisk/sounds/phonetic/*.gsm
bc8e0c20 257/var/lib/asterisk/sounds/silence/*.gsm
8ac733fc 258%dir /var/spool/asterisk
9b09fef6 259%dir /var/spool/asterisk/monitor
f5a8d2bc 260#%%dir /var/spool/asterisk/vm
a0ad6913
PG
261%dir /var/spool/asterisk/voicemail
262%dir /var/spool/asterisk/voicemail/default
6293eeaf 263%dir /var/spool/asterisk/voicemail/default/1234
8729ab54 264%dir /var/log/asterisk
1f0eb408 265%dir /var/log/asterisk/cdr-csv
591f7fb9 266%{_mandir}/man8/asterisk.8*
f5a8d2bc 267%{_mandir}/man8/astgenkey.8*
268%{_mandir}/man8/autosupport.8*
269%{_mandir}/man8/safe_asterisk.8*
d8121cb9 270%dir /var/lib/asterisk/firmware
271%dir /var/lib/asterisk/firmware/iax
272/var/lib/asterisk/firmware/iax/iaxy.bin
8ac733fc 273
a838f328 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
7605fc79 279%attr(755,root,root) /var/lib/asterisk/agi-bin/jukebox.agi
a838f328 280/var/spool/asterisk/voicemail/default/1234/busy.gsm
281/var/spool/asterisk/voicemail/default/1234/unavail.gsm
282
de95e0fb 283#%dir /var/lib/asterisk/agi-bin/*
8ac733fc
PG
284
285%files devel
286%defattr(644,root,root,755)
287%dir %{_includedir}/asterisk
de95e0fb 288%{_includedir}/asterisk/*.h
7605fc79 289%{_includedir}/asterisk.h
This page took 0.135805 seconds and 4 git commands to generate.