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