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