Logging fixes.
[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 Source0:        http://shibboleth.internet2.edu/downloads/%{name}-%{version}.tar.gz
10 BuildRoot:      %{_tmppath}/%{name}-%{version}-root
11
12 BuildRequires:  openssl-devel, curl-devel >= 7.10.6
13 BuildRequires:  xerces%{?xercesver}-c-devel >= 2.8.0, xml-security-c-devel >= 1.1.0
14 BuildRequires:  zlib-devel, opensaml-devel >= 1.1.1, opensaml-devel < 2.0
15 %{?_with_log4cpp:BuildRequires: log4cpp-devel >= 0.3.5}
16 %{!?_with_log4cpp:BuildRequires: log4shib-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 %{?shib_options}
56 %{__make}
57
58 %install
59 [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
60 %{__rm} -rf _docs
61
62 %{__make} install DESTDIR=$RPM_BUILD_ROOT
63 %{__mv} $RPM_BUILD_ROOT/usr/doc/shibboleth _docs
64
65 %if "%{_vendor}" == "suse"
66         %{__sed} -i "s/\/var\/log\/httpd/\/var\/log\/apache2/g" \
67                 $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/native.logger
68 %endif
69
70 find $RPM_BUILD_ROOT/%{_libexecdir} -type f -or -type l |
71   %{__sed} -e "s|$RPM_BUILD_ROOT||" | sort > rpm.filelist
72
73 %check || :
74 %{__make} check
75
76 %clean
77 [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
78
79 %ifnos solaris2.8 solaris2.9 solaris2.10 
80 %post -p /sbin/ldconfig
81 %endif
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}/shibboleth/%{_vendor} %{_sysconfdir}/init.d/shibd
122                         %{__chmod} 755 %{_sysconfdir}/init.d/shibd
123                         chkconfig --add shibd
124                 fi
125         fi
126 %endif
127
128 %ifnos solaris2.8 solaris2.9 solaris2.10 
129 %postun -p /sbin/ldconfig
130 %endif
131
132 # delete the Apache configuration if we're being removed
133 [ "$1" = 0 ] || exit 0
134 [ -f %{_sysconfdir}/httpd/conf.d/shib.conf ] && \
135     %{__rm} -f %{_sysconfdir}/httpd/conf.d/shib.conf
136 [ -f %{_sysconfdir}/apache2/conf.d/shib.conf ] && \
137     %{__rm} -f %{_sysconfdir}/apache2/conf.d/shib.conf
138
139 # clear init.d state
140 %if "%{_vendor}" == "redhat"
141         chkconfig --del shibd
142         [ -f %{_sysconfdir}/init.d/shibd ] && \
143             %{__rm} -f %{_sysconfdir}/init.d/shibd
144 %endif
145
146 %files -f rpm.filelist
147 %defattr(-,root,root,-)
148 %doc _docs/CREDITS.txt _docs/NOTICE.txt _docs/NEWS.txt _docs/logo.jpg
149 %doc _docs/main.css _docs/README.txt _docs/LICENSE.txt
150 %{_sbindir}/shibd
151 %{_sbindir}/siterefresh
152 %{_bindir}/shibtest
153 %{_libdir}/libshib.so.*
154 %{_libdir}/libshib-target.so.*
155 %dir %{_localstatedir}/log/shibboleth
156 %dir %{_datadir}/xml/shibboleth
157 %{_datadir}/xml/shibboleth/*.xsd
158 %{_datadir}/xml/shibboleth/*.xsl
159 %dir %{_sysconfdir}/shibboleth
160 %config(noreplace) %{_sysconfdir}/shibboleth/*.xml
161 %config(noreplace) %{_sysconfdir}/shibboleth/*.html
162 %config(noreplace) %{_sysconfdir}/shibboleth/*.logger
163 %config %{_sysconfdir}/shibboleth/sp-example.crt
164 %config %{_sysconfdir}/shibboleth/sp-example.key
165 %{_sysconfdir}/shibboleth/*.dist
166 %{_sysconfdir}/shibboleth/apache*.config
167 %{_sysconfdir}/%{name}/shibd-redhat
168 %{_sysconfdir}/%{name}/shibd-debian
169 %{_sysconfdir}/%{name}/shibd-osx.plist
170
171 %exclude %{_bindir}/posttest
172 %exclude %{_bindir}/test-client
173 %exclude %{_libexecdir}/*.la
174
175 %files devel
176 %defattr(-,root,root,-)
177 %{_includedir}
178 %{_libdir}/libshib.so
179 %{_libdir}/libshib-target.so
180
181 %changelog
182 * Sat Sep 15 2007 Scott Cantor   <cantor.2@osu.edu>  - 1.3.1-1
183 - 1.3.1 release
184
185 * Mon Oct 2 2006 Scott Cantor   <cantor.2@osu.edu>  - 1.3-11
186 - Applied fix for secadv 20061002
187 - Fix for metadata loader loop
188
189 * Wed Jun 15 2006 Scott Cantor  <cantor.2@osu.edu>  - 1.3-10
190 - Applied fix for sec 20060615
191
192 * Fri Apr 15 2006 Scott Cantor  <cantor.2@osu.edu>  - 1.3-9
193 - Misc. patches, SuSE, Apache 2.2, gcc 4.1, and 64-bit support
194
195 * Mon Jan 9 2006 Scott Cantor  <cantor.2@osu.edu>  - 1.3-8
196 - Applied new fix for secadv 20060109
197
198 * Tue Nov 8 2005 Scott Cantor  <cantor.2@osu.edu>  - 1.3-7
199 - Applied new fix for secadv 20050901 plus rollup
200
201 * Fri Sep 23 2005 Scott Cantor  <cantor.2@osu.edu>  - 1.3-6
202 - Minor patches and default config changes
203 - pidfile patch
204 - Fix shib.conf creation
205 - Integrated init.d script
206 - Prevent replacement of config files
207
208 * Thu Sep 1 2005  Scott Cantor  <cantor.2@osu.edu>  - 1.3-5
209 - Applied fix for secadv 20050901 plus rollup of NSAPI fixes
210
211 * Sun Apr 24 2005  Scott Cantor  <cantor.2@osu.edu>  - 1.3-1
212 - Updated test programs and location of schemas.
213 - move siterefresh to to sbindir
214
215 * Fri Apr  1 2005  Derek Atkins  <derek@ihtfp.com>  - 1.3-1
216 - Add selinux-targeted-policy package
217 - move shar to sbindir
218
219 * Tue Oct 19 2004  Derek Atkins  <derek@ihtfp.com>  - 1.2-1
220 - Create SPEC file based on various versions in existence.