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