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