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