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