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