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