]> git.pld-linux.org Git - packages/ejabberd.git/blame - ejabberd.spec
- add patch5
[packages/ejabberd.git] / ejabberd.spec
CommitLineData
e9f604ed 1#
2# Conditional build:
3%bcond_with pam # PAM authentication support
9953f9cb 4%bcond_with logdb # enable mod_logdb (server-side message logging)
e9f604ed 5#
fb70a56e 6Summary: Fault-tolerant distributed Jabber/XMPP server
7abad569 7Summary(pl.UTF-8): Odporny na awarie rozproszony serwer Jabbera/XMPP
fb70a56e 8Name: ejabberd
3ae1381d 9Version: 1.1.4
9953f9cb 10Release: 2
fb70a56e
JK
11License: GPL
12Group: Applications/Communications
1e0a4744 13Source0: http://www.process-one.net/en/projects/ejabberd/download/%{version}/%{name}-%{version}.tar.gz
3ae1381d 14# Source0-md5: 65e9cd346f11a28afbacfe1d7be3a33b
fb70a56e
JK
15Source1: %{name}.init
16Source2: %{name}.sysconfig
17Source3: %{name}.sh
18Source4: %{name}ctl.sh
1e70c0a0 19Source5: %{name}-inetrc
fb70a56e 20Patch0: %{name}-makefile.patch
8652777e 21Patch1: %{name}-config.patch
e068fa54 22Patch2: %{name}-mod_muc.patch
e9f604ed 23Patch3: %{name}-auth_pam.patch
126fc2fb 24Patch4: %{name}-show_certificate_chain.patch
9953f9cb 25Patch5: %{name}-mod_logdb.patch
fc7c8497 26URL: http://ejabberd.jabber.ru/
fb70a56e 27BuildRequires: autoconf
afe517ce 28BuildRequires: erlang >= R9C
6f0d08c1 29BuildRequires: expat-devel >= 1.95
30BuildRequires: openssl-devel
e9f604ed 31%if %{with pam}
32BuildRequires: pam-devel
33%endif
b15a901d 34BuildRequires: rpmbuild(macros) >= 1.268
01f61704 35BuildRequires: zlib-devel
27b10c8b 36Requires(post): /usr/bin/perl
b15a901d 37Requires(post): jabber-common
0d54398f 38Requires(post): sed >= 4.0
fb70a56e 39Requires(post): textutils
fb70a56e
JK
40Requires(post,preun): /sbin/chkconfig
41Requires: erlang
27b10c8b 42Requires: rc-scripts
fb70a56e
JK
43BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45%description
472227c5 46ejabberd is a Free and Open Source fault-tolerant distributed Jabber
47server. It is written mostly in Erlang.
fb70a56e 48
e0166ea5
JR
49%description -l pl.UTF-8
50ejabberd to darmowy, z otwartymi źródłami, odporny na awarie
51rozproszony serwer Jabbera. Jest napisany w większości w Erlangu.
378431cb 52
fb70a56e 53%prep
a0d21af5 54%setup -q
fb70a56e 55%patch0 -p1
8652777e 56%patch1 -p1
e068fa54 57%patch2 -p1
e9f604ed 58%if %{with pam}
59cd src/
60%patch3 -p0
61%endif
126fc2fb 62%patch4 -p1
9953f9cb 63%if %{with logdb}
64%patch5 -p0
65%endif
fb70a56e
JK
66
67%build
68cd src
69%{__autoconf}
6b419144 70%configure \
e9f604ed 71 --enable-odbc %{?with_pam --enable-pam}
fb70a56e
JK
72%{__make}
73cd ..
74
75%install
76rm -rf $RPM_BUILD_ROOT
77install -d $RPM_BUILD_ROOT{/var/lib/%{name},/etc/{sysconfig,rc.d/init.d},%{_sbindir}}
78
378431cb 79%{__make} -C src install \
27b10c8b 80 DESTDIR=$RPM_BUILD_ROOT
fb70a56e 81
3d8c71bc 82sed -e's,@libdir@,%{_libdir},g' %{SOURCE1} > $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
fb70a56e
JK
83install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
84
793dcdd8
ER
85sed -e's,@libdir@,%{_libdir},g' %{SOURCE3} > $RPM_BUILD_ROOT%{_sbindir}/%{name}
86sed -e's,@libdir@,%{_libdir},g' %{SOURCE4} > $RPM_BUILD_ROOT%{_sbindir}/%{name}ctl
27b10c8b 87install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/jabber
fb70a56e
JK
88
89%clean
90rm -rf $RPM_BUILD_ROOT
91
92%post
0d54398f
ER
93if [ -f %{_sysconfdir}/jabber/secret ] ; then
94 SECRET=`cat %{_sysconfdir}/jabber/secret`
fb70a56e
JK
95 if [ -n "$SECRET" ] ; then
96 echo "Updating component authentication secret in ejabberd config file..."
0d54398f 97 %{__sed} -i -e "s/>secret</>$SECRET</" /etc/jabber/ejabberd.cfg
fb70a56e
JK
98 fi
99fi
100
0d54398f
ER
101if [ ! -f %{_sysconfdir}/jabber/cookie ] ; then
102 echo "Generating erl authentication cookie..."
103 umask 066
104 perl -e 'open R,"/dev/urandom"; read R,$r,16;
105 printf "%02x",ord(chop $r) while($r);' > %{_sysconfdir}/jabber/cookie
7f0fa4be 106fi
107
fb70a56e 108/sbin/chkconfig --add ejabberd
b15a901d 109%service ejabberd restart "ejabberd server"
fb70a56e
JK
110
111%preun
112if [ "$1" = "0" ]; then
b15a901d 113 %service ejabberd stop
fb70a56e
JK
114 /sbin/chkconfig --del ejabberd
115fi
116
117%files
118%defattr(644,root,root,755)
6bc26531 119%doc ChangeLog doc src/odbc/pg.sql src/odbc/mysql.sql src/odbc/mssql.sql
fb70a56e 120%attr(755,root,root) %{_sbindir}/*
27b10c8b 121%attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/*
67ffd871 122%attr(770,root,jabber) /var/log/ejabberd
fb70a56e
JK
123%{_libdir}/ejabberd
124%dir %attr(770,root,jabber) /var/lib/ejabberd
125%attr(754,root,root) /etc/rc.d/init.d/%{name}
27b10c8b 126%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
This page took 0.072437 seconds and 4 git commands to generate.