3 %bcond_with simpledebug # for safe_callweaver core dump storing
4 %bcond_with zhone # with zhone hack
5 %bcond_with javascript # with javascript support
7 %define min_spandsp 1:0.0.6-0.pre12
8 Summary: PBX in software
9 Summary(pl.UTF-8): Programowy PBX
15 Source0: http://devs.callweaver.org/release/callweaver-%{version}.tar.bz2
16 # Source0-md5: 54c2ba5852cbe43b802b4605584b5754
18 Source2: %{name}.sysconfig
19 Source3: %{name}.logrotate
20 URL: http://www.callweaver.org/
21 BuildRequires: bluez-libs-devel
22 BuildRequires: curl-devel
23 BuildRequires: libcap-devel
24 BuildRequires: libogg-devel
25 BuildRequires: libpri-devel
26 BuildRequires: libsndfile-devel
27 BuildRequires: libtiff-devel
28 BuildRequires: libvorbis-devel
29 BuildRequires: loudmouth-devel
30 BuildRequires: mISDNuser-devel
31 BuildRequires: mysql-devel
32 BuildRequires: ncurses-devel
33 BuildRequires: pkgconfig
34 BuildRequires: popt-devel
35 BuildRequires: postgresql-devel
36 BuildRequires: readline-devel
37 BuildRequires: rpmbuild(macros) >= 1.268
38 BuildRequires: spandsp-devel >= %{min_spandsp}
39 BuildRequires: speex-devel
40 BuildRequires: sqlite3-devel
41 BuildRequires: unixODBC-devel
42 BuildRequires: zaptel-devel >= 1.2
43 BuildRequires: zlib-devel
44 Requires: spandsp >= %{min_spandsp}
45 Requires(post,preun): /sbin/chkconfig
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 Open Source PBX and telephony toolkit. It is, in a sense, middleware
50 between Internet and telephony channels on the bottom, and Internet
51 and telephony applications at the top.
53 %description -l pl.UTF-8
54 PBX i zestaw narzędziowy do telefonii o otwartych źródłach. Jest to
55 middleware między kanałami internetowymi i telefonicznymi z dołu a
56 aplikacjami internetowymi i telefonicznymi z góry.
59 Summary: Header files for callweaver
60 Summary(pl.UTF-8): Pliki nagłówkowe callweavera
61 Group: Development/Libraries
62 Requires: %{name} = %{version}-%{release}
65 Header files for callweaver.
67 %description devel -l pl.UTF-8
68 Pliki nagłówkowe callweavera.
70 %if %{with simpledebug}
71 %define no_install_post_strip 1
77 %{?with_zhone:sed -i -e 's|.*#define.*ZHONE_HACK.*|#define ZHONE_HACK 1|g' channels/chan_zap.c}
83 --with-chan_bluetooth \
86 --with-res_config_odbc \
90 --with-res_config_mysql \
93 --with-res_config_pgsql \
94 --with-res_config_curl \
97 %if %{with javascript}
102 --with-directory-layout=lsb
107 rm -rf $RPM_BUILD_ROOT
108 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,logrotate.d}
109 install -d $RPM_BUILD_ROOT%{_var}/spool/callweaver/voicemail
112 DESTDIR=$RPM_BUILD_ROOT
114 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
115 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
116 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
119 rm -rf $RPM_BUILD_ROOT
122 %groupadd -g 192 %{name}
123 %useradd -u 192 -d /var/lib/callweaver -s /bin/false -c "callweaver" -g %{name} %{name}
126 /sbin/chkconfig --add %{name}
127 #%%service %%{name} restart
131 if [ "$1" = "0" ]; then
132 %service -q %{name} stop
133 /sbin/chkconfig --del %{name}
137 if [ "$1" = "0" ]; then
138 %userremove callweaver
143 %defattr(644,root,root,755)
144 %doc AUTHORS BUGS CREDITS ChangeLog HARDWARE InstallGuide.txt README SECURITY sounds.txt
146 %dir %{_sysconfdir}/%{name}
147 %attr(640,root,callweaver) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.*
148 %attr(755,root,root) %{_sbindir}/*
149 %dir %{_libdir}/%{name}
150 %attr(755,root,root) %{_libdir}/%{name}/*.so.*
151 %{_libdir}/%{name}/*.la
152 %dir %{_libdir}/%{name}/modules
153 %attr(755,root,root) %{_libdir}/%{name}/modules/*.so
154 %{_libdir}/%{name}/modules/*.la
158 %attr(750,callweaver,root) %dir %{_var}/lib/callweaver
159 %attr(750,callweaver,root) %dir %{_var}/lib/callweaver/core
160 %attr(750,callweaver,root) %dir %{_var}/log/callweaver
161 %attr(750,callweaver,root) %dir %{_var}/log/callweaver/*
162 %attr(750,callweaver,root) %dir %{_var}/run/callweaver
163 %attr(750,callweaver,root) %dir %{_var}/spool/callweaver
164 %attr(750,callweaver,root) %dir %{_var}/spool/callweaver/voicemail
166 %attr(754,root,root) /etc/rc.d/init.d/%{name}
167 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
168 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
171 %defattr(644,root,root,755)
172 %{_includedir}/%{name}