No need for explicit ODBC dependency.
[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:        3
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 %prep
51 %setup -q
52
53 %build
54 %configure %{?_without_odbc:--disable-odbc} %{?_without_adfs:--disable-adfs} %{?shib_options}
55 %{__make}
56
57 %install
58 [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
59 %{__make} install DESTDIR=$RPM_BUILD_ROOT
60
61 %if "%{_vendor}" == "suse"
62         %{__sed} -i "s/\/var\/log\/httpd/\/var\/log\/apache2/g" \
63                 $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/native.logger
64 %endif
65
66 find $RPM_BUILD_ROOT/%{_libexecdir} -type f -or -type l |
67   %{__sed} -e "s|$RPM_BUILD_ROOT||" | sort > rpm.filelist
68
69 %check || :
70 %{__make} check
71
72 %clean
73 [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
74
75 %post
76 %ifnos solaris2.8 solaris2.9 solaris2.10
77 /sbin/ldconfig
78 %endif
79
80
81 # Plug the SP into Apache on a recognized system.
82 APACHE_CONFIG="no"
83 if [ -f $RPM_BUILD_ROOT/%{_libexecdir}/mod_shib_13.so ] ; then
84         APACHE_CONFIG="apache.config"
85 fi
86 if [ -f $RPM_BUILD_ROOT/%{_libexecdir}/mod_shib_20.so ] ; then
87         APACHE_CONFIG="apache2.config"
88 fi
89 if [ -f $RPM_BUILD_ROOT/%{_libexecdir}/mod_shib_22.so ] ; then
90         APACHE_CONFIG="apache22.config"
91 fi
92 if [ "$APACHE_CONFIG" != "no" ] ; then
93         APACHE_CONFD="no"
94         if [ -d %{_sysconfdir}/httpd/conf.d ] ; then
95                 APACHE_CONFD="%{_sysconfdir}/httpd/conf.d"
96         fi
97         if [ -d %{_sysconfdir}/apache2/conf.d ] ; then
98                 APACHE_CONFD="%{_sysconfdir}/apache2/conf.d"
99         fi
100         if [ "$APACHE_CONFD" != "no" ] ; then
101                 if [ ! -f $APACHE_CONFD/shib.conf ] ; then
102 %if "%{_vendor}" == "suse"
103                     %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/packages\/%{name}/g" \
104                                 %{_sysconfdir}/%{name}/$APACHE_CONFIG \
105                                 > $APACHE_CONFD/shib.conf
106 %else
107                         %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/%{name}-@-VERSION-@/g" \
108                             %{_sysconfdir}/%{name}/$APACHE_CONFIG \
109                             > $APACHE_CONFD/shib.conf
110 %endif
111                 fi
112         fi
113 fi
114
115 # Install the shibd init.d scripts and service
116 %if "%{_vendor}" == "redhat"
117         if [ -d %{_sysconfdir}/init.d ] ; then
118                 if [ ! -f %{_sysconfdir}/init.d/shibd ] ; then
119                         %{__cp} -p %{_sysconfdir}/%{name}/shibd-%{_vendor} %{_sysconfdir}/init.d/shibd
120                         %{__chmod} 755 %{_sysconfdir}/init.d/shibd
121                         chkconfig --add shibd
122                 fi
123         fi
124 %endif
125
126 %postun
127 %ifnos solaris2.8 solaris2.9 solaris2.10
128 /sbin/ldconfig
129 %endif
130
131 # delete the Apache configuration if we're being removed
132 [ "$1" = 0 ] || exit 0
133 [ -f %{_sysconfdir}/httpd/conf.d/shib.conf ] && \
134     %{__rm} -f %{_sysconfdir}/httpd/conf.d/shib.conf
135 [ -f %{_sysconfdir}/apache2/conf.d/shib.conf ] && \
136     %{__rm} -f %{_sysconfdir}/apache2/conf.d/shib.conf
137
138 # clear init.d state
139 %if "%{_vendor}" == "redhat"
140         chkconfig --del shibd
141         [ -f %{_sysconfdir}/init.d/shibd ] && \
142             %{__rm} -f %{_sysconfdir}/init.d/shibd
143 %endif
144
145 %files -f rpm.filelist
146 %defattr(-,root,root,-)
147 %{_sbindir}/shibd
148 %{_bindir}/mdquery
149 %{_bindir}/resolvertest
150 %{_libdir}/libshibsp.so.*
151 %{_libdir}/libshibsp-lite.so.*
152 %dir %{_localstatedir}/log/%{name}
153 %dir %{_datadir}/xml/%{name}
154 %{_datadir}/xml/%{name}
155 %dir %{_sysconfdir}/%{name}
156 %config(noreplace) %{_sysconfdir}/%{name}/*.xml
157 %config(noreplace) %{_sysconfdir}/%{name}/*.html
158 %config(noreplace) %{_sysconfdir}/%{name}/*.logger
159 %config %{_sysconfdir}/%{name}/sp-example.crt
160 %config %{_sysconfdir}/%{name}/sp-example.key
161 %{_sysconfdir}/%{name}/*.dist
162 %{_sysconfdir}/%{name}/apache*.config
163 %{_sysconfdir}/%{name}/shibd-redhat
164 %{_sysconfdir}/%{name}/shibd-debian
165 %{_sysconfdir}/%{name}/shibd-osx.plist
166 %exclude %{_libexecdir}/*.la
167 %docdir %{_datadir}/doc/%{name}
168 %{_datadir}/doc/%{name}
169
170 %files devel
171 %defattr(-,root,root,-)
172 %{_includedir}
173 %{_libdir}/libshibsp.so
174 %{_libdir}/libshibsp-lite.so
175
176 %changelog
177 * Thu Aug 16 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-3
178 - First public beta.
179
180 * Fri Jul 13 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-2
181 - Second alpha release.
182
183 * Sun Jun 10 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-1
184 - First alpha 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.