rename the 'shar' process, "shibd"
[shibboleth/sp.git] / shibboleth.spec.in
1 Name:           shibboleth
2 Summary:        Open source system to enable inter-institutional resource sharing
3 Version:        @-VERSION-@
4 Release:        1
5 #Copyright:     University Corporation for Advanced Internet Development, Inc.
6 Group:          System Environment/Libraries
7 License:        Apache style
8 URL:            http://shibboleth.internet2.edu/
9 Source0:        http://wayf.internet2.edu/shibboleth/%{name}-%{version}.tar.gz
10 Source1:        http://wayf.internet2.edu/shibboleth/%{name}-%{version}.tar.gz.asc
11 BuildRoot:      %{_tmppath}/%{name}-%{version}-root
12
13 BuildRequires:  openssl-devel, curl-devel >= 7.10.6, xerces-c-devel >= 2.6.1
14 BuildRequires:  xml-security-c-devel >= 1.1.0, log4cpp-devel >= 0.3.5
15 BuildRequires:  zlib-devel, opensaml-devel, httpd-devel
16
17 %description
18 Shibboleth, a project of Internet2/MACE, is developing architectures,
19 policy structures, practical technologies, and an open source
20 implementation to support inter-institutional sharing of web resources
21 subject to access controls. In addition, Shibboleth will develop a
22 policy framework that will allow inter-operation within the higher
23 education community.
24
25 This package contains the shibboleth runtime library and apache module.
26
27 %package devel
28 Summary: Shibboleth development Headers
29 Group: Development/Libraries
30 Requires: %{name} = %{version}
31
32 %description devel
33 Shibboleth, a project of Internet2/MACE, is developing architectures,
34 policy structures, practical technologies, and an open source
35 implementation to support inter-institutional sharing of web resources
36 subject to access controls. In addition, Shibboleth will develop a
37 policy framework that will allow inter-operation within the higher
38 education community.
39
40 This package contains the headers and other necessary files to build
41 applications that use the shibboleth library.
42
43 %package selinux-targeted-policy
44 Summary: SELinux targeted policy configuration for Shibboleth SP
45 Group: System Environment/Base
46 Requires: selinux-targeted-policy-source
47
48 %description selinux-targeted-policy
49 Shibboleth, a project of Internet2/MACE, is developing architectures,
50 policy structures, practical technologies, and an open source
51 implementation to support inter-institutional sharing of web resources
52 subject to access controls. In addition, Shibboleth will develop a
53 policy framework that will allow inter-operation within the higher
54 education community.
55
56 This package contains the SELinux Policy (source) Configuration to
57 enable the Shibboleth SP to integrate into Apache HTTPD in Red Hat /
58 Fedora's Targeted Policy SELinux implementation.  It requires
59 rebuilding your policy, so you must have the policy-source installed.
60
61 %prep
62 %setup -q
63
64 %build
65 %configure --enable-apache-20
66 make
67
68 %install
69 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
70 rm -rf _docs
71
72 make install DESTDIR=$RPM_BUILD_ROOT
73 mv $RPM_BUILD_ROOT/usr/doc/shibboleth _docs
74
75 find $RPM_BUILD_ROOT/%{_libexecdir} -type f -or -type l | grep \.so |
76   sed -e "s|$RPM_BUILD_ROOT||" | sort > rpm.filelist
77
78 %check || :
79 make check
80
81 %clean
82 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
83
84 %post
85 /sbin/ldconfig
86
87 # Plug the shibboleth SP into Apache2 on a Red Hat system.
88 [ -d %{_sysconfdir}/httpd/conf.d ] || exit 0
89 [ -f %{_sysconfdir}/httpd/conf.d/shibboleth.conf ] && exit 0
90 cp -p %{_sysconfdir}/shibboleth/apache2.config \
91     %{_sysconfdir}/httpd/conf.d/shibboleth.conf
92
93 %postun
94 /sbin/ldconfig
95
96 # delete the shibboleth apache configuration if we're being removed
97 [ "$0" = 0 ] || exit 0
98 [ -f %{_sysconfdir}/httpd/conf.d/shibboleth.conf ] && \
99     rm -f %{_sysconfdir}/httpd/conf.d/shibboleth.conf
100
101 %triggerin selinux-targeted-policy -- %{name}
102 restorecon %{_sbindir}/shibd
103
104 %triggerin selinux-targeted-policy -- selinux-targeted-policy-source
105 cd %{_sysconfdir}/selinux/src/policy || exit 1
106 make -W load
107
108 %files -f rpm.filelist
109 %defattr(-,root,root,-)
110 %doc _docs/CREDITS.txt _docs/InQueue.html _docs/NEWS.txt _docs/logo.jpg
111 %doc _docs/DEPLOY-GUIDE-ORIGIN.html _docs/main.css _docs/README.txt
112 %doc _docs/DEPLOY-GUIDE-TARGET.html _docs/LICENSE.txt _docs/mysql-4.0.12.diff
113 %{_sbindir}/shibd
114 %{_bindir}/siterefresh
115 %{_libdir}/libshib.so.*
116 %{_libdir}/libshib-target.so.*
117 %dir %{_sysconfdir}/shibboleth
118 %{_sysconfdir}/shibboleth/*.xsd
119 %config %{_sysconfdir}/shibboleth/*.xml
120 %config %{_sysconfdir}/shibboleth/*.html
121 %config %{_sysconfdir}/shibboleth/*.logger
122 %config %{_sysconfdir}/shibboleth/inqueue.pem
123 %config %{_sysconfdir}/shibboleth/shar.crt
124 %config %{_sysconfdir}/shibboleth/shar.key
125 %{_sysconfdir}/shibboleth/*.dist
126 %{_sysconfdir}/shibboleth/apache*.config
127
128 %exclude %{_bindir}/shibtest
129 %exclude %{_bindir}/posttest
130 %exclude %{_bindir}/test-client
131 %exclude %{_libexecdir}/*.la
132
133 %files devel
134 %defattr(-,root,root,-)
135 %{_includedir}
136 %{_libdir}/libshib.so
137 %{_libdir}/libshib-target.so
138
139 %files selinux-targeted-policy
140 %defattr(-,root,root,-)
141 %{_sysconfdir}/selinux/targeted/src/policy/file_contexts/program/*.fc
142 %{_sysconfdir}/selinux/targeted/src/policy/domain/program/*.te
143
144 %changelog
145 * Fri Apr  1 2005  Derek Atkins  <derek@ihtfp.com>  - 1.3-0
146 - Add selinux-targeted-policy package
147 - move shar to sbindir
148
149 * Tue Oct 19 2004  Derek Atkins  <derek@ihtfp.com>  - 1.2-1
150 - Create SPEC file based on various versions in existence.