Macroize dependencies for SuSE.
[shibboleth/cpp-xmltooling.git] / xmltooling.spec.in
1 Name:           xmltooling
2 Version:        @-VERSION-@
3 Release:        1
4 Summary:    OpenSAML XMLTooling library
5 Group:          System Environment/Libraries
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
12 %define libpkgprefix lib
13 BuildRequires:  libXerces-c-devel >= 2.8.0
14 %else
15 %define libpkgprefix
16 BuildRequires:  xerces%{?xercesver}-c-devel >= 2.8.0
17 %endif
18 BuildRequires:  %{libpkgprefix}xml-security-c-devel >= 1.4.0
19 BuildRequires:  gcc-c++, openssl-devel, curl-devel >= 7.10.6
20 %{?_with_log4cpp:BuildRequires: %{libpkgprefix}log4cpp-devel >= 1.0}
21 %{!?_with_log4cpp:BuildRequires: %{libpkgprefix}log4shib-devel}
22
23 %description
24 The XMLTooling library contains generic XML parsing and processing
25 classes based on the Xerces-C DOM. It adds more powerful facilities
26 for declaring element- and type-specific API and implementation
27 classes to add value around the DOM, as well as signing and encryption
28 support.
29
30 %if 0%{?suse_version} > 1030
31 %package -n libxmltooling12
32 Summary:    OpenSAML XMLTooling library
33 Group:      Development/Libraries
34 Provides:   xmltooling = %{version}
35
36 %description -n libxmltooling12
37 The XMLTooling library contains generic XML parsing and processing
38 classes based on the Xerces-C DOM. It adds more powerful facilities
39 for declaring element- and type-specific API and implementation
40 classes to add value around the DOM, as well as signing and encryption
41 support.
42
43 This package contains just the shared library.
44 %endif
45
46 %if 0%{?suse_version} > 1030
47 %package -n libxmltooling-devel
48 Requires: libxmltooling12 = %version
49 %else
50 %package devel
51 Requires: %name = %version
52 %endif
53 Summary: XMLTooling development Headers
54 Group: Development/Libraries
55 %if 0%{?suse_version} > 1030
56 Requires: libXerces-c-devel >= 2.8.0
57 %else
58 Requires: xerces%{?xercesver}-c-devel >= 2.8.0
59 %endif
60 Requires: %{libpkgprefix}xml-security-c-devel >= 1.4.0
61 Requires: openssl-devel, curl-devel >= 7.10.6
62 %{?_with_log4cpp:Requires: %{libpkgprefix}log4cpp-devel >= 1.0}
63 %{!?_with_log4cpp:Requires: %{libpkgprefix}log4shib-devel}
64
65 %if 0%{?suse_version} > 1030
66 %description -n libxmltooling-devel
67 Requires: libxmltooling12 = %version
68 %else
69 %description
70 %endif
71 The XMLTooling library contains generic XML parsing and processing
72 classes based on the Xerces-C DOM. It adds more powerful facilities
73 for declaring element- and type-specific API and implementation
74 classes to add value around the DOM, as well as signing and encryption
75 support.
76
77 This package includes files needed for development with xmltooling.
78
79 %prep
80 %setup -q
81
82 %build
83 %configure %{?xmltooling_options}
84 %{__make}
85
86 %install
87 %{__make} install DESTDIR=$RPM_BUILD_ROOT
88 # Don't package unit tester if present.
89 {__rm} $RPM_BUILD_ROOT/%{_bindir}/xmltoolingtest
90
91 %check
92 %{__make} check
93
94 %clean
95 [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
96
97 %ifnos solaris2.8 solaris2.9 solaris2.10
98 %if 0%{?suse_version} > 1030
99 %post -n libxmltooling12 -p /sbin/ldconfig
100 %else
101 %post -p /sbin/ldconfig
102 %endif
103 %endif
104
105 %ifnos solaris2.8 solaris2.9 solaris2.10
106 %if 0%{?suse_version} > 1030
107 %postun -n libxmltooling12 -p /sbin/ldconfig
108 %else
109 %postun -p /sbin/ldconfig
110 %endif
111 %endif
112
113 %if 0%{?suse_version} > 1030
114 %files -n libxmltooling12
115 %else
116 %files
117 %endif
118 %defattr(-,root,root,-)
119 %{_libdir}/libxmltooling.so.*
120 %{_libdir}/libxmltooling-lite.so.*
121 %dir %{_datadir}/xml/xmltooling
122 %{_datadir}/xml/xmltooling
123
124 %if 0%{?suse_version} > 1030
125 %files -n libxmltooling-devel
126 %else
127 %files devel
128 %endif
129 %defattr(-,root,root,-)
130 %{_includedir}/*
131 %{_libdir}/*.so
132 %docdir %{_datadir}/doc/xmltooling
133 %{_datadir}/doc/xmltooling/README.txt
134 %{_datadir}/doc/xmltooling/LICENSE.txt
135 %{_datadir}/doc/xmltooling/NOTICE.txt
136 %{_datadir}/doc/xmltooling/CURL.LICENSE
137 %{_datadir}/doc/xmltooling/LOG4CPP.LICENSE
138 %{_datadir}/doc/xmltooling/OPENSSL.LICENSE
139 %doc %{_datadir}/doc/xmltooling/api
140
141 %changelog
142 * Thu Aug 6 2009  Scott Cantor  <cantor.2@osu.edu>  - 1.2.1-1
143 - SuSE conventions
144 - Stop packaging unit tester
145
146 * Wed Dec 3 2008  Scott Cantor  <cantor.2@osu.edu>  - 1.2-1
147 - Bumping for minor update.
148 - Fixing SuSE Xerces dependency name.
149
150 * Tue Jul 1 2008  Scott Cantor  <cantor.2@osu.edu>  - 1.1-1
151 - Bumping for minor update.
152
153 * Mon Mar 17 2008  Scott Cantor  <cantor.2@osu.edu>  - 1.0-6
154 - Official release.
155
156 * Fri Jan 18 2008  Scott Cantor  <cantor.2@osu.edu>  - 1.0-5
157 - Release candidate 1.
158
159 * Thu Nov 08 2007  Scott Cantor  <cantor.2@osu.edu>  - 1.0-4
160 - Second public beta.
161
162 * Thu Aug 16 2007  Scott Cantor  <cantor.2@osu.edu>  - 1.0-3
163 - First public beta.
164
165 * Fri Jul 13 2007  Scott Cantor  <cantor.2@osu.edu>  - 1.0-2
166 - Second alpha.
167
168 * Wed Apr 12 2006  Scott Cantor  <cantor.2@osu.edu>  - 1.0-1
169 - First SPEC file based on various versions in existence.