1 |
# $Id: ejabberd.spec,v 1.2 2008/05/08 21:12:30 slords Exp $ |
2 |
# Authority: gnujpl |
3 |
# Name: Jean-Paul Leclère |
4 |
|
5 |
Name: ejabberd |
6 |
Version: 2.0.0 |
7 |
Release: 4%{?dist} |
8 |
Summary: A distributed, fault-tolerant Jabber/XMPP server |
9 |
|
10 |
Group: Applications/Internet |
11 |
License: GPLv2 |
12 |
URL: http://www.ejabberd.im/ |
13 |
Source0: http://www.process-one.net/downloads/%{name}/%{version}/%{name}-%{version}.tar.gz |
14 |
Source1: ejabberd.init |
15 |
Source2: ejabberd.logrotate |
16 |
|
17 |
# http://ejabberd.jabber.ru/ejabberdctl-extra |
18 |
Source4: https://svn.process-one.net/ejabberd-modules/mod_ctlextra/trunk/src/mod_ctlextra.erl |
19 |
|
20 |
# The following were extracted from a patch found on http://realloc.spb.ru/share/ejabberdad.html |
21 |
Source5: ejabberd_auth_ad.erl |
22 |
Source6: mod_shared_roster_ad.erl |
23 |
Source7: mod_vcard_ad.erl |
24 |
# |
25 |
#Source8: ejabberdctl |
26 |
Source9: ejabberdctl.pam |
27 |
Source10: ejabberdctl.apps |
28 |
|
29 |
# originally from |
30 |
# https://support.process-one.net/secure/attachment/11788/ejab-446.patch |
31 |
Patch0: ejab-446.patch |
32 |
|
33 |
# local stuff |
34 |
Patch1: ejabberd-build.patch |
35 |
|
36 |
# R12B |
37 |
Patch2: ejabberd-ssl.patch |
38 |
|
39 |
# R11B SSL |
40 |
Patch3: ejabberd_s2s_in_erl.diff |
41 |
|
42 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
43 |
|
44 |
BuildRequires: expat-devel |
45 |
BuildRequires: openssl-devel |
46 |
BuildRequires: pam-devel |
47 |
BuildRequires: erlang |
48 |
%if %{?rhel:0}%{!?rhel:1} |
49 |
BuildRequires: hevea |
50 |
%endif |
51 |
|
52 |
Requires: erlang |
53 |
Requires: usermode |
54 |
|
55 |
Requires(post): /sbin/chkconfig |
56 |
Requires(preun): /sbin/chkconfig |
57 |
Requires(preun): /sbin/service |
58 |
Requires(postun): /sbin/service |
59 |
|
60 |
#https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=250253 |
61 |
ExcludeArch: ppc64 |
62 |
|
63 |
%description |
64 |
ejabberd is a Free and Open Source distributed fault-tolerant |
65 |
Jabber/XMPP server. It is mostly written in Erlang, and runs on many |
66 |
platforms (tested on Linux, FreeBSD, NetBSD, Solaris, Mac OS X and |
67 |
Windows NT/2000/XP). |
68 |
|
69 |
%package doc |
70 |
Summary: Documentation for ejabberd |
71 |
Group: Documentation |
72 |
|
73 |
%description doc |
74 |
Documentation for ejabberd. |
75 |
|
76 |
%pre |
77 |
/usr/sbin/groupadd -g 33 -r ejabberd &>/dev/null || : |
78 |
/usr/sbin/useradd -u 33 -r -s /sbin/nologin -d /var/lib/ejabberd -M \ |
79 |
-c 'ejabberd' -g ejabberd ejabberd &>/dev/null || : |
80 |
|
81 |
%post |
82 |
/sbin/chkconfig --add ejabberd |
83 |
|
84 |
%preun |
85 |
if [ $1 = 0 ]; then |
86 |
/sbin/service ejabberd stop >/dev/null 2>&1 |
87 |
/sbin/chkconfig --del ejabberd |
88 |
fi |
89 |
|
90 |
%postun |
91 |
if [ "$1" -ge "1" ]; then |
92 |
/sbin/service ejabberd condrestart >/dev/null 2>&1 |
93 |
fi |
94 |
|
95 |
%prep |
96 |
%setup -q -n %{name}-%{version} |
97 |
%patch0 -p1 -b .Er12b-build |
98 |
%patch1 -p1 -b .MC-build |
99 |
#%patch2 -p1 -b .R12B |
100 |
%patch3 -p0 -b .r11_ssl |
101 |
|
102 |
%{__perl} -pi -e "s!/var/lib/ejabberd!%{_libdir}/ejabberd-%{version}!g" src/Makefile.in |
103 |
%{__perl} -pi -e "s!/etc!%{_sysconfdir}!g" src/Makefile.in |
104 |
%{__perl} -pi -e "s!\@prefix\@!!g" src/Makefile.in |
105 |
|
106 |
cp %{S:4} src |
107 |
cp %{S:5} src |
108 |
cp %{S:6} src |
109 |
cp %{S:7} src |
110 |
|
111 |
%build |
112 |
pushd src |
113 |
%configure --enable-odbc --enable-debug |
114 |
make %{?_smp_mflags} |
115 |
popd |
116 |
%if %{?rhel:0}%{!?rhel:1} |
117 |
pushd doc |
118 |
make html pdf |
119 |
popd |
120 |
%endif |
121 |
|
122 |
%install |
123 |
rm -rf %{buildroot} |
124 |
|
125 |
pushd src |
126 |
make install DESTDIR=%{buildroot} |
127 |
popd |
128 |
|
129 |
chmod a+x %{buildroot}%{_libdir}/ejabberd-%{version}/priv/lib/*.so |
130 |
|
131 |
%{__perl} -pi -e 's!./ssl.pem!/etc/ejabberd/ejabberd.pem!g' %{buildroot}/etc/ejabberd/ejabberd.cfg |
132 |
|
133 |
mkdir -p %{buildroot}/var/log/ejabberd |
134 |
mkdir -p %{buildroot}/var/lib/ejabberd/spool |
135 |
|
136 |
mkdir -p %{buildroot}%{_bindir} |
137 |
ln -s consolehelper %{buildroot}%{_bindir}/ejabberdctl |
138 |
#install -D -p -m 0755 %{S:8} %{buildroot}%{_sbindir}/ejabberdctl |
139 |
install -D -p -m 0644 %{S:9} %{buildroot}%{_sysconfdir}/pam.d/ejabberdctl |
140 |
install -D -p -m 0644 %{S:10} %{buildroot}%{_sysconfdir}/security/console.apps/ejabberdctl |
141 |
|
142 |
mkdir -p %{buildroot}%{_initrddir} |
143 |
install -p -m 0755 %{S:1} %{buildroot}%{_initrddir}/ejabberd |
144 |
chmod a+x %{buildroot}%{_initrddir}/ejabberd |
145 |
|
146 |
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d |
147 |
cp -p %{S:2} %{buildroot}%{_sysconfdir}/logrotate.d/ejabberd |
148 |
|
149 |
%{__perl} -pi -e 's!\@libdir\@!%{_libdir}!g' %{buildroot}%{_initrddir}/ejabberd %{buildroot}%{_sysconfdir}/logrotate.d/ejabberd %{buildroot}%{_sbindir}/ejabberdctl |
150 |
%{__perl} -pi -e 's!\@version\@!%{version}!g' %{buildroot}%{_initrddir}/ejabberd %{buildroot}%{_sysconfdir}/logrotate.d/ejabberd %{buildroot}%{_sbindir}/ejabberdctl |
151 |
|
152 |
#cp %{S:3} %{buildroot}%{_sysconfdir}/ejabberd/inetrc |
153 |
#mv %{buildroot}%{_sysconfdir}/ejabberd/{ejabberd.,}inetrc |
154 |
|
155 |
%clean |
156 |
rm -rf %{buildroot} |
157 |
|
158 |
%files |
159 |
%defattr(-,root,root,-) |
160 |
%doc COPYING |
161 |
|
162 |
%attr(750,ejabberd,ejabberd) %dir %{_sysconfdir}/ejabberd |
163 |
%attr(640,ejabberd,ejabberd) %config(noreplace) %{_sysconfdir}/ejabberd/ejabberd.cfg |
164 |
%attr(640,ejabberd,ejabberd) %config(noreplace) %{_sysconfdir}/ejabberd/ejabberdctl.cfg |
165 |
%attr(640,ejabberd,ejabberd) %config(noreplace) %{_sysconfdir}/ejabberd/inetrc |
166 |
|
167 |
%{_initrddir}/ejabberd |
168 |
%config(noreplace) %{_sysconfdir}/logrotate.d/ejabberd |
169 |
|
170 |
%config(noreplace) %{_sysconfdir}/pam.d/ejabberdctl |
171 |
%config(noreplace) %{_sysconfdir}/security/console.apps/ejabberdctl |
172 |
%{_bindir}/ejabberdctl |
173 |
%{_sbindir}/ejabberdctl |
174 |
|
175 |
%dir %{_libdir}/ejabberd-%{version} |
176 |
%dir %{_libdir}/ejabberd-%{version}/ebin |
177 |
%{_libdir}/ejabberd-%{version}/ebin/*.app |
178 |
%{_libdir}/ejabberd-%{version}/ebin/*.beam |
179 |
|
180 |
%dir %{_libdir}/ejabberd-%{version}/priv |
181 |
|
182 |
%dir %{_libdir}/ejabberd-%{version}/priv/lib |
183 |
%{_libdir}/ejabberd-%{version}/priv/lib/*.so |
184 |
|
185 |
%dir %{_libdir}/ejabberd-%{version}/priv/msgs |
186 |
%{_libdir}/ejabberd-%{version}/priv/msgs/*.msg |
187 |
|
188 |
%attr(750,ejabberd,ejabberd) %dir /var/lib/ejabberd |
189 |
%attr(750,ejabberd,ejabberd) %dir /var/lib/ejabberd/spool |
190 |
|
191 |
%attr(750,ejabberd,ejabberd) %dir /var/log/ejabberd |
192 |
|
193 |
%files doc |
194 |
%defattr(-,root,root,-) |
195 |
%if %{?rhel:0}%{!?rhel:1} |
196 |
%doc ChangeLog COPYING doc/*.pdf doc/*.html doc/*.png doc/release_notes_* |
197 |
%else |
198 |
%doc ChangeLog COPYING doc/release_notes_* |
199 |
%endif |
200 |
|
201 |
%changelog |
202 |
* Sat May 10 2008 Jean-Paul Leclere <jean-paul@leclere.org> 2.0.0-4 |
203 |
- Don't use fedora-usermgmt |
204 |
- set ejabberd uid to 33 for SME compatibility |
205 |
- only spec file changes |
206 |
|
207 |
* Mon May 5 2008 Peter Lemenkov <lemenkov@gmail.com> 2.0.0-3 |
208 |
- Fix build against R11B-2 |
209 |
|
210 |
* Sat Feb 23 2008 Peter Lemenkov <lemenkov@gmail.com> 2.0.0-2 |
211 |
- Disable docs again for EPEL (we haven't hevea for EPEL) |
212 |
|
213 |
* Sat Feb 23 2008 Peter Lemenkov <lemenkov@gmail.com> 2.0.0-1 |
214 |
- Version 2.0.0 |
215 |
|
216 |
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.0.0-0.4.rc1 |
217 |
- Autorebuild for GCC 4.3 |
218 |
|
219 |
* Wed Jan 23 2008 Peter Lemenkov <lemenkov@gmail.com> 2.0.0-0.3.rc1 |
220 |
- Really enabled some previously disabled modules |
221 |
|
222 |
* Wed Jan 23 2008 Peter Lemenkov <lemenkov@gmail.com> 2.0.0-0.2.rc1 |
223 |
- Enabled some previously disabled modules |
224 |
|
225 |
* Sat Jan 19 2008 Matej Cepl <mcepl@redhat.com> 2.0.0-0.1.rc1 |
226 |
- Upgrade to the current upsteram version. |
227 |
- Make ejabberd.init LSB compliant (missing Provides: tag) |
228 |
|
229 |
* Thu Dec 27 2007 Matej Cepl <mcepl@redhat.com> 2.0.0-0.beta1.mc.1 |
230 |
- Experimental build from the upstream betaversion. |
231 |
|
232 |
* Tue Dec 11 2007 Matej Cepl <mcepl@redhat.com> 1.1.4-2.fc9 |
233 |
- rebuild against new ssl library. |
234 |
- rebuild against the newest erlang (see Patch |
235 |
- fix %%changelog |
236 |
|
237 |
* Wed Sep 5 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.4-1 |
238 |
- Drop LDAP patch |
239 |
- Update mod_ctlextra |
240 |
- Update to 1.1.4 |
241 |
|
242 |
* Tue Sep 4 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.3-11 |
243 |
- Fix ejabberdctl wrapper script - #276071 |
244 |
|
245 |
* Wed Aug 22 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.3-10 |
246 |
- Re-exclude ppc64 |
247 |
|
248 |
* Wed Aug 22 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.3-9 |
249 |
- Fix license |
250 |
- Don't exclude ppc64 |
251 |
|
252 |
* Wed Aug 22 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.3-8 |
253 |
- Bump & rebuild to build against latest erlang package. |
254 |
|
255 |
* Tue Jul 31 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.3-7 |
256 |
- Bump release and rebuild due to Koji hiccups. |
257 |
|
258 |
* Tue Jul 31 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.3-6 |
259 |
- Don't try building on PPC64 since hevea isn't available on PPC64. |
260 |
|
261 |
* Tue Jul 31 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.3-5 |
262 |
- Sigh... |
263 |
|
264 |
* Tue Jul 31 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.3-4 |
265 |
- Don't forget to add patch. |
266 |
|
267 |
* Thu Jul 26 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.3-3 |
268 |
- Add ejabberdctl (#199873) |
269 |
- Add patch to fix LDAP authentication. (#248268) |
270 |
- Add a sleep in init script between stop/start when restarting. |
271 |
- LSB compliance cleanups for init script. (#246917) |
272 |
- Don't mention "reload" in the init script usage string. (#227254) |
273 |
|
274 |
* Tue Jul 24 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.3-2 |
275 |
- Update mod_ctlextra |
276 |
|
277 |
* Fri Feb 2 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.3-1 |
278 |
- Update to 1.1.3 |
279 |
|
280 |
* Wed Oct 11 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.2-2 |
281 |
- Fix logrotate script (BZ#210366) |
282 |
|
283 |
* Mon Aug 28 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.1-10 |
284 |
- Bump release and rebuild. |
285 |
|
286 |
* Mon Jul 3 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.1-9 |
287 |
- Updated init script - should hopefully fix some problems with status & stop commands. |
288 |
|
289 |
* Mon Jun 26 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.1-8 |
290 |
- Bump release to that tagging works on FC-5. |
291 |
|
292 |
* Thu Jun 22 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.1-7 |
293 |
- Oops drop bad patch. |
294 |
|
295 |
* Thu Jun 22 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.1-6 |
296 |
- Split documentation off to a subpackage. |
297 |
- Own %%{_libdir}/ejabberd-%{version} |
298 |
- Mark %%{_sysconfdir}/logrotate.d/ejabberd as %%config |
299 |
|
300 |
* Thu Jun 8 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.1-5 |
301 |
- Patch the makefile so that it adds a soname to shared libs. |
302 |
|
303 |
* Fri May 26 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.1-4 |
304 |
- Modify AD modules not to check for group membership. |
305 |
|
306 |
* Thu May 25 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.1-3 |
307 |
- Add some extra modules |
308 |
|
309 |
* Wed May 24 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.1-2 |
310 |
- Munge Makefile.in a bit more... |
311 |
- Change ownership/permissions - not *everything* needs to be owned by ejabberd |
312 |
|
313 |
* Wed May 24 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.1.1-1 |
314 |
- First version for Fedora Extras |