Fix utility name.
[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 %{!?_without_odbc:BuildRequires: unixODBC-devel}
17 %if "%{_vendor}" == "redhat"
18 %{!?_without_builtinapache:BuildRequires: httpd-devel}
19 %endif
20 %if "%{_vendor}" == "suse"
21 %{!?_without_builtinapache:BuildRequires: apache2-devel}
22 %endif
23
24
25 %description
26 Shibboleth, a project of Internet2/MACE, is developing architectures,
27 policy structures, practical technologies, and an open source
28 implementation to support inter-institutional sharing of web resources
29 subject to access controls. In addition, Shibboleth will develop a
30 policy framework that will allow inter-operation within the higher
31 education community.
32
33 This package contains the shibboleth runtime library and apache module.
34
35 %package devel
36 Summary: Shibboleth development Headers
37 Group: Development/Libraries
38 Requires: %{name} = %{version}
39
40 %description devel
41 Shibboleth, a project of Internet2/MACE, is developing architectures,
42 policy structures, practical technologies, and an open source
43 implementation to support inter-institutional sharing of web resources
44 subject to access controls. In addition, Shibboleth will develop a
45 policy framework that will allow inter-operation within the higher
46 education community.
47
48 This package contains the headers and other necessary files to build
49 applications that use the shibboleth library.
50
51 %prep
52 %setup -q
53
54 %build
55 %configure %{?_without_odbc:--disable-odbc} %{?_without_adfs:--disable-adfs} %{?shib_options}
56 %{__make}
57
58 %install
59 [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
60 %{__rm} -rf _docs
61 %{__make} install DESTDIR=$RPM_BUILD_ROOT
62 %{__mv} $RPM_BUILD_ROOT/usr/doc/%{name} _docs
63
64 %if "%{_vendor}" == "suse"
65         %{__sed} -i "s/\/var\/log\/httpd/\/var\/log\/apache2/g" \
66                 $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/native.logger
67 %endif
68
69 find $RPM_BUILD_ROOT/%{_libexecdir} -type f -or -type l |
70   %{__sed} -e "s|$RPM_BUILD_ROOT||" | sort > rpm.filelist
71
72 %check || :
73 %{__make} check
74
75 %clean
76 [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
77
78 %post
79 %ifnos solaris2.8 solaris2.9 solaris2.10
80 /sbin/ldconfig
81 %endif
82
83
84 # Plug the SP into Apache on a recognized system.
85 APACHE_CONFIG="no"
86 if [ -f $RPM_BUILD_ROOT/%{_libexecdir}/mod_shib_13.so ] ; then
87         APACHE_CONFIG="apache.config"
88 fi
89 if [ -f $RPM_BUILD_ROOT/%{_libexecdir}/mod_shib_20.so ] ; then
90         APACHE_CONFIG="apache2.config"
91 fi
92 if [ -f $RPM_BUILD_ROOT/%{_libexecdir}/mod_shib_22.so ] ; then
93         APACHE_CONFIG="apache22.config"
94 fi
95 if [ "$APACHE_CONFIG" != "no" ] ; then
96         APACHE_CONFD="no"
97         if [ -d %{_sysconfdir}/httpd/conf.d ] ; then
98                 APACHE_CONFD="%{_sysconfdir}/httpd/conf.d"
99         fi
100         if [ -d %{_sysconfdir}/apache2/conf.d ] ; then
101                 APACHE_CONFD="%{_sysconfdir}/apache2/conf.d"
102         fi
103         if [ "$APACHE_CONFD" != "no" ] ; then
104                 if [ ! -f $APACHE_CONFD/shib.conf ] ; then
105 %if "%{_vendor}" == "suse"
106                     %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/packages\/%{name}/g" \
107                                 %{_sysconfdir}/%{name}/$APACHE_CONFIG \
108                                 > $APACHE_CONFD/shib.conf
109 %else
110                         %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/%{name}-@-VERSION-@/g" \
111                             %{_sysconfdir}/%{name}/$APACHE_CONFIG \
112                             > $APACHE_CONFD/shib.conf
113 %endif
114                 fi
115         fi
116 fi
117
118 # Install the shibd init.d scripts and service
119 %if "%{_vendor}" == "redhat"
120         if [ -d %{_sysconfdir}/init.d ] ; then
121                 if [ ! -f %{_sysconfdir}/init.d/shibd ] ; then
122                         %{__cp} -p %{_sysconfdir}/%{name}/shibd-%{_vendor} %{_sysconfdir}/init.d/shibd
123                         %{__chmod} 755 %{_sysconfdir}/init.d/shibd
124                         chkconfig --add shibd
125                 fi
126         fi
127 %endif
128
129 %postun
130 %ifnos solaris2.8 solaris2.9 solaris2.10
131 /sbin/ldconfig
132 %endif
133
134 # delete the Apache configuration if we're being removed
135 [ "$1" = 0 ] || exit 0
136 [ -f %{_sysconfdir}/httpd/conf.d/shib.conf ] && \
137     %{__rm} -f %{_sysconfdir}/httpd/conf.d/shib.conf
138 [ -f %{_sysconfdir}/apache2/conf.d/shib.conf ] && \
139     %{__rm} -f %{_sysconfdir}/apache2/conf.d/shib.conf
140
141 # clear init.d state
142 %if "%{_vendor}" == "redhat"
143         chkconfig --del shibd
144         [ -f %{_sysconfdir}/init.d/shibd ] && \
145             %{__rm} -f %{_sysconfdir}/init.d/shibd
146 %endif
147
148 %files -f rpm.filelist
149 %defattr(-,root,root,-)
150 %doc _docs/CREDITS.txt _docs/LICENSE.txt _docs/NOTICE.txt _docs/README.txt _docs/RELEASE.txt
151 %doc _docs/logo.jpg _docs/main.css
152 %{_sbindir}/shibd
153 %{_bindir}/mdquery
154 %{_bindir}/resolvertest
155 %{_libdir}/libshibsp.so.*
156 %{_libdir}/libshibsp-lite.so.*
157 %dir %{_localstatedir}/log/%{name}
158 %dir %{_datadir}/xml/%{name}
159 %{_datadir}/xml/%{name}
160 %dir %{_sysconfdir}/%{name}
161 %config(noreplace) %{_sysconfdir}/%{name}/*.xml
162 %config(noreplace) %{_sysconfdir}/%{name}/*.html
163 %config(noreplace) %{_sysconfdir}/%{name}/*.logger
164 %config %{_sysconfdir}/%{name}/sp-example.crt
165 %config %{_sysconfdir}/%{name}/sp-example.key
166 %{_sysconfdir}/%{name}/*.dist
167 %{_sysconfdir}/%{name}/apache*.config
168 %{_sysconfdir}/%{name}/shibd-redhat
169 %{_sysconfdir}/%{name}/shibd-debian
170 %{_sysconfdir}/%{name}/shibd-osx.plist
171 %exclude %{_libexecdir}/*.la
172
173 %files devel
174 %defattr(-,root,root,-)
175 %{_includedir}
176 %{_libdir}/libshibsp.so
177 %{_libdir}/libshibsp-lite.so
178
179 %changelog
180 * Thu Aug 16 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-3
181 - First public beta.
182
183 * Fri Jul 13 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-2
184 - Second alpha release.
185
186 * Sun Jun 10 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-1
187 - First alpha release.
188
189 * Mon Oct 2 2006 Scott Cantor   <cantor.2@osu.edu>  - 1.3-11
190 - Applied fix for secadv 20061002
191 - Fix for metadata loader loop
192
193 * Wed Jun 15 2006 Scott Cantor  <cantor.2@osu.edu>  - 1.3-10
194 - Applied fix for sec 20060615
195
196 * Fri Apr 15 2006 Scott Cantor  <cantor.2@osu.edu>  - 1.3-9
197 - Misc. patches, SuSE, Apache 2.2, gcc 4.1, and 64-bit support
198
199 * Mon Jan 9 2006 Scott Cantor  <cantor.2@osu.edu>  - 1.3-8
200 - Applied new fix for secadv 20060109
201
202 * Tue Nov 8 2005 Scott Cantor  <cantor.2@osu.edu>  - 1.3-7
203 - Applied new fix for secadv 20050901 plus rollup
204
205 * Fri Sep 23 2005 Scott Cantor  <cantor.2@osu.edu>  - 1.3-6
206 - Minor patches and default config changes
207 - pidfile patch
208 - Fix shib.conf creation
209 - Integrated init.d script
210 - Prevent replacement of config files
211
212 * Thu Sep 1 2005  Scott Cantor  <cantor.2@osu.edu>  - 1.3-5
213 - Applied fix for secadv 20050901 plus rollup of NSAPI fixes
214
215 * Sun Apr 24 2005  Scott Cantor  <cantor.2@osu.edu>  - 1.3-1
216 - Updated test programs and location of schemas.
217 - move siterefresh to to sbindir
218
219 * Fri Apr  1 2005  Derek Atkins  <derek@ihtfp.com>  - 1.3-1
220 - Add selinux-targeted-policy package
221 - move shar to sbindir
222
223 * Tue Oct 19 2004  Derek Atkins  <derek@ihtfp.com>  - 1.2-1
224 - Create SPEC file based on various versions in existence.