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