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