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