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