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