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