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