libexec changes
[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:        4
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 %check || :
67 %{__make} check
68
69 %clean
70 [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
71
72 %post
73 %ifnos solaris2.8 solaris2.9 solaris2.10
74 /sbin/ldconfig
75 %endif
76
77
78 # Plug the SP into Apache on a recognized system.
79 APACHE_CONFIG="no"
80 if [ -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/mod_shib_13.so ] ; then
81         APACHE_CONFIG="apache.config"
82 fi
83 if [ -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/mod_shib_20.so ] ; then
84         APACHE_CONFIG="apache2.config"
85 fi
86 if [ -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/mod_shib_22.so ] ; then
87         APACHE_CONFIG="apache22.config"
88 fi
89 if [ "$APACHE_CONFIG" != "no" ] ; then
90         APACHE_CONFD="no"
91         if [ -d %{_sysconfdir}/httpd/conf.d ] ; then
92                 APACHE_CONFD="%{_sysconfdir}/httpd/conf.d"
93         fi
94         if [ -d %{_sysconfdir}/apache2/conf.d ] ; then
95                 APACHE_CONFD="%{_sysconfdir}/apache2/conf.d"
96         fi
97         if [ "$APACHE_CONFD" != "no" ] ; then
98                 if [ ! -f $APACHE_CONFD/shib.conf ] ; then
99 %if "%{_vendor}" == "suse"
100                     %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/packages\/%{name}/g" \
101                                 %{_sysconfdir}/%{name}/$APACHE_CONFIG \
102                                 > $APACHE_CONFD/shib.conf
103 %else
104                         %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/%{name}-@-VERSION-@/g" \
105                             %{_sysconfdir}/%{name}/$APACHE_CONFIG \
106                             > $APACHE_CONFD/shib.conf
107 %endif
108                 fi
109         fi
110 fi
111
112 # Install the shibd init.d scripts and service
113 %if "%{_vendor}" == "redhat"
114         if [ -d %{_sysconfdir}/init.d ] ; then
115                 if [ ! -f %{_sysconfdir}/init.d/shibd ] ; then
116                         %{__cp} -p %{_sysconfdir}/%{name}/shibd-%{_vendor} %{_sysconfdir}/init.d/shibd
117                         %{__chmod} 755 %{_sysconfdir}/init.d/shibd
118                         chkconfig --add shibd
119                 fi
120         fi
121 %endif
122
123 %postun
124 %ifnos solaris2.8 solaris2.9 solaris2.10
125 /sbin/ldconfig
126 %endif
127
128 # delete the Apache configuration if we're being removed
129 [ "$1" = 0 ] || exit 0
130 [ -f %{_sysconfdir}/httpd/conf.d/shib.conf ] && \
131     %{__rm} -f %{_sysconfdir}/httpd/conf.d/shib.conf
132 [ -f %{_sysconfdir}/apache2/conf.d/shib.conf ] && \
133     %{__rm} -f %{_sysconfdir}/apache2/conf.d/shib.conf
134
135 # clear init.d state
136 %if "%{_vendor}" == "redhat"
137         chkconfig --del shibd
138         [ -f %{_sysconfdir}/init.d/shibd ] && \
139             %{__rm} -f %{_sysconfdir}/init.d/shibd
140 %endif
141
142 %defattr(-,root,root,-)
143 %{_sbindir}/shibd
144 %{_bindir}/mdquery
145 %{_bindir}/resolvertest
146 %{_libdir}/libshibsp.so.*
147 %{_libdir}/libshibsp-lite.so.*
148 %dir %{_libdir}/%{name}
149 %{_libdir}/%{name}/*.so
150 %exclude %{_libdir}/%{name}/*.la
151 %dir %{_localstatedir}/log/%{name}
152 %dir %{_datadir}/xml/%{name}
153 %{_datadir}/xml/%{name}
154 %dir %{_sysconfdir}/%{name}
155 %config(noreplace) %{_sysconfdir}/%{name}/*.xml
156 %config(noreplace) %{_sysconfdir}/%{name}/*.html
157 %config(noreplace) %{_sysconfdir}/%{name}/*.logger
158 %config %{_sysconfdir}/%{name}/sp-example.crt
159 %config %{_sysconfdir}/%{name}/sp-example.key
160 %{_sysconfdir}/%{name}/*.dist
161 %{_sysconfdir}/%{name}/apache*.config
162 %{_sysconfdir}/%{name}/shibd-redhat
163 %{_sysconfdir}/%{name}/shibd-debian
164 %{_sysconfdir}/%{name}/shibd-osx.plist
165 %docdir %{_datadir}/doc/%{name}
166 %{_datadir}/doc/%{name}
167
168 %files devel
169 %defattr(-,root,root,-)
170 %{_includedir}
171 %{_libdir}/libshibsp.so
172 %{_libdir}/libshibsp-lite.so
173
174 %changelog
175 * Sun Oct 21 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-4
176 - libexec -> lib/shibboleth changes
177
178 * Thu Aug 16 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-3
179 - First public beta.
180
181 * Fri Jul 13 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-2
182 - Second alpha release.
183
184 * Sun Jun 10 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-1
185 - First alpha release.
186
187 * Mon Oct 2 2006 Scott Cantor   <cantor.2@osu.edu>  - 1.3-11
188 - Applied fix for secadv 20061002
189 - Fix for metadata loader loop
190
191 * Wed Jun 15 2006 Scott Cantor  <cantor.2@osu.edu>  - 1.3-10
192 - Applied fix for sec 20060615
193
194 * Fri Apr 15 2006 Scott Cantor  <cantor.2@osu.edu>  - 1.3-9
195 - Misc. patches, SuSE, Apache 2.2, gcc 4.1, and 64-bit support
196
197 * Mon Jan 9 2006 Scott Cantor  <cantor.2@osu.edu>  - 1.3-8
198 - Applied new fix for secadv 20060109
199
200 * Tue Nov 8 2005 Scott Cantor  <cantor.2@osu.edu>  - 1.3-7
201 - Applied new fix for secadv 20050901 plus rollup
202
203 * Fri Sep 23 2005 Scott Cantor  <cantor.2@osu.edu>  - 1.3-6
204 - Minor patches and default config changes
205 - pidfile patch
206 - Fix shib.conf creation
207 - Integrated init.d script
208 - Prevent replacement of config files
209
210 * Thu Sep 1 2005  Scott Cantor  <cantor.2@osu.edu>  - 1.3-5
211 - Applied fix for secadv 20050901 plus rollup of NSAPI fixes
212
213 * Sun Apr 24 2005  Scott Cantor  <cantor.2@osu.edu>  - 1.3-1
214 - Updated test programs and location of schemas.
215 - move siterefresh to to sbindir
216
217 * Fri Apr  1 2005  Derek Atkins  <derek@ihtfp.com>  - 1.3-1
218 - Add selinux-targeted-policy package
219 - move shar to sbindir
220
221 * Tue Oct 19 2004  Derek Atkins  <derek@ihtfp.com>  - 1.2-1
222 - Create SPEC file based on various versions in existence.