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