+#
+# Conditional build:
+%bcond_with pam # PAM authentication support
+#
Summary: Fault-tolerant distributed Jabber/XMPP server
Summary(pl.UTF-8): Odporny na awarie rozproszony serwer Jabbera/XMPP
Name: ejabberd
Patch0: %{name}-makefile.patch
Patch1: %{name}-config.patch
Patch2: %{name}-mod_muc.patch
+Patch3: %{name}-auth_pam.patch
URL: http://ejabberd.jabber.ru/
BuildRequires: autoconf
BuildRequires: erlang >= R9C
BuildRequires: expat-devel >= 1.95
BuildRequires: openssl-devel
+%if %{with pam}
+BuildRequires: pam-devel
+%endif
BuildRequires: rpmbuild(macros) >= 1.268
BuildRequires: zlib-devel
Requires(post): /usr/bin/perl
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%if %{with pam}
+cd src/
+%patch3 -p0
+%endif
%build
cd src
%{__autoconf}
%configure \
- --enable-odbc
+ --enable-odbc %{?with_pam --enable-pam}
%{__make}
cd ..