Removing logdir reference.
[shibboleth/sp.git] / shibboleth.spec.in
index ee8e4af..96e5392 100644 (file)
@@ -12,7 +12,7 @@ BuildRoot:    %{_tmppath}/%{name}-%{version}-root
 
 BuildRequires: openssl-devel, curl-devel >= 7.10.6, xerces-c-devel >= 2.6.1
 BuildRequires: xml-security-c-devel >= 1.1.0, log4cpp-devel >= 0.3.5
-BuildRequires: zlib-devel, opensaml-devel, httpd-devel
+BuildRequires: zlib-devel, opensaml-devel >= 1.1, httpd-devel
 
 %description
 Shibboleth, a project of Internet2/MACE, is developing architectures,
@@ -40,18 +40,39 @@ education community.
 This package contains the headers and other necessary files to build
 applications that use the shibboleth library.
 
+%package selinux-policy-targeted
+Summary: SELinux policy targeted configuration for Shibboleth SP
+Group: System Environment/Base
+Requires: selinux-policy-targeted-sources
+
+%description selinux-policy-targeted
+Shibboleth, a project of Internet2/MACE, is developing architectures,
+policy structures, practical technologies, and an open source
+implementation to support inter-institutional sharing of web resources
+subject to access controls. In addition, Shibboleth will develop a
+policy framework that will allow inter-operation within the higher
+education community.
+
+This package contains the SELinux Policy (source) Configuration to
+enable the Shibboleth SP to integrate into Apache HTTPD in Red Hat /
+Fedora's Policy Targeted SELinux implementation.  It requires
+rebuilding your policy, so you must have the policy-targeted-source
+installed.
+
 %prep
 %setup -q
 
 %build
 %configure --enable-apache-20
 make
+make -C selinux
 
 %install
 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
 rm -rf _docs
 
 make install DESTDIR=$RPM_BUILD_ROOT
+make -C selinux install DESTDIR=$RPM_BUILD_ROOT
 mv $RPM_BUILD_ROOT/usr/doc/shibboleth _docs
 
 find $RPM_BUILD_ROOT/%{_libexecdir} -type f -or -type l | grep \.so |
@@ -66,30 +87,50 @@ make check
 %post
 /sbin/ldconfig
 
+# Plug the shibboleth SP into Apache2 on a Red Hat system.
+[ -d %{_sysconfdir}/httpd/conf.d ] || exit 0
+[ -f %{_sysconfdir}/httpd/conf.d/shib.conf ] && exit 0
+cp -p %{_sysconfdir}/shibboleth/apache2.config \
+    %{_sysconfdir}/httpd/conf.d/shib.conf
+
 %postun
 /sbin/ldconfig
 
+# delete the shibboleth apache configuration if we're being removed
+[ "$0" = 0 ] || exit 0
+[ -f %{_sysconfdir}/httpd/conf.d/shib.conf ] && \
+    rm -f %{_sysconfdir}/httpd/conf.d/shib.conf
+
+%triggerin selinux-policy-targeted -- %{name}
+restorecon %{_sbindir}/shibd
+
+%triggerin selinux-policy-targeted -- selinux-policy-targeted-sources
+cd %{_sysconfdir}/selinux/targeted/src/policy || exit 1
+make -W install
+make load
+
 %files -f rpm.filelist
 %defattr(-,root,root,-)
 %doc _docs/CREDITS.txt _docs/InQueue.html _docs/NEWS.txt _docs/logo.jpg
 %doc _docs/DEPLOY-GUIDE-ORIGIN.html _docs/main.css _docs/README.txt
 %doc _docs/DEPLOY-GUIDE-TARGET.html _docs/LICENSE.txt _docs/mysql-4.0.12.diff
-%{_bindir}/shar
-%{_bindir}/siterefresh
+%{_sbindir}/shibd
+%{_sbindir}/siterefresh
+%{_bindir}/shibtest
 %{_libdir}/libshib.so.*
 %{_libdir}/libshib-target.so.*
+%dir %{_datadir}/xml/shibboleth
+%{_datadir}/xml/shibboleth/*.xsd
 %dir %{_sysconfdir}/shibboleth
-%{_sysconfdir}/shibboleth/*.xsd
 %config %{_sysconfdir}/shibboleth/*.xml
 %config %{_sysconfdir}/shibboleth/*.html
 %config %{_sysconfdir}/shibboleth/*.logger
 %config %{_sysconfdir}/shibboleth/inqueue.pem
-%config %{_sysconfdir}/shibboleth/shar.crt
-%config %{_sysconfdir}/shibboleth/shar.key
+%config %{_sysconfdir}/shibboleth/example.crt
+%config %{_sysconfdir}/shibboleth/example.key
 %{_sysconfdir}/shibboleth/*.dist
 %{_sysconfdir}/shibboleth/apache*.config
 
-%exclude %{_bindir}/shibtest
 %exclude %{_bindir}/posttest
 %exclude %{_bindir}/test-client
 %exclude %{_libexecdir}/*.la
@@ -100,6 +141,19 @@ make check
 %{_libdir}/libshib.so
 %{_libdir}/libshib-target.so
 
+%files selinux-policy-targeted
+%defattr(-,root,root,-)
+%{_sysconfdir}/selinux/targeted/src/policy/file_contexts/program/*.fc
+%{_sysconfdir}/selinux/targeted/src/policy/domains/program/*.te
+
 %changelog
+* Sun Apr 24 2005  Scott Cantor  <cantor.2@osu.edu>  - 1.3-1
+- Updated test programs and location of schemas.
+- move siterefresh to to sbindir
+
+* Fri Apr  1 2005  Derek Atkins  <derek@ihtfp.com>  - 1.3-1
+- Add selinux-targeted-policy package
+- move shar to sbindir
+
 * Tue Oct 19 2004  Derek Atkins  <derek@ihtfp.com>  - 1.2-1
 - Create SPEC file based on various versions in existence.