|
# $Id: ejabberd.spec,v 1.6 2008/06/25 20:50:43 gnujpl Exp $ |
|
|
# Authority: gnujpl |
|
|
# Name: Jean-Paul Leclère |
|
|
|
|
1 |
Name: ejabberd |
Name: ejabberd |
2 |
Version: 2.0.1 |
Version: 2.0.5 |
3 |
Release: 4%{?dist} |
Release: 2%{?dist} |
4 |
Summary: A distributed, fault-tolerant Jabber/XMPP server |
Summary: A distributed, fault-tolerant Jabber/XMPP server |
5 |
|
|
6 |
Group: Applications/Internet |
Group: Applications/Internet |
7 |
License: GPLv2+ |
License: GPLv2+ |
8 |
URL: http://www.ejabberd.im/ |
URL: http://www.ejabberd.im/ |
9 |
Source0: http://www.process-one.net/downloads/%{name}/%{version}/%{name}-%{version}_2.tar.gz |
Source0: http://www.process-one.net/downloads/%{name}/%{version}/%{name}-%{version}.tar.gz |
10 |
Source1: ejabberd.init |
Source1: ejabberd.init |
11 |
Source2: ejabberd.logrotate |
Source2: ejabberd.logrotate |
12 |
|
Source3: ejabberd.sysconfig |
13 |
|
|
14 |
# http://ejabberd.jabber.ru/ejabberdctl-extra |
# http://www.ejabberd.im/mod_ctlextra |
15 |
Source4: https://svn.process-one.net/ejabberd-modules/mod_ctlextra/trunk/src/mod_ctlextra.erl |
# svn export -r 873 https://svn.process-one.net/ejabberd-modules/mod_ctlextra/trunk/src/mod_ctlextra.erl |
16 |
|
Source4: mod_ctlextra.erl |
17 |
|
|
18 |
# The following were extracted from a patch found on http://realloc.spb.ru/share/ejabberdad.html |
# The following were extracted from a patch found on http://realloc.spb.ru/share/ejabberdad.html |
19 |
Source5: ejabberd_auth_ad.erl |
Source5: ejabberd_auth_ad.erl |
20 |
Source6: mod_shared_roster_ad.erl |
Source6: mod_shared_roster_ad.erl |
21 |
Source7: mod_vcard_ad.erl |
Source7: mod_vcard_ad.erl |
22 |
# |
|
23 |
#Source8: ejabberdctl |
# PAM support |
24 |
Source9: ejabberdctl.pam |
Source9: ejabberdctl.pam |
25 |
Source10: ejabberdctl.apps |
Source10: ejabberdctl.apps |
26 |
|
Source11: ejabberd.pam |
27 |
|
|
28 |
# Fedora-specific stuff - fixing paths |
# Fedora-specific stuff - fixing paths |
29 |
Patch1: ejabberd-build.patch |
Patch1: ejabberd-build.patch |
30 |
# BZ# 439583, 452326, 451554 |
# BZ# 439583, 452326, 451554, 465196 |
31 |
Patch2: ejabberd-ejabberdctl_fix.diff |
Patch2: ejabberd-ejabberdctl_fix.diff |
32 |
|
# Use ejabberd as an example for PAM service name |
33 |
|
Patch3: ejabberd-ejabberd_cfg_pam_name.diff |
34 |
|
# CAPTCHA support, see https://support.process-one.net/doc/display/XAAI/Fighting+Multi-User+Chat+SPAM+with+CAPTCHA |
35 |
|
# wget https://support.process-one.net/secure/attachment/13851/XEP-0158_ejabberd-2.0.4.patch -O ejabberd-captcha.patch |
36 |
|
Patch4: ejabberd-captcha.patch |
37 |
|
|
38 |
|
|
39 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
40 |
|
|
43 |
BuildRequires: pam-devel |
BuildRequires: pam-devel |
44 |
BuildRequires: erlang |
BuildRequires: erlang |
45 |
BuildRequires: dos2unix |
BuildRequires: dos2unix |
46 |
%if %{?rhel:0}%{!?rhel:1} |
%if %{undefined rhel} |
47 |
BuildRequires: hevea |
BuildRequires: hevea |
48 |
%endif |
%endif |
49 |
|
|
50 |
Requires: erlang |
Requires: erlang |
51 |
Requires: usermode |
Requires: usermode |
52 |
|
|
53 |
#Requires(pre): fedora-usermgmt |
Requires(pre): fedora-usermgmt |
54 |
Requires(post): /sbin/chkconfig |
Requires(post): /sbin/chkconfig |
55 |
|
Requires(post): /usr/bin/openssl |
56 |
Requires(preun): /sbin/chkconfig |
Requires(preun): /sbin/chkconfig |
57 |
Requires(preun): /sbin/service |
Requires(preun): /sbin/service |
58 |
Requires(postun): /sbin/service |
Requires(postun): /sbin/service |
74 |
Documentation for ejabberd. |
Documentation for ejabberd. |
75 |
|
|
76 |
%pre |
%pre |
77 |
/usr/sbin/groupadd 33 -r ejabberd &>/dev/null || : |
/usr/sbin/fedora-groupadd 27 -r ejabberd &>/dev/null || : |
78 |
/usr/sbin/useradd 33 -r -s /sbin/nologin -d /var/lib/ejabberd -M \ |
/usr/sbin/fedora-useradd 27 -r -s /sbin/nologin -d /var/lib/ejabberd -M \ |
79 |
-c 'ejabberd' -g ejabberd ejabberd &>/dev/null || : |
-c 'ejabberd' -g ejabberd ejabberd &>/dev/null || : |
80 |
|
|
81 |
%post |
%post |
82 |
/sbin/chkconfig --add ejabberd |
/sbin/chkconfig --add ejabberd |
83 |
|
|
84 |
|
(cd /etc/ejabberd |
85 |
|
if [ ! -f ejabberd.pem ] |
86 |
|
then |
87 |
|
echo "Generating SSL certificate /etc/ejabberd/ejabberd.pem..." |
88 |
|
HOSTNAME=$(hostname -s) |
89 |
|
DOMAINNAME=$(hostname -d) |
90 |
|
openssl req -new -x509 -days 365 -nodes -out ejabberd.pem \ |
91 |
|
-keyout ejabberd.pem > /dev/null 2>&1 <<+++ |
92 |
|
. |
93 |
|
. |
94 |
|
. |
95 |
|
$DOMAINNAME |
96 |
|
$HOSTNAME |
97 |
|
ejabberd |
98 |
|
root@$HOSTNAME.$DOMAINNAME |
99 |
|
+++ |
100 |
|
chown ejabberd:ejabberd ejabberd.pem |
101 |
|
chmod 600 ejabberd.pem |
102 |
|
fi) |
103 |
|
|
104 |
%preun |
%preun |
105 |
if [ $1 = 0 ]; then |
if [ $1 = 0 ]; then |
106 |
/sbin/service ejabberd stop >/dev/null 2>&1 |
/sbin/service ejabberd stop >/dev/null 2>&1 |
113 |
fi |
fi |
114 |
|
|
115 |
%prep |
%prep |
116 |
%setup -q -n %{name}-%{version} |
%setup -q |
117 |
%patch1 -p0 -b .fix_paths |
%patch1 -p0 -b .fix_paths |
118 |
%patch2 -p0 -b .fix_user |
%patch2 -p0 -b .fix_user |
119 |
|
%patch3 -p0 -b .pam_name |
120 |
|
#%patch4 -p1 -b .captcha |
121 |
dos2unix src/odbc/mssql.sql |
dos2unix src/odbc/mssql.sql |
122 |
|
|
123 |
cp %{S:4} src |
cp %{S:4} src |
131 |
# doesn't builds on SMP currently |
# doesn't builds on SMP currently |
132 |
make |
make |
133 |
popd |
popd |
134 |
%if %{?rhel:0}%{!?rhel:1} |
%if %{undefined rhel} |
135 |
pushd doc |
pushd doc |
136 |
make html pdf |
make html pdf |
137 |
popd |
popd |
153 |
|
|
154 |
mkdir -p %{buildroot}%{_bindir} |
mkdir -p %{buildroot}%{_bindir} |
155 |
ln -s consolehelper %{buildroot}%{_bindir}/ejabberdctl |
ln -s consolehelper %{buildroot}%{_bindir}/ejabberdctl |
|
#install -D -p -m 0755 %{S:8} %{buildroot}%{_sbindir}/ejabberdctl |
|
156 |
install -D -p -m 0644 %{S:9} %{buildroot}%{_sysconfdir}/pam.d/ejabberdctl |
install -D -p -m 0644 %{S:9} %{buildroot}%{_sysconfdir}/pam.d/ejabberdctl |
157 |
install -D -p -m 0644 %{S:10} %{buildroot}%{_sysconfdir}/security/console.apps/ejabberdctl |
install -D -p -m 0644 %{S:10} %{buildroot}%{_sysconfdir}/security/console.apps/ejabberdctl |
158 |
|
install -D -p -m 0644 %{S:11} %{buildroot}%{_sysconfdir}/pam.d/ejabberd |
159 |
|
|
160 |
|
# install init-script |
161 |
|
install -D -p -m 0755 %{S:1} %{buildroot}%{_initrddir}/ejabberd |
162 |
|
|
163 |
mkdir -p %{buildroot}%{_initrddir} |
# install config for logrotate |
164 |
install -p -m 0755 %{S:1} %{buildroot}%{_initrddir}/ejabberd |
install -D -p -m 0644 %{S:2} %{buildroot}%{_sysconfdir}/logrotate.d/ejabberd |
|
chmod a+x %{buildroot}%{_initrddir}/ejabberd |
|
165 |
|
|
166 |
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d |
# install sysconfig file |
167 |
cp -p %{S:2} %{buildroot}%{_sysconfdir}/logrotate.d/ejabberd |
install -D -p -m 0644 %{S:3} %{buildroot}%{_sysconfdir}/sysconfig/ejabberd |
168 |
|
|
169 |
%{__perl} -pi -e 's!\@libdir\@!%{_libdir}!g' %{buildroot}%{_initrddir}/ejabberd %{buildroot}%{_sysconfdir}/logrotate.d/ejabberd %{buildroot}%{_sbindir}/ejabberdctl |
%{__perl} -pi -e 's!\@libdir\@!%{_libdir}!g' %{buildroot}%{_initrddir}/ejabberd %{buildroot}%{_sysconfdir}/logrotate.d/ejabberd %{buildroot}%{_sbindir}/ejabberdctl |
170 |
%{__perl} -pi -e 's!\@version\@!%{version}!g' %{buildroot}%{_initrddir}/ejabberd %{buildroot}%{_sysconfdir}/logrotate.d/ejabberd %{buildroot}%{_sbindir}/ejabberdctl |
%{__perl} -pi -e 's!\@version\@!%{version}!g' %{buildroot}%{_initrddir}/ejabberd %{buildroot}%{_sysconfdir}/logrotate.d/ejabberd %{buildroot}%{_sbindir}/ejabberdctl |
178 |
%files |
%files |
179 |
%defattr(-,root,root,-) |
%defattr(-,root,root,-) |
180 |
%doc COPYING src/odbc/mysql.sql src/odbc/mssql.sql src/odbc/pg.sql |
%doc COPYING src/odbc/mysql.sql src/odbc/mssql.sql src/odbc/pg.sql |
181 |
|
# tools/captcha.sh |
182 |
|
|
183 |
%attr(750,ejabberd,ejabberd) %dir %{_sysconfdir}/ejabberd |
%attr(750,ejabberd,ejabberd) %dir %{_sysconfdir}/ejabberd |
184 |
%attr(640,ejabberd,ejabberd) %config(noreplace) %{_sysconfdir}/ejabberd/ejabberd.cfg |
%attr(640,ejabberd,ejabberd) %config(noreplace) %{_sysconfdir}/ejabberd/ejabberd.cfg |
187 |
|
|
188 |
%{_initrddir}/ejabberd |
%{_initrddir}/ejabberd |
189 |
%config(noreplace) %{_sysconfdir}/logrotate.d/ejabberd |
%config(noreplace) %{_sysconfdir}/logrotate.d/ejabberd |
190 |
|
%config(noreplace) %{_sysconfdir}/sysconfig/ejabberd |
191 |
|
%config(noreplace) %{_sysconfdir}/pam.d/ejabberd |
192 |
%config(noreplace) %{_sysconfdir}/pam.d/ejabberdctl |
%config(noreplace) %{_sysconfdir}/pam.d/ejabberdctl |
193 |
%config(noreplace) %{_sysconfdir}/security/console.apps/ejabberdctl |
%config(noreplace) %{_sysconfdir}/security/console.apps/ejabberdctl |
194 |
%{_bindir}/ejabberdctl |
%{_bindir}/ejabberdctl |
198 |
%dir %{_libdir}/%{name}/ebin |
%dir %{_libdir}/%{name}/ebin |
199 |
%dir %{_libdir}/%{name}/priv |
%dir %{_libdir}/%{name}/priv |
200 |
%dir %{_libdir}/%{name}/priv/bin |
%dir %{_libdir}/%{name}/priv/bin |
201 |
|
%attr(4750,root,ejabberd) %{_libdir}/%{name}/priv/bin/epam |
202 |
%dir %{_libdir}/%{name}/priv/lib |
%dir %{_libdir}/%{name}/priv/lib |
203 |
%dir %{_libdir}/%{name}/priv/msgs |
%dir %{_libdir}/%{name}/priv/msgs |
204 |
|
|
206 |
%{_libdir}/%{name}/ebin/*.beam |
%{_libdir}/%{name}/ebin/*.beam |
207 |
%{_libdir}/%{name}/priv/lib/*.so |
%{_libdir}/%{name}/priv/lib/*.so |
208 |
%{_libdir}/%{name}/priv/msgs/*.msg |
%{_libdir}/%{name}/priv/msgs/*.msg |
|
%{_libdir}/%{name}/priv/bin/epam |
|
209 |
|
|
210 |
%attr(750,ejabberd,ejabberd) %dir /var/lib/ejabberd |
%attr(750,ejabberd,ejabberd) %dir /var/lib/ejabberd |
211 |
%attr(750,ejabberd,ejabberd) %dir /var/lib/ejabberd/spool |
%attr(750,ejabberd,ejabberd) %dir /var/lib/ejabberd/spool |
212 |
%attr(750,ejabberd,ejabberd) %dir /var/log/ejabberd |
%attr(750,ejabberd,ejabberd) %dir /var/log/ejabberd |
|
%attr(4750,root,ejabberd) %{_libdir}/%{name}/priv/bin/epam |
|
213 |
|
|
214 |
%files doc |
%files doc |
215 |
%defattr(-,root,root,-) |
%defattr(-,root,root,-) |
216 |
%if %{?rhel:0}%{!?rhel:1} |
%if %{undefined rhel} |
217 |
%doc ChangeLog COPYING doc/release_notes_* doc/*.pdf doc/*.html doc/*.png |
%doc ChangeLog COPYING doc/release_notes_* doc/*.pdf doc/*.html doc/*.png |
218 |
%else |
%else |
219 |
%doc ChangeLog COPYING doc/release_notes_* |
%doc ChangeLog COPYING doc/release_notes_* |
220 |
%endif |
%endif |
221 |
|
|
222 |
%changelog |
%changelog |
223 |
* Wed Jun 25 2008 Jean-Paul Leclere <jean-paul@leclere.org> 2.0.1-4.sme |
* Sat Apr 4 2009 Peter Lemenkov <lemenkov@gmail.com> 2.0.5-2 |
224 |
- Don't use fedora-usermgmt |
- Really disable CAPTCHA |
225 |
- set ejabberd uid to 33 for SME compatibility |
|
226 |
- enable pam auth (thanks to daniel@firewall-servicers.com) |
* Fri Apr 3 2009 Peter Lemenkov <lemenkov@gmail.com> 2.0.5-1 |
227 |
- only spec file changes |
- Ver. 2.0.5 |
228 |
|
- Temporarily disabled CAPTCHA support |
229 |
|
|
230 |
|
* Sun Mar 15 2009 Peter Lemenkov <lemenkov@gmail.com> 2.0.4-2 |
231 |
|
- Support for CAPTCHA (XEP-0158) |
232 |
|
- Updated mod_ctlextra.erl (fixed EJAB-789, EJAB-864) |
233 |
|
|
234 |
|
* Sun Mar 15 2009 Peter Lemenkov <lemenkov@gmail.com> 2.0.4-1 |
235 |
|
- Ver. 2.0.4 |
236 |
|
|
237 |
|
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-2 |
238 |
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
239 |
|
|
240 |
|
* Mon Jan 26 2009 Peter Lemenkov <lemenkov@gmail.com> 2.0.3-1 |
241 |
|
- Ver. 2.0.3 |
242 |
|
- Merged some stuff from git://dev.laptop.org/users/martin/ejabberd-xs.git |
243 |
|
|
244 |
|
* Fri Jan 16 2009 Tomas Mraz <tmraz@redhat.com> 2.0.2-4 |
245 |
|
- rebuild with new openssl |
246 |
|
|
247 |
|
* Thu Oct 2 2008 Peter Lemenkov <lemenkov@gmail.com> 2.0.2-3 |
248 |
|
- Fixed broken ejabberdctl (BZ# 465196) |
249 |
|
|
250 |
|
* Sat Aug 30 2008 Peter Lemenkov <lemenkov@gmail.com> 2.0.2-2 |
251 |
|
- Added missing Requires |
252 |
|
|
253 |
|
* Fri Aug 29 2008 Peter Lemenkov <lemenkov@gmail.com> 2.0.2-1 |
254 |
|
- Ver. 2.0.2 |
255 |
|
|
256 |
|
* Sat Aug 9 2008 Peter Lemenkov <lemenkov@gmail.com> 2.0.2-0.3.beta1 |
257 |
|
- PAM support (BZ# 452803) |
258 |
|
|
259 |
|
* Sat Aug 9 2008 Peter Lemenkov <lemenkov@gmail.com> 2.0.2-0.2.beta1 |
260 |
|
- Fix build with --fuzz=0 |
261 |
|
|
262 |
|
* Sat Aug 9 2008 Peter Lemenkov <lemenkov@gmail.com> 2.0.2-0.1.beta1 |
263 |
|
- Version 2.0.2-beta1 |
264 |
|
- Fixed BZ# 452326 |
265 |
|
- Fixed BZ# 227270 |
266 |
|
|
267 |
* Sun Jun 22 2008 Peter Lemenkov <lemenkov@gmail.com> 2.0.1-4 |
* Sun Jun 22 2008 Peter Lemenkov <lemenkov@gmail.com> 2.0.1-4 |
268 |
- Last minute fix (issue with shortnames/fqdn) |
- Last minute fix (issue with shortnames/fqdn) |