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