Bump version to 2.2.
[shibboleth/cpp-sp.git] / shibboleth.spec.in
1 Name:           shibboleth
2 Summary:        Open source system for attribute-based Web SSO
3 Version:        @-VERSION-@
4 Release:        1
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
12 BuildRequires:  xerces%{?xercesver}-c-devel >= 2.8.0
13 BuildRequires:  xml-security-c-devel >= 1.4.0
14 BuildRequires:  zlib-devel, opensaml-devel >= 2.2
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 %package docs
53 Summary: Shibboleth API Documentation
54 Group: Development/Libraries
55 Requires: %{name} = %{version}
56
57 %description docs
58 Shibboleth Library API documentation generated by doxygen.
59
60 %prep
61 %setup -q
62
63 %build
64 %configure %{?_without_odbc:--disable-odbc} %{?_without_adfs:--disable-adfs} %{?_with_fastcgi} %{?shib_options}
65 %{__make}
66
67 %install
68 [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
69 %{__make} install NOKEYGEN=1 DESTDIR=$RPM_BUILD_ROOT
70
71 %if "%{_vendor}" == "suse"
72         %{__sed} -i "s/\/var\/log\/httpd/\/var\/log\/apache2/g" \
73                 $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/native.logger
74 %endif
75
76 # Plug the SP into Apache on a recognized system.
77 APACHE_CONFIG="no"
78 if [ -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/mod_shib_13.so ] ; then
79     APACHE_CONFIG="apache.config"
80 fi
81 if [ -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/mod_shib_20.so ] ; then
82     APACHE_CONFIG="apache2.config"
83 fi
84 if [ -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/mod_shib_22.so ] ; then
85     APACHE_CONFIG="apache22.config"
86 fi
87 if [ "$APACHE_CONFIG" != "no" ] ; then
88     APACHE_CONFD="no"
89     if [ -d %{_sysconfdir}/httpd/conf.d ] ; then
90             APACHE_CONFD="%{_sysconfdir}/httpd/conf.d"
91     fi
92     if [ -d %{_sysconfdir}/apache2/conf.d ] ; then
93             APACHE_CONFD="%{_sysconfdir}/apache2/conf.d"
94     fi
95     if [ "$APACHE_CONFD" != "no" ] ; then
96         %{__mkdir} -p $RPM_BUILD_ROOT$APACHE_CONFD
97 %if "%{_vendor}" == "suse"
98         %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/packages\/%{name}/g" \
99             $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/$APACHE_CONFIG \
100             > $RPM_BUILD_ROOT$APACHE_CONFD/shib.conf
101 %else
102         %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/%{name}-@-VERSION-@/g" \
103             $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/$APACHE_CONFIG \
104             > $RPM_BUILD_ROOT$APACHE_CONFD/shib.conf
105 %endif
106     fi
107 fi
108
109 %check
110 %{__make} check
111
112 %clean
113 [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
114
115 %post
116 %ifnos solaris2.8 solaris2.9 solaris2.10
117 /sbin/ldconfig
118 %endif
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 # Key generation
132 cd %{_sysconfdir}/%{name}
133 sh ./keygen.sh -b
134
135 %postun
136 %ifnos solaris2.8 solaris2.9 solaris2.10
137 /sbin/ldconfig
138 %endif
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
148 %defattr(-,root,root,-)
149 %{_sbindir}/shibd
150 %{_bindir}/mdquery
151 %{_bindir}/resolvertest
152 %{_libdir}/libshibsp.so.*
153 %{_libdir}/libshibsp-lite.so.*
154 %dir %{_libdir}/%{name}
155 %{_libdir}/%{name}/*
156 %exclude %{_libdir}/%{name}/*.la
157 %dir %{_localstatedir}/log/%{name}
158 %dir %{_localstatedir}/run/%{name}
159 %dir %{_datadir}/xml/%{name}
160 %{_datadir}/xml/%{name}/*
161 %dir %{_sysconfdir}/%{name}
162 %config(noreplace) %{_sysconfdir}/%{name}/*.xml
163 %config(noreplace) %{_sysconfdir}/%{name}/*.html
164 %config(noreplace) %{_sysconfdir}/%{name}/*.logger
165 %if "%{_vendor}" == "suse"
166 %config %{_sysconfdir}/apache2/conf.d/shib.conf
167 %else
168 %config %{_sysconfdir}/httpd/conf.d/shib.conf
169 %endif
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 %{_sysconfdir}/%{name}/keygen.sh
176 %{_sysconfdir}/%{name}/*.xsl
177 %docdir %{_datadir}/doc/%{name}
178 %{_datadir}/doc/%{name}/CREDITS.txt
179 %{_datadir}/doc/%{name}/FASTCGI.LICENSE
180 %{_datadir}/doc/%{name}/LICENSE.txt
181 %{_datadir}/doc/%{name}/LOG4CPP.LICENSE
182 %{_datadir}/doc/%{name}/logo.jpg
183 %{_datadir}/doc/%{name}/main.css
184 %{_datadir}/doc/%{name}/NOTICE.txt
185 %{_datadir}/doc/%{name}/OPENSSL.LICENSE
186 %{_datadir}/doc/%{name}/README.txt
187 %{_datadir}/doc/%{name}/RELEASE.txt
188
189 %files devel
190 %defattr(-,root,root,-)
191 %{_includedir}
192 %{_libdir}/libshibsp.so
193 %{_libdir}/libshibsp-lite.so
194
195 %files docs
196 %defattr(644,root,root,755)
197 %doc %{_datadir}/doc/%{name}/api
198
199 %changelog
200 * Tue Sep 23 2008  Scott Cantor  <cantor.2@osu.edu>  - 2.2-1
201 - Bump minor version.
202
203 * Tue Jun 10 2008  Scott Cantor  <cantor.2@osu.edu>  - 2.1-1
204 - Change shib.conf handling to treat as config file.
205
206 * Mon Mar 17 2008  Scott Cantor  <cantor.2@osu.edu>  - 2.0-6
207 - Official release.
208
209 * Fri Jan 18 2008  Scott Cantor  <cantor.2@osu.edu>  - 2.0-5
210 - Release candidate 1.
211
212 * Sun Oct 21 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-4
213 - libexec -> lib/shibboleth changes
214 - Added doc subpackage
215
216 * Thu Aug 16 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-3
217 - First public beta.
218
219 * Fri Jul 13 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-2
220 - Second alpha release.
221
222 * Sun Jun 10 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-1
223 - First alpha release.
224
225 * Mon Oct 2 2006 Scott Cantor   <cantor.2@osu.edu>  - 1.3-11
226 - Applied fix for secadv 20061002
227 - Fix for metadata loader loop
228
229 * Wed Jun 15 2006 Scott Cantor  <cantor.2@osu.edu>  - 1.3-10
230 - Applied fix for sec 20060615
231
232 * Fri Apr 15 2006 Scott Cantor  <cantor.2@osu.edu>  - 1.3-9
233 - Misc. patches, SuSE, Apache 2.2, gcc 4.1, and 64-bit support
234
235 * Mon Jan 9 2006 Scott Cantor  <cantor.2@osu.edu>  - 1.3-8
236 - Applied new fix for secadv 20060109
237
238 * Tue Nov 8 2005 Scott Cantor  <cantor.2@osu.edu>  - 1.3-7
239 - Applied new fix for secadv 20050901 plus rollup
240
241 * Fri Sep 23 2005 Scott Cantor  <cantor.2@osu.edu>  - 1.3-6
242 - Minor patches and default config changes
243 - pidfile patch
244 - Fix shib.conf creation
245 - Integrated init.d script
246 - Prevent replacement of config files
247
248 * Thu Sep 1 2005  Scott Cantor  <cantor.2@osu.edu>  - 1.3-5
249 - Applied fix for secadv 20050901 plus rollup of NSAPI fixes
250
251 * Sun Apr 24 2005  Scott Cantor  <cantor.2@osu.edu>  - 1.3-1
252 - Updated test programs and location of schemas.
253 - move siterefresh to to sbindir
254
255 * Fri Apr  1 2005  Derek Atkins  <derek@ihtfp.com>  - 1.3-1
256 - Add selinux-targeted-policy package
257 - move shar to sbindir
258
259 * Tue Oct 19 2004  Derek Atkins  <derek@ihtfp.com>  - 1.2-1
260 - Create SPEC file based on various versions in existence.