Removed siterefresh utility.
[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.3.1
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 #make -C selinux
58
59 %install
60 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
61 rm -rf _docs
62 make install DESTDIR=$RPM_BUILD_ROOT
63 make -C selinux install DESTDIR=$RPM_BUILD_ROOT
64 mv $RPM_BUILD_ROOT/usr/doc/%{name} _docs
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 | grep \.so |
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 /sbin/ldconfig
82
83 # Plug the SP into Apache on a recognized system.
84 APACHE_CONFIG="no"
85 if [ -f $RPM_BUILD_ROOT/%{_libexecdir}/mod_shib_13.so ] ; then
86         APACHE_CONFIG="apache.config"
87 fi
88 if [ -f $RPM_BUILD_ROOT/%{_libexecdir}/mod_shib_20.so ] ; then
89         APACHE_CONFIG="apache2.config"
90 fi
91 if [ -f $RPM_BUILD_ROOT/%{_libexecdir}/mod_shib_22.so ] ; then
92         APACHE_CONFIG="apache22.config"
93 fi
94 if [ "$APACHE_CONFIG" != "no" ] ; then
95         APACHE_CONFD="no"
96         if [ -d %{_sysconfdir}/httpd/conf.d ] ; then
97                 APACHE_CONFD="%{_sysconfdir}/httpd/conf.d"
98         fi
99         if [ -d %{_sysconfdir}/apache2/conf.d ] ; then
100                 APACHE_CONFD="%{_sysconfdir}/apache2/conf.d"
101         fi
102         if [ "$APACHE_CONFD" != "no" ] ; then
103                 if [ ! -f $APACHE_CONFD/shib.conf ] ; then
104 %if "%{_vendor}" == "suse"
105                     sed "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/packages\/%{name}/g" \
106                                 %{_sysconfdir}/%{name}/$APACHE_CONFIG \
107                                 > $APACHE_CONFD/shib.conf
108 %else
109                         sed "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/%{name}-@-VERSION-@/g" \
110                             %{_sysconfdir}/%{name}/$APACHE_CONFIG \
111                             > $APACHE_CONFD/shib.conf
112 %endif
113                 fi
114         fi
115 fi
116
117 # Install the shibd init.d scripts and service
118 %if "%{_vendor}" == "redhat"
119         if [ -d %{_sysconfdir}/init.d ] ; then
120                 if [ ! -f %{_sysconfdir}/init.d/shibd ] ; then
121                         cp -p %{_sysconfdir}/%{name}/shibd-%{_vendor} %{_sysconfdir}/init.d/shibd
122                         chmod 755 %{_sysconfdir}/init.d/shibd
123                         chkconfig --add shibd
124                 fi
125         fi
126 %endif
127
128 %postun
129 /sbin/ldconfig
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 %doc _docs/CREDITS.txt _docs/LICENSE.txt _docs/NOTICE.txt _docs/README.txt _docs/RELEASE.txt
148 %doc _docs/logo.jpg _docs/main.css
149 %{_sbindir}/shibd
150 %{_bindir}/samlquery
151 %{_bindir}/mdquery
152 %{_libdir}/libshibsp.so.*
153 %{_libdir}/libshibsp-lite.so.*
154 %dir %{_localstatedir}/log/%{name}
155 %dir %{_datadir}/xml/%{name}
156 %{_datadir}/xml/%{name}
157 %dir %{_sysconfdir}/%{name}
158 %config(noreplace) %{_sysconfdir}/%{name}/*.xml
159 %config(noreplace) %{_sysconfdir}/%{name}/*.html
160 %config(noreplace) %{_sysconfdir}/%{name}/*.logger
161 %config %{_sysconfdir}/%{name}/sp-example.crt
162 %config %{_sysconfdir}/%{name}/sp-example.key
163 %{_sysconfdir}/%{name}/*.dist
164 %{_sysconfdir}/%{name}/apache*.config
165 %{_sysconfdir}/%{name}/shibd-redhat
166 %{_sysconfdir}/%{name}/shibd-debian
167 %{_sysconfdir}/%{name}/shibd-osx.plist
168 %exclude %{_libexecdir}/*.la
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.