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