Require Xerces 2.8.0 and make cxxtest optional.
[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:        4
5 #Copyright:     Internet2
6 Group:          System Environment/Libraries
7 License:        Apache style
8 URL:            http://shibboleth.internet2.edu/
9 Source0:        http://shibboleth.internet2.edu/downloads/%{name}-%{version}.tar.gz
10 BuildRoot:      %{_tmppath}/%{name}-%{version}-root
11 BuildRequires:  openssl-devel, curl-devel >= 7.10.6
12 BuildRequires:  xerces%{?xercesver}-c-devel >= 2.8.0, xml-security-c-devel >= 1.4.0
13 BuildRequires:  zlib-devel, opensaml-devel >= 2.0
14 %{?_with_log4cpp:BuildRequires: log4cpp-devel >= 1.0}
15 %{!?_with_log4cpp:BuildRequires: log4shib-devel}
16 %{?_with_fastcgi:BuildRequires: fcgi-devel}
17 %if "%{_vendor}" == "redhat"
18 %{!?_without_builtinapache:BuildRequires: httpd-devel}
19 %endif
20 %if "%{_vendor}" == "suse"
21 %{!?_without_builtinapache:BuildRequires: apache2-devel}
22 %endif
23
24
25 %description
26 Shibboleth, a project of Internet2/MACE, is developing architectures,
27 policy structures, practical technologies, and an open source
28 implementation to support inter-institutional sharing of web resources
29 subject to access controls. In addition, Shibboleth will develop a
30 policy framework that will allow inter-operation within the higher
31 education community.
32
33 This package contains the shibboleth runtime library and apache module.
34
35 %package devel
36 Summary: Shibboleth development Headers
37 Group: Development/Libraries
38 Requires: %{name} = %{version}
39
40 %description devel
41 Shibboleth, a project of Internet2/MACE, is developing architectures,
42 policy structures, practical technologies, and an open source
43 implementation to support inter-institutional sharing of web resources
44 subject to access controls. In addition, Shibboleth will develop a
45 policy framework that will allow inter-operation within the higher
46 education community.
47
48 This package contains the headers and other necessary files to build
49 applications that use the shibboleth library.
50
51 %package docs
52 Summary: Shibboleth API Documentation
53 Group: Development/Libraries
54 Requires: %{name} = %{version}
55
56 %description docs
57 Shibboleth Library API documentation generated by doxygen.
58
59 %prep
60 %setup -q
61
62 %build
63 %configure %{?_without_odbc:--disable-odbc} %{?_without_adfs:--disable-adfs} %{?_with_fastcgi} %{?shib_options}
64 %{__make}
65
66 %install
67 [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
68 %{__make} install DESTDIR=$RPM_BUILD_ROOT
69
70 %if "%{_vendor}" == "suse"
71         %{__sed} -i "s/\/var\/log\/httpd/\/var\/log\/apache2/g" \
72                 $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/native.logger
73 %endif
74
75 %check || :
76 %{__make} check
77
78 %clean
79 [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
80
81 %post
82 %ifnos solaris2.8 solaris2.9 solaris2.10
83 /sbin/ldconfig
84 %endif
85
86
87 # Plug the SP into Apache on a recognized system.
88 APACHE_CONFIG="no"
89 if [ -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/mod_shib_13.so ] ; then
90         APACHE_CONFIG="apache.config"
91 fi
92 if [ -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/mod_shib_20.so ] ; then
93         APACHE_CONFIG="apache2.config"
94 fi
95 if [ -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/mod_shib_22.so ] ; then
96         APACHE_CONFIG="apache22.config"
97 fi
98 if [ "$APACHE_CONFIG" != "no" ] ; then
99         APACHE_CONFD="no"
100         if [ -d %{_sysconfdir}/httpd/conf.d ] ; then
101                 APACHE_CONFD="%{_sysconfdir}/httpd/conf.d"
102         fi
103         if [ -d %{_sysconfdir}/apache2/conf.d ] ; then
104                 APACHE_CONFD="%{_sysconfdir}/apache2/conf.d"
105         fi
106         if [ "$APACHE_CONFD" != "no" ] ; then
107                 if [ ! -f $APACHE_CONFD/shib.conf ] ; then
108 %if "%{_vendor}" == "suse"
109                     %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/packages\/%{name}/g" \
110                                 %{_sysconfdir}/%{name}/$APACHE_CONFIG \
111                                 > $APACHE_CONFD/shib.conf
112 %else
113                         %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/%{name}-@-VERSION-@/g" \
114                             %{_sysconfdir}/%{name}/$APACHE_CONFIG \
115                             > $APACHE_CONFD/shib.conf
116 %endif
117                 fi
118         fi
119 fi
120
121 # Install the shibd init.d scripts and service
122 %if "%{_vendor}" == "redhat"
123         if [ -d %{_sysconfdir}/init.d ] ; then
124                 if [ ! -f %{_sysconfdir}/init.d/shibd ] ; then
125                         %{__cp} -p %{_sysconfdir}/%{name}/shibd-%{_vendor} %{_sysconfdir}/init.d/shibd
126                         %{__chmod} 755 %{_sysconfdir}/init.d/shibd
127                         chkconfig --add shibd
128                 fi
129         fi
130 %endif
131
132 %postun
133 %ifnos solaris2.8 solaris2.9 solaris2.10
134 /sbin/ldconfig
135 %endif
136
137 # delete the Apache configuration if we're being removed
138 [ "$1" = 0 ] || exit 0
139 [ -f %{_sysconfdir}/httpd/conf.d/shib.conf ] && \
140     %{__rm} -f %{_sysconfdir}/httpd/conf.d/shib.conf
141 [ -f %{_sysconfdir}/apache2/conf.d/shib.conf ] && \
142     %{__rm} -f %{_sysconfdir}/apache2/conf.d/shib.conf
143
144 # clear init.d state
145 %if "%{_vendor}" == "redhat"
146         chkconfig --del shibd
147         [ -f %{_sysconfdir}/init.d/shibd ] && \
148             %{__rm} -f %{_sysconfdir}/init.d/shibd
149 %endif
150
151 %files
152 %defattr(-,root,root,-)
153 %{_sbindir}/shibd
154 %{_bindir}/mdquery
155 %{_bindir}/resolvertest
156 %{_libdir}/libshibsp.so.*
157 %{_libdir}/libshibsp-lite.so.*
158 %dir %{_libdir}/%{name}
159 %{_libdir}/%{name}/*
160 %exclude %{_libdir}/%{name}/*.la
161 %dir %{_localstatedir}/log/%{name}
162 %dir %{_datadir}/xml/%{name}
163 %{_datadir}/xml/%{name}/*
164 %dir %{_sysconfdir}/%{name}
165 %config(noreplace) %{_sysconfdir}/%{name}/*.xml
166 %config(noreplace) %{_sysconfdir}/%{name}/*.html
167 %config(noreplace) %{_sysconfdir}/%{name}/*.logger
168 %config %{_sysconfdir}/%{name}/sp-example.crt
169 %config %{_sysconfdir}/%{name}/sp-example.key
170 %{_sysconfdir}/%{name}/*.dist
171 %{_sysconfdir}/%{name}/apache*.config
172 %{_sysconfdir}/%{name}/shibd-redhat
173 %{_sysconfdir}/%{name}/shibd-debian
174 %{_sysconfdir}/%{name}/shibd-osx.plist
175 %docdir %{_datadir}/doc/%{name}
176 %{_datadir}/doc/%{name}/CREDITS.txt
177 %{_datadir}/doc/%{name}/INSTALL.txt
178 %{_datadir}/doc/%{name}/LICENSE.txt
179 %{_datadir}/doc/%{name}/NOTICE.txt
180 %{_datadir}/doc/%{name}/README.txt
181 %{_datadir}/doc/%{name}/RELEASE.txt
182 %{_datadir}/doc/%{name}/LOG4CPP.LICENSE
183 %{_datadir}/doc/%{name}/OPENSSL.LICENSE
184 %{_datadir}/doc/%{name}/logo.jpg
185 %{_datadir}/doc/%{name}/main.css
186 %exclude %{_datadir}/doc/%{name}/INSTALL-WIN32.txt
187
188 %files devel
189 %defattr(-,root,root,-)
190 %{_includedir}
191 %{_libdir}/libshibsp.so
192 %{_libdir}/libshibsp-lite.so
193
194 %files docs
195 %defattr(644,root,root,755)
196 %doc %{_datadir}/doc/%{name}/api
197
198 %changelog
199 * Sun Oct 21 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-4
200 - libexec -> lib/shibboleth changes
201 - Added doc subpackage
202
203 * Thu Aug 16 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-3
204 - First public beta.
205
206 * Fri Jul 13 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-2
207 - Second alpha release.
208
209 * Sun Jun 10 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-1
210 - First alpha release.
211
212 * Mon Oct 2 2006 Scott Cantor   <cantor.2@osu.edu>  - 1.3-11
213 - Applied fix for secadv 20061002
214 - Fix for metadata loader loop
215
216 * Wed Jun 15 2006 Scott Cantor  <cantor.2@osu.edu>  - 1.3-10
217 - Applied fix for sec 20060615
218
219 * Fri Apr 15 2006 Scott Cantor  <cantor.2@osu.edu>  - 1.3-9
220 - Misc. patches, SuSE, Apache 2.2, gcc 4.1, and 64-bit support
221
222 * Mon Jan 9 2006 Scott Cantor  <cantor.2@osu.edu>  - 1.3-8
223 - Applied new fix for secadv 20060109
224
225 * Tue Nov 8 2005 Scott Cantor  <cantor.2@osu.edu>  - 1.3-7
226 - Applied new fix for secadv 20050901 plus rollup
227
228 * Fri Sep 23 2005 Scott Cantor  <cantor.2@osu.edu>  - 1.3-6
229 - Minor patches and default config changes
230 - pidfile patch
231 - Fix shib.conf creation
232 - Integrated init.d script
233 - Prevent replacement of config files
234
235 * Thu Sep 1 2005  Scott Cantor  <cantor.2@osu.edu>  - 1.3-5
236 - Applied fix for secadv 20050901 plus rollup of NSAPI fixes
237
238 * Sun Apr 24 2005  Scott Cantor  <cantor.2@osu.edu>  - 1.3-1
239 - Updated test programs and location of schemas.
240 - move siterefresh to to sbindir
241
242 * Fri Apr  1 2005  Derek Atkins  <derek@ihtfp.com>  - 1.3-1
243 - Add selinux-targeted-policy package
244 - move shar to sbindir
245
246 * Tue Oct 19 2004  Derek Atkins  <derek@ihtfp.com>  - 1.2-1
247 - Create SPEC file based on various versions in existence.