1 %bcond_with simpledebug # for safe_callweaver core dump storing
4 %define min_spandsp 1:0.0.4-0.pre9.1
6 Summary: PBX in software
7 Summary(pl.UTF-8): Programowy PBX
13 Source0: http://devs.callweaver.org/1.2_snapshots/callweaver-RC-1.1.99.%{snap}.tar.gz
14 # Source0-md5: f52285ed499003f5c96b41259ba05d9c
16 Source2: %{name}.sysconfig
17 Source3: %{name}.logrotate
18 URL: http://www.callweaver.org/
19 BuildRequires: bluez-libs-devel
20 BuildRequires: curl-devel
21 BuildRequires: libcap-devel
22 BuildRequires: libogg-devel
23 BuildRequires: libpri-devel
24 BuildRequires: libsndfile-devel
25 BuildRequires: libtiff-devel
26 BuildRequires: libvorbis-devel
27 BuildRequires: loudmouth-devel
28 BuildRequires: mISDNuser-devel
29 BuildRequires: mysql-devel
30 BuildRequires: ncurses-devel
31 BuildRequires: pkgconfig
32 BuildRequires: popt-devel
33 BuildRequires: postgresql-devel
34 BuildRequires: readline-devel
35 BuildRequires: rpmbuild(macros) >= 1.268
36 BuildRequires: spandsp-devel >= %{min_spandsp}
37 BuildRequires: speex-devel
38 BuildRequires: sqlite3-devel
39 BuildRequires: unixODBC-devel
40 BuildRequires: zaptel-devel >= 1.2
41 BuildRequires: zlib-devel
42 Requires: spandsp >= %{min_spandsp}
43 Requires(post,preun): /sbin/chkconfig
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 Open Source PBX and telephony toolkit. It is, in a sense, middleware
48 between Internet and telephony channels on the bottom, and Internet
49 and telephony applications at the top.
51 %description -l pl.UTF-8
52 PBX i zestaw narzędziowy do telefonii o otwartych źródłach. Jest to
53 middleware między kanałami internetowymi i telefonicznymi z dołu a
54 aplikacjami internetowymi i telefonicznymi z góry.
57 Summary: Header files for callweaver
58 Summary(pl.UTF-8): Pliki nagłówkowe callweavera
59 Group: Development/Libraries
60 Requires: %{name} = %{version}-%{release}
63 Header files for callweaver.
65 %description devel -l pl.UTF-8
66 Pliki nagłówkowe callweavera.
68 %if %{with simpledebug}
69 %define no_install_post_strip 1
73 %setup -q -n %{name}-RC-1.1.99.%{snap}
79 --with-chan_bluetooth \
82 --with-res_config_odbc \
86 --with-res_config_mysql \
89 --with-res_config_pgsql \
90 --with-res_config_curl \
93 %if %{with javascript}
98 --with-directory-layout=lsb
103 rm -rf $RPM_BUILD_ROOT
104 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,logrotate.d}
105 install -d $RPM_BUILD_ROOT%{_var}/spool/callweaver/voicemail
108 DESTDIR=$RPM_BUILD_ROOT
110 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
111 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
112 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
115 rm -rf $RPM_BUILD_ROOT
118 %groupadd -g 192 %{name}
119 %useradd -u 192 -d /var/lib/callweaver -s /bin/false -c "callweaver" -g %{name} %{name}
122 /sbin/chkconfig --add %{name}
123 %service %{name} restart
127 if [ "$1" = "0" ]; then
128 %service -q %{name} stop
129 /sbin/chkconfig --del %{name}
133 if [ "$1" = "0" ]; then
134 %userremove callweaver
139 %defattr(644,root,root,755)
140 %doc AUTHORS BUGS CREDITS ChangeLog HARDWARE InstallGuide.txt README SECURITY sounds.txt
142 %dir %{_sysconfdir}/%{name}
143 %attr(640,root,callweaver) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.*
144 %attr(755,root,root) %{_bindir}/*
145 %attr(755,root,root) %{_sbindir}/*
146 %dir %{_libdir}/%{name}
147 %attr(755,root,root) %{_libdir}/%{name}/*.so.*
148 %{_libdir}/%{name}/*.la
149 %dir %{_libdir}/%{name}/modules
150 %attr(755,root,root) %{_libdir}/%{name}/modules/*.so
151 %{_libdir}/%{name}/modules/*.la
155 %attr(750,callweaver,root) %dir %{_var}/lib/callweaver
156 %attr(750,callweaver,root) %dir %{_var}/lib/callweaver/core
157 %attr(750,callweaver,root) %dir %{_var}/log/callweaver
158 %attr(750,callweaver,root) %dir %{_var}/log/callweaver/*
159 %attr(750,callweaver,root) %dir %{_var}/run/callweaver
160 %attr(750,callweaver,root) %dir %{_var}/spool/callweaver
161 %attr(750,callweaver,root) %dir %{_var}/spool/callweaver/voicemail
163 %attr(754,root,root) /etc/rc.d/init.d/%{name}
164 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
165 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
168 %defattr(644,root,root,755)
169 %{_includedir}/%{name}