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