]> git.pld-linux.org Git - packages/asterisk.git/blob - asterisk.spec
- verify flags for configs
[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 %define         _snap   20030520
10
11 Summary:        Asterisk PBX
12 Summary(pl):    Centralka (PBX) Asterisk
13 Name:           asterisk
14 Version:        0.4.0.%{_snap}
15 Release:        0.2
16 License:        GPL v2
17 Group:          Applications/System
18 #Source0:       ftp://ftp.asterisk.org/pub/telephony/asterisk/%{name}-%{version}.tar.gz
19 Source0:        %{name}-%{version}.tar.bz2
20 # Source0-md5:  a6cdb08e4201bed9457053d20f6923da
21 Source1:        %{name}.init
22 Source2:        %{name}.sysconfig
23 Patch0:         %{name}-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
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 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 %prep
86 %setup -q -n %{name}
87 %patch0 -p1
88 #%patch1 -p1
89 %patch2 -p1
90
91 %build
92 rm -f pbx/.depend
93 %{__make}
94
95 # H323 plugin:
96 cd channels/h323/
97 %{__make} \
98         PWLIBDIR="/usr" \
99         OPENH323DIR="/usr"
100 cd ../../
101
102 # it requires doxygen - I don't know if we should do this...
103 #%{__make} progdocs
104
105 %install
106 rm -rf $RPM_BUILD_ROOT
107 install -d $RPM_BUILD_ROOT{/var/{log/asterisk/cdr-csv,spool/asterisk/monitor},/etc/{rc.d/init.d,sysconfig}}
108
109 %{__make} install \
110         DESTDIR=$RPM_BUILD_ROOT \
111         INSTALL_PREFIX=$RPM_BUILD_ROOT
112 %{__make} samples \
113         DESTDIR=$RPM_BUILD_ROOT \
114         INSTALL_PREFIX=$RPM_BUILD_ROOT
115
116 cd channels/h323/
117 %{__make} install \
118         DESTDIR=$RPM_BUILD_ROOT \
119         INSTALL_PREFIX=$RPM_BUILD_ROOT
120 %{__make} samples \
121         DESTDIR=$RPM_BUILD_ROOT \
122         INSTALL_PREFIX=$RPM_BUILD_ROOT
123 cd ../../
124
125 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
126 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
127
128 %clean
129 rm -rf $RPM_BUILD_ROOT
130
131 %post
132 /sbin/chkconfig --add asterisk
133 if [ -f /var/lock/subsys/asterisk ]; then
134         /etc/rc.d/init.d/asterisk restart 1>&2
135 else
136         echo "Run \"/etc/rc.d/init.d/asterisk start\" to start Asterisk daemon."
137 fi
138
139 %preun
140 if [ "$1" = "0" ]; then
141         if [ -f /var/lock/subsys/asterisk ]; then
142                 /etc/rc.d/init.d/asterisk stop 1>&2
143         fi
144         /sbin/chkconfig --del asterisk
145 fi
146
147 %files
148 %defattr(644,root,root,755)
149 %doc BUGS ChangeLog CREDITS HARDWARE README* SECURITY configs doc/{*.txt,linkedlists.README}
150 %attr(755,root,root) %{_sbindir}/*
151 %dir %{_sysconfdir}/asterisk
152 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/%{name}
153 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sysconfig/%{name}
154 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/asterisk/*.conf
155 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/asterisk/*.adsi
156 %dir %{_libdir}/asterisk
157 %dir %{_libdir}/asterisk/modules
158 %attr(755,root,root) %{_libdir}/asterisk/modules/*.so
159 %dir /var/lib/asterisk
160 %dir /var/lib/asterisk/agi-bin
161 %dir /var/lib/asterisk/images
162 %dir /var/lib/asterisk/keys
163 %dir /var/lib/asterisk/mohmp3
164 %dir /var/lib/asterisk/sounds
165 %dir /var/lib/asterisk/sounds/digits
166 /var/lib/asterisk/images/*.jpg
167 /var/lib/asterisk/keys/*.pub
168 /var/lib/asterisk/sounds/*.gsm
169 /var/lib/asterisk/sounds/digits/*.gsm
170 %dir /var/spool/asterisk
171 %dir /var/spool/asterisk/monitor
172 %dir /var/spool/asterisk/vm
173 %dir /var/spool/asterisk/voicemail
174 %dir /var/spool/asterisk/voicemail/default
175 %dir /var/log/asterisk
176 %dir /var/log/asterisk/cdr-csv
177
178 # RedHat specific init script file
179 #%attr(754,root,root) /etc/rc.d/init.d/asterisk
180 #%dir /var/lib/asterisk/agi-bin/*
181
182 %files devel
183 %defattr(644,root,root,755)
184 %dir %{_includedir}/asterisk
185 %{_includedir}/asterisk/*.h
This page took 0.046439 seconds and 4 git commands to generate.