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