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