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