]> git.pld-linux.org Git - packages/asterisk.git/blame - asterisk.spec
- added CVE reference for revision 1.97
[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
32Patch1: %{name}-configure.patch
93f9bb41 33Patch2: %{name}-no_k6_on_sparc.patch
5658cdd6 34Patch3: %{name}-lib.patch
8d0a3e58 35Patch8: %{name}-awk.patch
496d7f51 36Source10: http://soft-switch.org/downloads/spandsp/spandsp-%{_spandsp_version}/asterisk-1.2.x/app_txfax.c
19b2566c 37# Source10-md5: 8c8fcb263b76897022b4c28052a7b439
496d7f51 38Source11: 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
41Patch10: %{name}-txfax-Makefile.patch
7605fc79
AM
42Patch11: %{name}-fix-ptlib.patch
43Patch12: %{name}-chan_bluetooth.patch
36a72b9c 44Patch13: %{name}-zhone.patch
8c7a2ffa 45URL: http://www.asterisk.org/
7605fc79
AM
46BuildRequires: autoconf
47BuildRequires: automake
7346b8fc 48BuildRequires: bison
7605fc79 49%{?with_bluetooth:BuildRequires: bluez-devel}
8a8cbd07 50BuildRequires: freetds >= 0.63
7346b8fc 51BuildRequires: gawk
19b2566c 52BuildRequires: gcc >= 5:3.4
7605fc79
AM
53BuildRequires: iksemel-devel
54BuildRequires: libpri-devel >= 1.2.4
82475f50
PG
55BuildRequires: mysql-devel
56BuildRequires: ncurses-devel
12ec33bf 57BuildRequires: openssl-devel >= 0.9.7d
fa4054d8 58BuildRequires: rpmbuild(macros) >= 1.268
591f7fb9 59BuildRequires: sed >= 4.0
7605fc79 60%{?with_rxfax:BuildRequires: spandsp-devel-%{_spandsp_version}}
fa4054d8 61BuildRequires: speex-devel
405b262e 62BuildRequires: unixODBC-devel
7605fc79 63BuildRequires: zaptel-devel >= 1.2.10
82475f50 64BuildRequires: zlib-devel
7605fc79
AM
65BuildRequires: openh323-devel
66BuildRequires: pwlib-devel
b9bcfe5b 67Requires(post,preun): /sbin/chkconfig
fa4054d8 68Requires: rc-scripts
7605fc79
AM
69%requires_eq openh323
70%requires_eq pwlib
8ac733fc
PG
71BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
72
73%description
74Asterisk is an Open Source PBX and telephony development platform that
75can both replace a conventional PBX and act as a platform for
76developing custom telephony applications for delivering dynamic
77content over a telephone similarly to how one can deliver dynamic
78content through a web browser using CGI and a web server.
79
80Asterisk talks to a variety of telephony hardware including BRI, PRI,
81POTS, and IP telephony clients using the Inter-Asterisk eXchange
82protocol (e.g. gnophone or miniphone). For more information and a
8c7a2ffa 83current list of supported hardware, see http://www.asterisk.org/.
de95e0fb 84
82de9d0d
JR
85%description -l pl.UTF-8
86Asterisk to wolnodostępna centralka (PBX) i platforma programistyczna
87dla telefonii, mogąca zastąpić konwencjonalne PBX-y oraz służyć jako
88platforma do rozwijania własnych aplikacji telefonicznych do
89przekazywania dynamicznej treści przez telefon, podobnie jak można
90przekazywać dynamiczną treść przez przeglądarkę WWW przy użyciu CGI i
de95e0fb
JB
91serwera WWW.
92
82de9d0d
JR
93Asterisk współpracuje z wielorakim sprzętem telefonicznym, w tym BRI,
94PRI, POTS oraz klienty telefonii IP używające protokołu Inter-Asterisk
95eXchange (np. gnophone lub miniphone). Więcej informacji i listę
96obsługiwanego sprzętu można znaleźć pod http://www.asterisk.org/.
8ac733fc
PG
97
98%package devel
de95e0fb 99Summary: Header files for Asterisk platform
3dd43888 100Summary(pl.UTF-8): Pliki nagłówkowe platformy Asterisk
8ac733fc 101Group: Development
8ac733fc
PG
102
103%description devel
de95e0fb 104Header files for Asterisk development platform.
8ac733fc 105
82de9d0d
JR
106%description devel -l pl.UTF-8
107Pliki nagłówkowe platformy programistycznej Asterisk.
8ac733fc 108
a838f328 109%package examples
110Summary: Example files for the Asterisk PBX
3dd43888 111Summary(pl.UTF-8): Pliki przykładowe dla centralki Asterisk
a838f328 112Group: Applications/System
fb0589cb 113Requires: %{name} = %{version}-%{release}
a838f328 114
115%description examples
fb0589cb 116Example files for the Asterisk PBX.
a838f328 117
82de9d0d
JR
118%description examples -l pl.UTF-8
119Pliki 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}
137cd apps
19b2566c 138%patch10 -p0
fa4054d8
ER
139cp %{SOURCE10} .
140cp %{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 151sed -i -e "s#/usr/lib/#/usr/%{_lib}/#g#" Makefile
4f8d0ca9 152
8ac733fc 153%build
dd54f70d 154rm -f pbx/.depend
3074f789 155
7605fc79
AM
156%{__aclocal}
157%{__autoconf}
158
e621aa3e 159CPPFLAGS="-I/usr/include/openh323"; export CPPFLAGS
7605fc79
AM
160%configure
161
162cp -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
183rm -rf $RPM_BUILD_ROOT
1f0eb408 184install -d $RPM_BUILD_ROOT{/var/{log/asterisk/cdr-csv,spool/asterisk/monitor},/etc/{rc.d/init.d,sysconfig}}
8729ab54 185
7605fc79
AM
186install %{SOURCE3} sounds
187install %{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
194install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
195install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
196
de95e0fb
JB
197%clean
198rm -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
206if [ "$1" = "0" ]; then
fa4054d8 207 %service asterisk stop
80067fcb
PG
208 /sbin/chkconfig --del asterisk
209fi
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
This page took 0.083035 seconds and 4 git commands to generate.