]> git.pld-linux.org Git - packages/callweaver.git/blob - callweaver.spec
- up to 20070923 + add zhone hack
[packages/callweaver.git] / callweaver.spec
1 %bcond_with     simpledebug # for safe_callweaver core dump storing
2 %bcond_with     zhone # zhone hack
3 %bcond_with     javascript
4 #
5 %define min_spandsp     1:0.0.4-0.pre9.1
6 %define snap    20070923
7 Summary:        PBX in software
8 Summary(pl.UTF-8):      Programowy PBX
9 Name:           callweaver
10 Version:        1.2.0
11 Release:        0.%{snap}.1
12 License:        GPL v2+
13 Group:          Applications
14 Source0:        http://devs.callweaver.org/1.2_snapshots/callweaver-RC-1.1.99.%{snap}.tar.gz
15 # Source0-md5:  0c89a054826383f1e59c1ea49c0e7960
16 Source1:        %{name}.init
17 Source2:        %{name}.sysconfig
18 Source3:        %{name}.logrotate
19 URL:            http://www.callweaver.org/
20 BuildRequires:  bluez-libs-devel
21 BuildRequires:  curl-devel
22 BuildRequires:  libcap-devel
23 BuildRequires:  libogg-devel
24 BuildRequires:  libpri-devel
25 BuildRequires:  libsndfile-devel
26 BuildRequires:  libtiff-devel
27 BuildRequires:  libvorbis-devel
28 BuildRequires:  loudmouth-devel
29 BuildRequires:  mISDNuser-devel
30 BuildRequires:  mysql-devel
31 BuildRequires:  ncurses-devel
32 BuildRequires:  pkgconfig
33 BuildRequires:  popt-devel
34 BuildRequires:  postgresql-devel
35 BuildRequires:  readline-devel
36 BuildRequires:  rpmbuild(macros) >= 1.268
37 BuildRequires:  spandsp-devel >= %{min_spandsp}
38 BuildRequires:  speex-devel
39 BuildRequires:  sqlite3-devel
40 BuildRequires:  unixODBC-devel
41 BuildRequires:  zaptel-devel >= 1.2
42 BuildRequires:  zlib-devel
43 Requires:       spandsp >= %{min_spandsp}
44 Requires(post,preun):   /sbin/chkconfig
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
48 Open Source PBX and telephony toolkit. It is, in a sense, middleware
49 between Internet and telephony channels on the bottom, and Internet
50 and telephony applications at the top.
51
52 %description -l pl.UTF-8
53 PBX i zestaw narzędziowy do telefonii o otwartych źródłach. Jest to
54 middleware między kanałami internetowymi i telefonicznymi z dołu a
55 aplikacjami internetowymi i telefonicznymi z góry.
56
57 %package devel
58 Summary:        Header files for callweaver
59 Summary(pl.UTF-8):      Pliki nagłówkowe callweavera
60 Group:          Development/Libraries
61 Requires:       %{name} = %{version}-%{release}
62
63 %description devel
64 Header files for callweaver.
65
66 %description devel -l pl.UTF-8
67 Pliki nagłówkowe callweavera.
68
69 %if %{with simpledebug}
70 %define no_install_post_strip   1
71 %endif
72
73 %prep
74 %setup -q -n %{name}-RC-1.1.99.%{snap}
75 %{?with_zhone:sed -i -e 's|.*#define.*ZHONE_HACK.*|#define ZHONE_HACK 1|g' channels/chan_zap.c}
76
77 %build
78 %configure \
79         --with-chan_misdn \
80         --with-chan_fax \
81         --with-chan_bluetooth \
82         --enable-odbc \
83         --with-cdr_odbc \
84         --with-res_config_odbc \
85         --with-res_odbc \
86         --enable-mysql \
87         --with-cdr_mysql \
88         --with-res_config_mysql \
89         --enable-postgresql \
90         --with-cdr_pgsql \
91         --with-res_config_pgsql \
92         --with-res_config_curl \
93         --enable-jabber \
94         --with-res_jabber \
95 %if %{with javascript}
96         --enable-javascript \
97         --with-res_js \
98 %endif
99         --with-res_sqlite \
100         --with-directory-layout=lsb
101
102 %{__make}
103
104 %install
105 rm -rf $RPM_BUILD_ROOT
106 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,logrotate.d}
107 install -d $RPM_BUILD_ROOT%{_var}/spool/callweaver/voicemail
108
109 %{__make} install \
110         DESTDIR=$RPM_BUILD_ROOT
111
112 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
113 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
114 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
115
116 %clean
117 rm -rf $RPM_BUILD_ROOT
118
119 %pre
120 %groupadd -g 192 %{name}
121 %useradd -u 192 -d /var/lib/callweaver -s /bin/false -c "callweaver" -g %{name} %{name}
122
123 %post
124 /sbin/chkconfig --add %{name}
125 %service %{name} restart
126
127
128 %preun
129 if [ "$1" = "0" ]; then
130         %service -q %{name} stop
131         /sbin/chkconfig --del %{name}
132 fi
133
134 %postun
135 if [ "$1" = "0" ]; then
136         %userremove callweaver
137         %groupremove %{name}
138 fi
139
140 %files
141 %defattr(644,root,root,755)
142 %doc AUTHORS BUGS CREDITS ChangeLog HARDWARE InstallGuide.txt README SECURITY sounds.txt
143 %doc doc
144 %dir %{_sysconfdir}/%{name}
145 %attr(640,root,callweaver) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.*
146 %attr(755,root,root) %{_bindir}/*
147 %attr(755,root,root) %{_sbindir}/*
148 %dir %{_libdir}/%{name}
149 %attr(755,root,root) %{_libdir}/%{name}/*.so.*
150 %{_libdir}/%{name}/*.la
151 %dir %{_libdir}/%{name}/modules
152 %attr(755,root,root) %{_libdir}/%{name}/modules/*.so
153 %{_libdir}/%{name}/modules/*.la
154 %{_datadir}/%{name}
155 %{_mandir}/man*/*
156
157 %attr(750,callweaver,root) %dir %{_var}/lib/callweaver
158 %attr(750,callweaver,root) %dir %{_var}/lib/callweaver/core
159 %attr(750,callweaver,root) %dir %{_var}/log/callweaver
160 %attr(750,callweaver,root) %dir %{_var}/log/callweaver/*
161 %attr(750,callweaver,root) %dir %{_var}/run/callweaver
162 %attr(750,callweaver,root) %dir %{_var}/spool/callweaver
163 %attr(750,callweaver,root) %dir %{_var}/spool/callweaver/voicemail
164
165 %attr(754,root,root) /etc/rc.d/init.d/%{name}
166 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
167 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
168
169 %files devel
170 %defattr(644,root,root,755)
171 %{_includedir}/%{name}
This page took 0.072848 seconds and 4 git commands to generate.