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