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