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