Up log4cpp version requirement.
[shibboleth/cpp-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 >= 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 %defattr(-,root,root,-)
152 %{_sbindir}/shibd
153 %{_bindir}/mdquery
154 %{_bindir}/resolvertest
155 %{_libdir}/libshibsp.so.*
156 %{_libdir}/libshibsp-lite.so.*
157 %dir %{_libdir}/%{name}
158 %{_libdir}/%{name}/*.so
159 %exclude %{_libdir}/%{name}/*.la
160 %dir %{_localstatedir}/log/%{name}
161 %dir %{_datadir}/xml/%{name}
162 %{_datadir}/xml/%{name}
163 %dir %{_sysconfdir}/%{name}
164 %config(noreplace) %{_sysconfdir}/%{name}/*.xml
165 %config(noreplace) %{_sysconfdir}/%{name}/*.html
166 %config(noreplace) %{_sysconfdir}/%{name}/*.logger
167 %config %{_sysconfdir}/%{name}/sp-example.crt
168 %config %{_sysconfdir}/%{name}/sp-example.key
169 %{_sysconfdir}/%{name}/*.dist
170 %{_sysconfdir}/%{name}/apache*.config
171 %{_sysconfdir}/%{name}/shibd-redhat
172 %{_sysconfdir}/%{name}/shibd-debian
173 %{_sysconfdir}/%{name}/shibd-osx.plist
174 %docdir %{_datadir}/doc/%{name}
175 %{_datadir}/doc/%{name}/CREDITS.txt
176 %{_datadir}/doc/%{name}/INSTALL.txt
177 %{_datadir}/doc/%{name}/LICENSE.txt
178 %{_datadir}/doc/%{name}/NOTICE.txt
179 %{_datadir}/doc/%{name}/README.txt
180 %{_datadir}/doc/%{name}/RELEASE.txt
181 %{_datadir}/doc/%{name}/LOG4CPP.LICENSE
182 %{_datadir}/doc/%{name}/OPENSSL.LICENSE
183 %{_datadir}/doc/%{name}/logo.jpg
184 %{_datadir}/doc/%{name}/main.css
185
186 %files devel
187 %defattr(-,root,root,-)
188 %{_includedir}
189 %{_libdir}/libshibsp.so
190 %{_libdir}/libshibsp-lite.so
191
192 %files docs
193 %defattr(644,root,root,755)
194 %doc %{_datadir}/doc/%{name}/api
195
196 %changelog
197 * Sun Oct 21 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-4
198 - libexec -> lib/shibboleth changes
199 - Added doc subpackage
200
201 * Thu Aug 16 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-3
202 - First public beta.
203
204 * Fri Jul 13 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-2
205 - Second alpha release.
206
207 * Sun Jun 10 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-1
208 - First alpha release.
209
210 * Mon Oct 2 2006 Scott Cantor   <cantor.2@osu.edu>  - 1.3-11
211 - Applied fix for secadv 20061002
212 - Fix for metadata loader loop
213
214 * Wed Jun 15 2006 Scott Cantor  <cantor.2@osu.edu>  - 1.3-10
215 - Applied fix for sec 20060615
216
217 * Fri Apr 15 2006 Scott Cantor  <cantor.2@osu.edu>  - 1.3-9
218 - Misc. patches, SuSE, Apache 2.2, gcc 4.1, and 64-bit support
219
220 * Mon Jan 9 2006 Scott Cantor  <cantor.2@osu.edu>  - 1.3-8
221 - Applied new fix for secadv 20060109
222
223 * Tue Nov 8 2005 Scott Cantor  <cantor.2@osu.edu>  - 1.3-7
224 - Applied new fix for secadv 20050901 plus rollup
225
226 * Fri Sep 23 2005 Scott Cantor  <cantor.2@osu.edu>  - 1.3-6
227 - Minor patches and default config changes
228 - pidfile patch
229 - Fix shib.conf creation
230 - Integrated init.d script
231 - Prevent replacement of config files
232
233 * Thu Sep 1 2005  Scott Cantor  <cantor.2@osu.edu>  - 1.3-5
234 - Applied fix for secadv 20050901 plus rollup of NSAPI fixes
235
236 * Sun Apr 24 2005  Scott Cantor  <cantor.2@osu.edu>  - 1.3-1
237 - Updated test programs and location of schemas.
238 - move siterefresh to to sbindir
239
240 * Fri Apr  1 2005  Derek Atkins  <derek@ihtfp.com>  - 1.3-1
241 - Add selinux-targeted-policy package
242 - move shar to sbindir
243
244 * Tue Oct 19 2004  Derek Atkins  <derek@ihtfp.com>  - 1.2-1
245 - Create SPEC file based on various versions in existence.