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