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