/[smecontribs]/rpms/ejabberd/contribs7/ejabberd.spec
ViewVC logotype

Diff of /rpms/ejabberd/contribs7/ejabberd.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

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


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed