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