Source0: http://shibboleth.internet2.edu/downloads/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
-BuildRequires: openssl-devel, curl-devel >= 7.10.6, xerces%{?xercesver}-c-devel >= 2.6.1
-BuildRequires: xml-security-c-devel >= 1.3.1, log4cpp-devel >= 0.3.5
-BuildRequires: zlib-devel, unixODBC-devel, opensaml-devel >= 2.0
+BuildRequires: openssl-devel, curl-devel >= 7.10.6
+BuildRequires: xerces%{?xercesver}-c-devel >= 2.6.1, xml-security-c-devel >= 1.3.1
+BuildRequires: zlib-devel, opensaml-devel >= 2.0
+%if %{?_with_log4cpp:1}
+BuildRequires: log4cpp-devel >= 0.3.5
+%else
+BuildRequires: log4shib-devel
+%endif
+%{!?_without_odbc:BuildRequires: unixODBC-devel}
%if "%{_vendor}" == "redhat"
-BuildRequires: httpd-devel
+%{!?_without_builtinapache:BuildRequires: httpd-devel}
%endif
%if "%{_vendor}" == "suse"
-BuildRequires: apache2-devel
+%{!?_without_builtinapache:BuildRequires: apache2-devel}
%endif
%setup -q
%build
-%configure %{?shib_options}
+%configure %{?_without_odbc:--disable-odbc} %{?_without_adfs:--disable-adfs} %{?shib_options}
make
#make -C selinux
make -C selinux install DESTDIR=$RPM_BUILD_ROOT
mv $RPM_BUILD_ROOT/usr/doc/%{name} _docs
+%if "%{_vendor}" == "suse"
+ sed -i "s/\/var\/log\/httpd/\/var\/log\/apache2/g" \
+ $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/native.logger
+%endif
+
find $RPM_BUILD_ROOT/%{_libexecdir} -type f -or -type l | grep \.so |
sed -e "s|$RPM_BUILD_ROOT||" | sort > rpm.filelist
%if "%{_vendor}" == "redhat"
if [ -d %{_sysconfdir}/init.d ] ; then
if [ ! -f %{_sysconfdir}/init.d/shibd ] ; then
- cp -p %{_sysconfdir}/%{name}/shibd %{_sysconfdir}/init.d/shibd
+ cp -p %{_sysconfdir}/%{name}/shibd-%{_vendor} %{_sysconfdir}/init.d/shibd
chmod 755 %{_sysconfdir}/init.d/shibd
chkconfig --add shibd
fi