Require latest xml-sec in specfile.
[shibboleth/cpp-xmltooling.git] / xmltooling.spec.in
1 Name:           @PACKAGE_NAME@
2 Version:        @PACKAGE_VERSION@
3 Release:        1
4 Summary:        OpenSAML XMLTooling library
5 Group:          Development/Libraries/C and C++
6 Vendor:         Shibboleth Consortium
7 License:        Apache 2.0
8 URL:            http://www.opensaml.org/
9 Source:         %{name}-%{version}.tar.bz2
10 BuildRoot:      %{_tmppath}/%{name}-%{version}-root
11 %if 0%{?rhel} >= 7 || 0%{?centos_version} >= 700
12 BuildRequires:  xerces-c-devel >= 3.1
13 %else
14 BuildRequires:  libxerces-c-devel >= 3.1
15 %endif
16 BuildRequires:  libxml-security-c-devel >= 1.7.3
17 %{?_with_log4cpp:BuildRequires: liblog4cpp-devel >= 1.0}
18 %{!?_with_log4cpp:BuildRequires: liblog4shib-devel >= 1.0.4}
19 BuildRequires: gcc-c++, openssl-devel, boost-devel >= 1.32.0
20 %if 0%{?rhel} >= 6 || 0%{?centos_version} >= 600 || 0%{?amzn} >= 1
21 BuildRequires: libcurl-openssl-devel >= 7.21.7
22 Requires: libcurl-openssl >= 7.21.7
23 %else
24 BuildRequires: curl-devel >= 7.10.6
25 %endif
26 %if 0%{?suse_version} > 1000
27 BuildRequires: pkg-config
28 %endif
29 %{!?_without_doxygen:BuildRequires: doxygen}
30 %if "%{_vendor}" == "redhat"
31 BuildRequires: redhat-rpm-config
32 %endif
33
34 %if "%{_vendor}" == "suse"
35 %define pkgdocdir %{_docdir}/%{name}
36 %else
37 %define pkgdocdir %{_docdir}/%{name}-%{version}
38 %endif
39
40 # Prevent the RHEL/etc 6+ package from requiring a vanilla libcurl.
41 %if 0%{?rhel} >= 6 || 0%{?centos_version} >= 600 || 0%{?amzn} >= 1
42 %filter_from_requires /libcurl\.so\..*/d
43 %filter_setup
44 %endif
45
46 %description
47 The XMLTooling library contains generic XML parsing and processing
48 classes based on the Xerces-C DOM. It adds more powerful facilities
49 for declaring element- and type-specific API and implementation
50 classes to add value around the DOM, as well as signing and encryption
51 support.
52
53 %package -n lib@PACKAGE_NAME@6
54 Summary:    OpenSAML XMLTooling library
55 Group:      Development/Libraries/C and C++
56 Provides:   @PACKAGE_NAME@ = %{version}-%{release}
57 Obsoletes:  @PACKAGE_NAME@ < %{version}-%{release}
58 %if 0%{?rhel} >= 6 || 0%{?centos_version} >= 600 || 0%{?amzn} >= 1
59 Requires: libcurl-openssl >= 7.21.7
60 %endif
61
62 %description -n lib@PACKAGE_NAME@6
63 The XMLTooling library contains generic XML parsing and processing
64 classes based on the Xerces-C DOM. It adds more powerful facilities
65 for declaring element- and type-specific API and implementation
66 classes to add value around the DOM, as well as signing and encryption
67 support.
68
69 This package contains just the shared library.
70
71 %package -n lib@PACKAGE_NAME@-devel
72 Summary:        XMLTooling development Headers
73 Group:          Development/Libraries/C and C++
74 Requires:       lib@PACKAGE_NAME@6 = %{version}-%{release}
75 Provides:       @PACKAGE_NAME@-devel = %{version}-%{release}
76 Obsoletes:      @PACKAGE_NAME@-devel < %{version}-%{release}
77 %if 0%{?rhel} >= 7 || 0%{?centos_version} >= 700
78 Requires:  xerces-c-devel >= 3.1
79 %else
80 Requires:  libxerces-c-devel >= 3.1
81 %endif
82 Requires: libxml-security-c-devel >= 1.7.3
83 %{?_with_log4cpp:Requires: liblog4cpp-devel >= 1.0}
84 %{!?_with_log4cpp:Requires: liblog4shib-devel >= 1.0.4}
85 Requires: openssl-devel, boost-devel >= 1.32.0
86 %if 0%{?rhel} >= 6 || 0%{?centos_version} >= 600 || 0%{?amzn} >= 1
87 Requires: libcurl-openssl-devel >= 7.21.7
88 %else
89 Requires: curl-devel >= 7.10.6
90 %endif
91
92 %description -n lib@PACKAGE_NAME@-devel
93 The XMLTooling library contains generic XML parsing and processing
94 classes based on the Xerces-C DOM. It adds more powerful facilities
95 for declaring element- and type-specific API and implementation
96 classes to add value around the DOM, as well as signing and encryption
97 support.
98
99 This package includes files needed for development with XMLTooling.
100
101 %package -n @PACKAGE_NAME@-schemas
102 Summary:        XMLTooling schemas and catalog
103 Group:          Development/Libraries/C and C++
104
105 %description -n @PACKAGE_NAME@-schemas
106 The XMLTooling library contains generic XML parsing and processing
107 classes based on the Xerces-C DOM. It adds more powerful facilities
108 for declaring element- and type-specific API and implementation
109 classes to add value around the DOM, as well as signing and encryption
110 support.
111
112 This package includes XML schemas and related files.
113
114 %prep
115 %setup -q
116
117 %build
118 %if 0%{?rhel} >= 6 || 0%{?centos_version} >= 600 || 0%{?amzn} >= 1
119 %configure %{?@PACKAGE_NAME@_options} --with-curl=/opt/shibboleth
120 %else
121 %configure %{?@PACKAGE_NAME@_options}
122 %endif
123 %{__make}
124
125 %install
126 %{__make} install DESTDIR=$RPM_BUILD_ROOT pkgdocdir=%{pkgdocdir}
127 # Don't package unit tester if present.
128 %{__rm} -f $RPM_BUILD_ROOT/%{_bindir}/@PACKAGE_NAME@test
129
130 %check
131 %{__make} check
132
133 %clean
134 [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
135
136 %ifnos solaris2.8 solaris2.9 solaris2.10
137 %post -n lib@PACKAGE_NAME@6 -p /sbin/ldconfig
138 %endif
139
140 %ifnos solaris2.8 solaris2.9 solaris2.10
141 %postun -n lib@PACKAGE_NAME@6 -p /sbin/ldconfig
142 %endif
143
144 %files -n lib@PACKAGE_NAME@6
145 %defattr(-,root,root,-)
146 %{_libdir}/*.so.*
147
148 %files -n @PACKAGE_NAME@-schemas
149 %defattr(-,root,root,-)
150 %dir %{_datadir}/xml/@PACKAGE_NAME@
151 %{_datadir}/xml/@PACKAGE_NAME@/*
152
153 %files -n lib@PACKAGE_NAME@-devel
154 %defattr(-,root,root,-)
155 %{_includedir}/*
156 %{_libdir}/*.so
157 %{_libdir}/pkgconfig/@PACKAGE_NAME@.pc
158 %doc %{pkgdocdir}
159
160 %changelog
161 * Thu Feb 26 2015 Scott Cantor <cantor.2@osu.edu> - 1.5.4-1
162 - Require Xerces 3.1 even on older platforms
163 - Add Amazon platform checks
164 - Switch to bz2 source to avoid future SuSE issues
165
166 * Tue May 13 2014 Ian Young <ian@iay.org.uk> - 1.5.3-1.2
167 - Update package dependencies for RHEL/CentOS 7
168
169 * Wed Dec 14 2011 Scott Cantor  <cantor.2@osu.edu>  - 1.5-1
170 - Update lib package number.
171 - Add boost-devel dependency.
172
173 * Sun Jun 26 2011  Scott Cantor  <cantor.2@osu.edu>  - 1.4.2-1
174 - Override curl build for RHEL6.
175
176 * Tue Oct 26 2010  Scott Cantor  <cantor.2@osu.edu>  - 1.4-1
177 - Update version
178 - Add pkg-config support.
179 - Sync package names for side by side install.
180 - Adjust Xerces dependency name and Group setting
181 - Split out schemas into separate subpackage
182
183 * Mon Aug 31 2009  Scott Cantor  <cantor.2@osu.edu>  - 1.3-1
184 - Bump soname for SUSE packaging.
185
186 * Thu Aug 6 2009  Scott Cantor  <cantor.2@osu.edu>  - 1.2.1-1
187 - SuSE conventions
188 - Stop packaging unit tester
189
190 * Wed Dec 3 2008  Scott Cantor  <cantor.2@osu.edu>  - 1.2-1
191 - Bumping for minor update.
192 - Fixing SuSE Xerces dependency name.
193
194 * Tue Jul 1 2008  Scott Cantor  <cantor.2@osu.edu>  - 1.1-1
195 - Bumping for minor update.
196
197 * Mon Mar 17 2008  Scott Cantor  <cantor.2@osu.edu>  - 1.0-6
198 - Official release.
199
200 * Fri Jan 18 2008  Scott Cantor  <cantor.2@osu.edu>  - 1.0-5
201 - Release candidate 1.
202
203 * Thu Nov 08 2007  Scott Cantor  <cantor.2@osu.edu>  - 1.0-4
204 - Second public beta.
205
206 * Thu Aug 16 2007  Scott Cantor  <cantor.2@osu.edu>  - 1.0-3
207 - First public beta.
208
209 * Fri Jul 13 2007  Scott Cantor  <cantor.2@osu.edu>  - 1.0-2
210 - Second alpha.
211
212 * Wed Apr 12 2006  Scott Cantor  <cantor.2@osu.edu>  - 1.0-1
213 - First SPEC file based on various versions in existence.