]> git.pld-linux.org Git - packages/asterisk.git/blob - asterisk.spec
- builds with new pwlib/openh323
[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 # - put chan_h323 into separate package and make obsoletes to chan_oh323 from external spec
6 #   These two h323 plugin are conflicting...
7 # - CFLAGS passing
8 #
9 # Conditional build:
10 %bcond_without  openh323        # without OpenH323 support
11 #
12 Summary:        Asterisk PBX
13 Summary(pl):    Centralka (PBX) Asterisk
14 Name:           asterisk
15 Version:        1.0.7
16 Release:        1
17 License:        GPL v2
18 Group:          Applications/System
19 Source0:        ftp://ftp.digium.com/pub/%{name}/%{name}-%{version}.tar.gz
20 # Source0-md5:  4cc3c1e4a1b12e0e4c748326ad153291
21 Source1:        %{name}.init
22 Source2:        %{name}.sysconfig
23 Patch0:         %{name}-openh323-makefile.patch
24 Patch1:         %{name}-Makefile_fix_gcc33.patch
25 Patch2:         %{name}-no_k6_on_sparc.patch
26 Patch3:         %{name}-lib.patch
27 Patch4:         %{name}-openh323-formats.patch
28 Patch5:         %{name}-openh323-rtti.patch
29 # It's included, but these sources are broken by me :)
30 # will fit on clean cvs source
31 #Patch1:                %{name}-DESTDIR.patch
32 #Patch2:                %{name}-Makefile2.patch
33 URL:            http://www.asterisk.org/
34 BuildRequires:  bison
35 BuildRequires:  gawk
36 #BuildRequires: glib-devel
37 #BuildRequires: gtk+-devel
38 BuildRequires:  libpri-devel
39 BuildRequires:  mysql-devel
40 BuildRequires:  ncurses-devel
41 BuildRequires:  openssl-devel >= 0.9.7d
42 BuildRequires:  sed >= 4.0
43 BuildRequires:  speex-devel
44 BuildRequires:  zaptel-devel
45 BuildRequires:  zlib-devel
46 #BuildRequires: mpg123
47 # These libraries are crazy...
48 # With openh323 1.11.7 and pwlib 1.4.11 i had sig11
49 #BuildRequires: openh323-devel = 1.10.4
50 #BuildRequires: pwlib-devel = 1.4.4
51 %{?with_openh323:BuildRequires: openh323-devel}
52 %{?with_openh323:BuildRequires: pwlib-devel}
53 PreReq:         rc-scripts
54 Requires(post,preun):   /sbin/chkconfig
55 %{?with_openh323:%requires_eq   openh323}
56 %{?with_openh323:%requires_eq   pwlib}
57 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58
59 %description
60 Asterisk is an Open Source PBX and telephony development platform that
61 can both replace a conventional PBX and act as a platform for
62 developing custom telephony applications for delivering dynamic
63 content over a telephone similarly to how one can deliver dynamic
64 content through a web browser using CGI and a web server.
65
66 Asterisk talks to a variety of telephony hardware including BRI, PRI,
67 POTS, and IP telephony clients using the Inter-Asterisk eXchange
68 protocol (e.g. gnophone or miniphone). For more information and a
69 current list of supported hardware, see http://www.asterisk.org/.
70
71 %description -l pl
72 Asterisk to wolnodostêpna centralka (PBX) i platforma programistyczna
73 dla telefonii, mog±ca zast±piæ konwencjonalne PBX-y oraz s³u¿yæ jako
74 platforma do rozwijania w³asnych aplikacji telefonicznych do
75 przekazywania dynamicznej tre¶ci przez telefon, podobnie jak mo¿na
76 przekazywaæ dynamiczn± tre¶æ przez przegl±darkê WWW przy u¿yciu CGI i
77 serwera WWW.
78
79 Asterisk wspó³pracuje z wielorakim sprzêtem telefonicznym, w tym BRI,
80 PRI, POTS oraz klienty telefonii IP u¿ywaj±ce protoko³u Inter-Asterisk
81 eXchange (np. gnophone lub miniphone). Wiêcej informacji i listê
82 obs³ugiwanego sprzêtu mo¿na znale¼æ pod http://www.asterisk.org/.
83
84 %package devel
85 Summary:        Header files for Asterisk platform
86 Summary(pl):    Pliki nag³ówkowe platformy Asterisk
87 Group:          Development
88 Requires:       %{name} = %{version}-%{release}
89
90 %description devel
91 Header files for Asterisk development platform.
92
93 %description devel -l pl
94 Pliki nag³ówkowe platformy programistycznej Asterisk.
95
96 %package examples
97 Summary:        Example files for the Asterisk PBX
98 Summary(pl):    Pliki przyk³adowe dla centralki Asterisk
99 Group:          Applications/System
100 Requires:       %{name} = %{version}-%{release}
101
102 %description examples
103 Example files for the Asterisk PBX.
104
105 %description examples -l pl
106 Pliki przyk³adowe dla centralki Asterisk.
107
108 %prep
109 %setup -q
110 %patch1 -p0
111 %patch2
112 %patch3 -p1
113 %patch4 -p1
114 %patch5 -p1
115
116 sed -i -e "s#/usr/lib/#/usr/%{_lib}/#g#" Makefile
117
118 %build
119 rm -f pbx/.depend
120 %{__make} -j1 \
121         CC="%{__cc}" \
122         OPTIMIZE="%{rpmcflags}"
123
124 %if %{with openh323}
125 # H323 plugin:
126 %{__make} -j1 -C channels/h323 \
127         PWLIBDIR="%{_prefix}" \
128         OPENH323DIR="%{_prefix}" \
129         CC="%{__cc}" \
130         CFLAGS="%{rpmcflags} -I/usr/include/openh323 -fPIC -I../../include"
131
132 %endif
133
134 # it requires doxygen - I don't know if we should do this...
135 #%{__make} progdocs
136
137 %install
138 rm -rf $RPM_BUILD_ROOT
139 install -d $RPM_BUILD_ROOT{/var/{log/asterisk/cdr-csv,spool/asterisk/monitor},/etc/{rc.d/init.d,sysconfig}}
140
141 %{__make} -j1 install \
142         DESTDIR=$RPM_BUILD_ROOT 
143 %{__make} -j1 samples \
144         DESTDIR=$RPM_BUILD_ROOT
145
146 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
147 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
148
149 %if %{with openh323}
150 install channels/h323/h323.conf.sample $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/h323.conf
151 %endif
152
153 %clean
154 rm -rf $RPM_BUILD_ROOT
155
156 %post
157 /sbin/chkconfig --add asterisk
158 if [ -f /var/lock/subsys/asterisk ]; then
159         /etc/rc.d/init.d/asterisk restart 1>&2
160 else
161         echo "Run \"/etc/rc.d/init.d/asterisk start\" to start Asterisk daemon."
162 fi
163
164 %preun
165 if [ "$1" = "0" ]; then
166         if [ -f /var/lock/subsys/asterisk ]; then
167                 /etc/rc.d/init.d/asterisk stop 1>&2
168         fi
169         /sbin/chkconfig --del asterisk
170 fi
171
172 %files
173 %defattr(644,root,root,755)
174 %doc BUGS ChangeLog CREDITS HARDWARE README* SECURITY configs doc/{*.txt,linkedlists.README}
175 %attr(755,root,root) %{_sbindir}/*
176 %dir %{_sysconfdir}/asterisk
177 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/%{name}
178 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sysconfig/%{name}
179 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/asterisk/*.conf
180 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/asterisk/*.adsi
181 %dir %{_libdir}/asterisk
182 %dir %{_libdir}/asterisk/modules
183 %attr(755,root,root) %{_libdir}/asterisk/modules/*.so
184 %dir /var/lib/asterisk
185 %dir /var/lib/asterisk/agi-bin
186 %dir /var/lib/asterisk/images
187 %dir /var/lib/asterisk/keys
188 %dir /var/lib/asterisk/mohmp3
189 /var/lib/asterisk/mohmp3/fpm-calm-river.mp3
190 /var/lib/asterisk/mohmp3/fpm-sunshine.mp3
191 /var/lib/asterisk/mohmp3/fpm-world-mix.mp3
192 %dir /var/lib/asterisk/sounds
193 %dir /var/lib/asterisk/sounds/digits
194 %dir /var/lib/asterisk/sounds/letters
195 %dir /var/lib/asterisk/sounds/phonetic
196 /var/lib/asterisk/images/*.jpg
197 /var/lib/asterisk/keys/*.pub
198 /var/lib/asterisk/sounds/*.gsm
199 /var/lib/asterisk/sounds/digits/*.gsm
200 /var/lib/asterisk/sounds/letters/*.gsm
201 /var/lib/asterisk/sounds/phonetic/*.gsm
202 %dir /var/spool/asterisk
203 %dir /var/spool/asterisk/monitor
204 %dir /var/spool/asterisk/vm
205 %dir /var/spool/asterisk/voicemail
206 %dir /var/spool/asterisk/voicemail/default
207 %dir /var/log/asterisk
208 %dir /var/log/asterisk/cdr-csv
209 %{_mandir}/man8/asterisk.8*
210 %dir /var/lib/asterisk/firmware
211 %dir /var/lib/asterisk/firmware/iax
212 /var/lib/asterisk/firmware/iax/iaxy.bin
213
214 %files examples
215 %defattr(644,root,root,755)
216 %attr(755,root,root) /var/lib/asterisk/agi-bin/agi-test.agi
217 %attr(755,root,root) /var/lib/asterisk/agi-bin/eagi-sphinx-test
218 %attr(755,root,root) /var/lib/asterisk/agi-bin/eagi-test
219 /var/spool/asterisk/voicemail/default/1234/busy.gsm
220 /var/spool/asterisk/voicemail/default/1234/unavail.gsm
221
222 # RedHat specific init script file
223 #%attr(754,root,root) /etc/rc.d/init.d/asterisk
224 #%dir /var/lib/asterisk/agi-bin/*
225
226 %files devel
227 %defattr(644,root,root,755)
228 %dir %{_includedir}/asterisk
229 %{_includedir}/asterisk/*.h
This page took 0.040456 seconds and 3 git commands to generate.