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