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