]> git.pld-linux.org Git - packages/callweaver.git/blob - callweaver.spec
- up to snap 20070508
[packages/callweaver.git] / callweaver.spec
1 %bcond_with     misdn
2 %bcond_with     javascript
3 #
4 %define snap    20070508
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:  c784e7511e77d363b4282a6913f345c4
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 %clean
105 rm -rf $RPM_BUILD_ROOT
106
107 %pre
108 %groupadd -g 192 %{name}
109 %useradd -u 192 -d /var/lib/callweaver -s /bin/false -c "callweaver" -g %{name} %{name}
110
111 %post
112 /sbin/chkconfig --add %{name}
113 %service %{name} restart
114
115
116 %preun
117 if [ "$1" = "0" ]; then
118         %service -q %{name} stop
119         /sbin/chkconfig --del %{name}
120 fi
121
122 %postun
123 if [ "$1" = "0" ]; then
124         %userremove callweaver
125         %groupremove %{name}
126 fi
127
128 %files
129 %defattr(644,root,root,755)
130 %doc AUTHORS BUGS CREDITS ChangeLog HARDWARE InstallGuide.txt README SECURITY sounds.txt
131 %doc doc
132 %dir %{_sysconfdir}/%{name}
133 %attr(640,root,callweaver) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.*
134 %attr(755,root,root) %{_bindir}/*
135 %attr(755,root,root) %{_sbindir}/*
136 %dir %{_libdir}/%{name}
137 %attr(755,root,root) %{_libdir}/%{name}/*.so.*
138 %{_libdir}/%{name}/*.la
139 %dir %{_libdir}/%{name}/modules
140 %attr(755,root,root) %{_libdir}/%{name}/modules/*.so
141 %{_libdir}/%{name}/modules/*.la
142 %{_datadir}/%{name}
143 %{_mandir}/man*/*
144
145 %attr(750,callweaver,root) %dir %{_var}/lib/callweaver
146 %attr(750,callweaver,root) %dir %{_var}/log/callweaver
147 %attr(750,callweaver,root) %dir %{_var}/log/callweaver/*
148 %attr(750,callweaver,root) %dir %{_var}/run/callweaver
149 %attr(750,callweaver,root) %dir %{_var}/spool/callweaver
150
151 %attr(754,root,root) /etc/rc.d/init.d/%{name}
152 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
153 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
154
155 %files devel
156 %defattr(644,root,root,755)
157 %{_includedir}/%{name}
This page took 0.0782350000000001 seconds and 4 git commands to generate.