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