]> git.pld-linux.org Git - packages/asterisk.git/blame - asterisk.spec
- logrotate
[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
AM
54BuildRequires: iksemel-devel
55BuildRequires: libpri-devel >= 1.2.4
82475f50
PG
56BuildRequires: mysql-devel
57BuildRequires: ncurses-devel
12ec33bf 58BuildRequires: openssl-devel >= 0.9.7d
fa4054d8 59BuildRequires: rpmbuild(macros) >= 1.268
591f7fb9 60BuildRequires: sed >= 4.0
7605fc79 61%{?with_rxfax:BuildRequires: spandsp-devel-%{_spandsp_version}}
fa4054d8 62BuildRequires: speex-devel
405b262e 63BuildRequires: unixODBC-devel
7605fc79 64BuildRequires: zaptel-devel >= 1.2.10
82475f50 65BuildRequires: zlib-devel
7605fc79
AM
66BuildRequires: openh323-devel
67BuildRequires: pwlib-devel
b9bcfe5b 68Requires(post,preun): /sbin/chkconfig
fa4054d8 69Requires: rc-scripts
7605fc79
AM
70%requires_eq openh323
71%requires_eq pwlib
8ac733fc
PG
72BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
73
74%description
75Asterisk is an Open Source PBX and telephony development platform that
76can both replace a conventional PBX and act as a platform for
77developing custom telephony applications for delivering dynamic
78content over a telephone similarly to how one can deliver dynamic
79content through a web browser using CGI and a web server.
80
81Asterisk talks to a variety of telephony hardware including BRI, PRI,
82POTS, and IP telephony clients using the Inter-Asterisk eXchange
83protocol (e.g. gnophone or miniphone). For more information and a
8c7a2ffa 84current list of supported hardware, see http://www.asterisk.org/.
de95e0fb 85
82de9d0d
JR
86%description -l pl.UTF-8
87Asterisk to wolnodostępna centralka (PBX) i platforma programistyczna
88dla telefonii, mogąca zastąpić konwencjonalne PBX-y oraz służyć jako
89platforma do rozwijania własnych aplikacji telefonicznych do
90przekazywania dynamicznej treści przez telefon, podobnie jak można
91przekazywać dynamiczną treść przez przeglądarkę WWW przy użyciu CGI i
de95e0fb
JB
92serwera WWW.
93
82de9d0d
JR
94Asterisk współpracuje z wielorakim sprzętem telefonicznym, w tym BRI,
95PRI, POTS oraz klienty telefonii IP używające protokołu Inter-Asterisk
96eXchange (np. gnophone lub miniphone). Więcej informacji i listę
97obsługiwanego sprzętu można znaleźć pod http://www.asterisk.org/.
8ac733fc
PG
98
99%package devel
de95e0fb 100Summary: Header files for Asterisk platform
3dd43888 101Summary(pl.UTF-8): Pliki nagłówkowe platformy Asterisk
8ac733fc 102Group: Development
8ac733fc
PG
103
104%description devel
de95e0fb 105Header files for Asterisk development platform.
8ac733fc 106
82de9d0d
JR
107%description devel -l pl.UTF-8
108Pliki nagłówkowe platformy programistycznej Asterisk.
8ac733fc 109
a838f328 110%package examples
111Summary: Example files for the Asterisk PBX
3dd43888 112Summary(pl.UTF-8): Pliki przykładowe dla centralki Asterisk
a838f328 113Group: Applications/System
fb0589cb 114Requires: %{name} = %{version}-%{release}
a838f328 115
116%description examples
fb0589cb 117Example files for the Asterisk PBX.
a838f328 118
82de9d0d
JR
119%description examples -l pl.UTF-8
120Pliki przykładowe dla centralki Asterisk.
a838f328 121
8ac733fc 122%prep
7605fc79 123%setup -q -n %{name}-%{version}
62ea1c5e
AM
124
125%{?with_zhone:sed -i -e 's|.*#define.*ZHONE_HACK.*|#define ZHONE_HACK 1|g' channels/chan_zap.c}
126
e621aa3e 127#%patch1 -p1
7605fc79
AM
128#%patch2 -p1
129#%patch3 -p1
f5a8d2bc 130#%patch4 -p1
131#%patch5 -p1
132#%patch6 -p1
133#%patch7 -p1
8d0a3e58 134%patch8 -p1
f5a8d2bc 135#%patch9 -p1
8ac733fc 136
496d7f51 137%if %{with rxfax}
138cd apps
19b2566c 139%patch10 -p0
fa4054d8
ER
140cp %{SOURCE10} .
141cp %{SOURCE11} .
496d7f51 142%endif
143
7605fc79
AM
144%patch11 -p1
145
146%if %{with bluetooth}
147%patch12 -p1
148%endif
149
36a72b9c
AM
150%patch13 -p1
151
7605fc79 152sed -i -e "s#/usr/lib/#/usr/%{_lib}/#g#" Makefile
4f8d0ca9 153
8ac733fc 154%build
dd54f70d 155rm -f pbx/.depend
3074f789 156
7605fc79
AM
157%{__aclocal}
158%{__autoconf}
159
e621aa3e 160CPPFLAGS="-I/usr/include/openh323"; export CPPFLAGS
7605fc79
AM
161%configure
162
163cp -f .cleancount .lastclean
164
2d4cecf8 165%{__make} -j1 -C menuselect \
e621aa3e
AM
166 CC="%{__cc}" \
167 OPTIMIZE="%{rpmcflags}"
168
169%{__make} -j1 \
170 CC="%{__cc}" \
171 OPTIMIZE="%{rpmcflags}" \
2d4cecf8
AM
172 CHANNEL_LIBS+=chan_bluetooth.so || :
173
174# rerun needed; asterisk want's that
175%{__make} -j1 \
176 CC="%{__cc}" \
177 OPTIMIZE="%{rpmcflags}" \
e621aa3e 178 CHANNEL_LIBS+=chan_bluetooth.so
39a285f2 179
8ac733fc
PG
180# it requires doxygen - I don't know if we should do this...
181#%{__make} progdocs
182
183%install
184rm -rf $RPM_BUILD_ROOT
046a2286 185install -d $RPM_BUILD_ROOT{/var/{log/asterisk/cdr-csv,spool/asterisk/monitor},/etc/{rc.d/init.d,sysconfig,logrotate.d}}
8729ab54 186
7605fc79
AM
187install %{SOURCE3} sounds
188install %{SOURCE4} sounds
046a2286 189install %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
7605fc79 190
d54a6170 191%{__make} -j1 install \
87a2b1b8 192 DESTDIR=$RPM_BUILD_ROOT
d54a6170 193%{__make} -j1 samples \
a838f328 194 DESTDIR=$RPM_BUILD_ROOT
39a285f2 195
48b81789
PG
196install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
197install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
198
de95e0fb
JB
199%clean
200rm -rf $RPM_BUILD_ROOT
201
80067fcb
PG
202%post
203/sbin/chkconfig --add asterisk
195243b4
AM
204# this was insane; breaking all current calls
205#%%service asterisk restart "Asterisk daemon"
80067fcb
PG
206
207%preun
208if [ "$1" = "0" ]; then
fa4054d8 209 %service asterisk stop
80067fcb
PG
210 /sbin/chkconfig --del asterisk
211fi
212
8ac733fc
PG
213%files
214%defattr(644,root,root,755)
7605fc79 215%doc BUGS ChangeLog CHANGES CREDITS README* UPGRADE.txt configs doc/*.txt
de95e0fb 216%attr(755,root,root) %{_sbindir}/*
8ac733fc 217%dir %{_sysconfdir}/asterisk
87a2b1b8 218%attr(754,root,root) /etc/rc.d/init.d/%{name}
046a2286 219%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
87a2b1b8
ER
220%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
221%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/*.conf
222%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/*.adsi
223%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/extensions.ael
8ac733fc
PG
224%dir %{_libdir}/asterisk
225%dir %{_libdir}/asterisk/modules
de95e0fb 226%attr(755,root,root) %{_libdir}/asterisk/modules/*.so
8ac733fc
PG
227%dir /var/lib/asterisk
228%dir /var/lib/asterisk/agi-bin
ac237e7b
PG
229%dir /var/lib/asterisk/images
230%dir /var/lib/asterisk/keys
7605fc79
AM
231%dir /var/lib/asterisk/moh
232/var/lib/asterisk/moh/fpm-calm-river.wav
233/var/lib/asterisk/moh/fpm-sunshine.wav
234/var/lib/asterisk/moh/fpm-world-mix.wav
de95e0fb 235%dir /var/lib/asterisk/sounds
8ac733fc 236%dir /var/lib/asterisk/sounds/digits
f5a8d2bc 237%dir /var/lib/asterisk/sounds/dictate
7605fc79 238%dir /var/lib/asterisk/sounds/followme
8c7a2ffa 239%dir /var/lib/asterisk/sounds/letters
240%dir /var/lib/asterisk/sounds/phonetic
bc8e0c20 241%dir /var/lib/asterisk/sounds/silence
de95e0fb 242/var/lib/asterisk/images/*.jpg
de95e0fb 243/var/lib/asterisk/keys/*.pub
de95e0fb 244/var/lib/asterisk/sounds/*.gsm
ac237e7b 245/var/lib/asterisk/sounds/digits/*.gsm
f5a8d2bc 246/var/lib/asterisk/sounds/dictate/*.gsm
7605fc79 247/var/lib/asterisk/sounds/followme/*.gsm
8c7a2ffa 248/var/lib/asterisk/sounds/letters/*.gsm
249/var/lib/asterisk/sounds/phonetic/*.gsm
bc8e0c20 250/var/lib/asterisk/sounds/silence/*.gsm
8ac733fc 251%dir /var/spool/asterisk
9b09fef6 252%dir /var/spool/asterisk/monitor
f5a8d2bc 253#%%dir /var/spool/asterisk/vm
a0ad6913
PG
254%dir /var/spool/asterisk/voicemail
255%dir /var/spool/asterisk/voicemail/default
6293eeaf 256%dir /var/spool/asterisk/voicemail/default/1234
8729ab54 257%dir /var/log/asterisk
1f0eb408 258%dir /var/log/asterisk/cdr-csv
591f7fb9 259%{_mandir}/man8/asterisk.8*
f5a8d2bc 260%{_mandir}/man8/astgenkey.8*
261%{_mandir}/man8/autosupport.8*
262%{_mandir}/man8/safe_asterisk.8*
d8121cb9 263%dir /var/lib/asterisk/firmware
264%dir /var/lib/asterisk/firmware/iax
265/var/lib/asterisk/firmware/iax/iaxy.bin
8ac733fc 266
a838f328 267%files examples
268%defattr(644,root,root,755)
269%attr(755,root,root) /var/lib/asterisk/agi-bin/agi-test.agi
270%attr(755,root,root) /var/lib/asterisk/agi-bin/eagi-sphinx-test
271%attr(755,root,root) /var/lib/asterisk/agi-bin/eagi-test
7605fc79 272%attr(755,root,root) /var/lib/asterisk/agi-bin/jukebox.agi
a838f328 273/var/spool/asterisk/voicemail/default/1234/busy.gsm
274/var/spool/asterisk/voicemail/default/1234/unavail.gsm
275
de95e0fb 276#%dir /var/lib/asterisk/agi-bin/*
8ac733fc
PG
277
278%files devel
279%defattr(644,root,root,755)
280%dir %{_includedir}/asterisk
de95e0fb 281%{_includedir}/asterisk/*.h
7605fc79 282%{_includedir}/asterisk.h
This page took 0.104568 seconds and 4 git commands to generate.