]> git.pld-linux.org Git - packages/asterisk.git/blob - asterisk.spec
- add url for bristuff patch
[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:  libpri-bristuff-devel >= 1.2.4
74 Requires:       libpri-bristuff
75 %endif
76 Requires(post,preun):   /sbin/chkconfig
77 Requires:       rc-scripts
78 %requires_eq    openh323
79 %requires_eq    pwlib
80 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
81
82 %description
83 Asterisk is an Open Source PBX and telephony development platform that
84 can both replace a conventional PBX and act as a platform for
85 developing custom telephony applications for delivering dynamic
86 content over a telephone similarly to how one can deliver dynamic
87 content through a web browser using CGI and a web server.
88
89 Asterisk talks to a variety of telephony hardware including BRI, PRI,
90 POTS, and IP telephony clients using the Inter-Asterisk eXchange
91 protocol (e.g. gnophone or miniphone). For more information and a
92 current list of supported hardware, see http://www.asterisk.org/.
93
94 %description -l pl.UTF-8
95 Asterisk to wolnodostępna centralka (PBX) i platforma programistyczna
96 dla telefonii, mogąca zastąpić konwencjonalne PBX-y oraz służyć jako
97 platforma do rozwijania własnych aplikacji telefonicznych do
98 przekazywania dynamicznej treści przez telefon, podobnie jak można
99 przekazywać dynamiczną treść przez przeglądarkę WWW przy użyciu CGI i
100 serwera WWW.
101
102 Asterisk współpracuje z wielorakim sprzętem telefonicznym, w tym BRI,
103 PRI, POTS oraz klienty telefonii IP używające protokołu Inter-Asterisk
104 eXchange (np. gnophone lub miniphone). Więcej informacji i listę
105 obsługiwanego sprzętu można znaleźć pod http://www.asterisk.org/.
106
107 %package devel
108 Summary:        Header files for Asterisk platform
109 Summary(pl.UTF-8):      Pliki nagłówkowe platformy Asterisk
110 Group:          Development
111
112 %description devel
113 Header files for Asterisk development platform.
114
115 %description devel -l pl.UTF-8
116 Pliki nagłówkowe platformy programistycznej Asterisk.
117
118 %package examples
119 Summary:        Example files for the Asterisk PBX
120 Summary(pl.UTF-8):      Pliki przykładowe dla centralki Asterisk
121 Group:          Applications/System
122 Requires:       %{name} = %{version}-%{release}
123
124 %description examples
125 Example files for the Asterisk PBX.
126
127 %description examples -l pl.UTF-8
128 Pliki przykładowe dla centralki Asterisk.
129
130 %prep
131 %setup -q -n %{name}-%{version}
132
133 %{?with_zhone:sed -i -e 's|.*#define.*ZHONE_HACK.*|#define ZHONE_HACK 1|g' channels/chan_zap.c}
134
135 #%patch1 -p1
136 #%patch2 -p1
137 #%patch3 -p1
138 #%patch4 -p1
139 #%patch5 -p1
140 #%patch6 -p1
141 #%patch7 -p1
142 %patch8 -p1
143 #%patch9 -p1
144
145 %if %{with rxfax}
146 cd apps
147 %patch10 -p0
148 cp %{SOURCE10} .
149 cp %{SOURCE11} .
150 %endif
151
152 %patch11 -p1
153
154 %{?with_bluetooth:%patch12 -p1}
155 %{?with_zhonehack:%patch13 -p1}
156 %{?with_bristuff:%patch14 -p1}
157
158 sed -i -e "s#/usr/lib/#/usr/%{_lib}/#g#" Makefile
159
160 mkdir -p imap/c-client
161 ln -s %{_libdir}/libc-client.a imap/c-client/c-client.a
162 ln -s %{_includedir}/imap/* imap/c-client/
163 echo '-lssl -lpam' > imap/c-client/LDFLAGS
164
165 %build
166 rm -f pbx/.depend
167
168 %{__aclocal}
169 %{__autoconf}
170
171 CPPFLAGS="-I/usr/include/openh323"; export CPPFLAGS
172 %configure \
173         --with-imap="`pwd`"/imap
174
175 cp -f .cleancount .lastclean
176
177 %{__make} -j1 -C menuselect \
178         CC="%{__cc}" \
179         OPTIMIZE="%{rpmcflags}"
180
181 %{__make} -j1 \
182         CC="%{__cc}" \
183         OPTIMIZE="%{rpmcflags}" \
184         CHANNEL_LIBS+=chan_bluetooth.so || :
185
186 # rerun needed; asterisk want's that
187 %{__make} -j1 \
188         CC="%{__cc}" \
189         OPTIMIZE="%{rpmcflags}" \
190         CHANNEL_LIBS+=chan_bluetooth.so
191
192 # it requires doxygen - I don't know if we should do this...
193 #%{__make} progdocs
194
195 %install
196 rm -rf $RPM_BUILD_ROOT
197 install -d $RPM_BUILD_ROOT{/var/{log/asterisk/cdr-csv,spool/asterisk/monitor},/etc/{rc.d/init.d,sysconfig,logrotate.d}}
198
199 install %{SOURCE3} sounds
200 install %{SOURCE4} sounds
201 install %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
202
203 %{__make} -j1 install \
204         DESTDIR=$RPM_BUILD_ROOT
205 %{__make} -j1 samples \
206         DESTDIR=$RPM_BUILD_ROOT
207
208 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
209 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
210
211 %clean
212 rm -rf $RPM_BUILD_ROOT
213
214 %post
215 /sbin/chkconfig --add asterisk
216 # this was insane; breaking all current calls
217 #%%service asterisk restart "Asterisk daemon"
218
219 %preun
220 if [ "$1" = "0" ]; then
221         %service asterisk stop
222         /sbin/chkconfig --del asterisk
223 fi
224
225 %files
226 %defattr(644,root,root,755)
227 %doc BUGS ChangeLog CHANGES CREDITS README* UPGRADE.txt configs doc/*.txt
228 %attr(755,root,root) %{_sbindir}/*
229 %dir %{_sysconfdir}/asterisk
230 %attr(754,root,root) /etc/rc.d/init.d/%{name}
231 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
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
236 %dir %{_libdir}/asterisk
237 %dir %{_libdir}/asterisk/modules
238 %attr(755,root,root) %{_libdir}/asterisk/modules/*.so
239 %dir /var/lib/asterisk
240 %dir /var/lib/asterisk/agi-bin
241 %dir /var/lib/asterisk/images
242 %dir /var/lib/asterisk/keys
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
247 %dir /var/lib/asterisk/sounds
248 %dir /var/lib/asterisk/sounds/digits
249 %dir /var/lib/asterisk/sounds/dictate
250 %dir /var/lib/asterisk/sounds/followme
251 %dir /var/lib/asterisk/sounds/letters
252 %dir /var/lib/asterisk/sounds/phonetic
253 %dir /var/lib/asterisk/sounds/silence
254 /var/lib/asterisk/images/*.jpg
255 /var/lib/asterisk/keys/*.pub
256 /var/lib/asterisk/sounds/*.gsm
257 /var/lib/asterisk/sounds/digits/*.gsm
258 /var/lib/asterisk/sounds/dictate/*.gsm
259 /var/lib/asterisk/sounds/followme/*.gsm
260 /var/lib/asterisk/sounds/letters/*.gsm
261 /var/lib/asterisk/sounds/phonetic/*.gsm
262 /var/lib/asterisk/sounds/silence/*.gsm
263 %dir /var/spool/asterisk
264 %dir /var/spool/asterisk/monitor
265 #%%dir /var/spool/asterisk/vm
266 %dir /var/spool/asterisk/voicemail
267 %dir /var/spool/asterisk/voicemail/default
268 %dir /var/spool/asterisk/voicemail/default/1234
269 %dir /var/log/asterisk
270 %dir /var/log/asterisk/cdr-csv
271 %{_mandir}/man8/asterisk.8*
272 %{_mandir}/man8/astgenkey.8*
273 %{_mandir}/man8/autosupport.8*
274 %{_mandir}/man8/safe_asterisk.8*
275 %dir /var/lib/asterisk/firmware
276 %dir /var/lib/asterisk/firmware/iax
277 /var/lib/asterisk/firmware/iax/iaxy.bin
278
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
284 %attr(755,root,root) /var/lib/asterisk/agi-bin/jukebox.agi
285 /var/spool/asterisk/voicemail/default/1234/busy.gsm
286 /var/spool/asterisk/voicemail/default/1234/unavail.gsm
287
288 #%dir /var/lib/asterisk/agi-bin/*
289
290 %files devel
291 %defattr(644,root,root,755)
292 %dir %{_includedir}/asterisk
293 %{_includedir}/asterisk/*.h
294 %{_includedir}/asterisk.h
This page took 0.056279 seconds and 4 git commands to generate.