Fix Obsoletes versioning.
[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:          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:  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 %{!?_without_doxygen:BuildRequires: doxygen}
21 %if "%{_vendor}" == "redhat"
22 BuildRequires: redhat-rpm-config
23 %endif
24
25 %if "%{_vendor}" == "suse"
26 %define pkgdocdir %{_docdir}/%{name}
27 %else
28 %define pkgdocdir %{_docdir}/%{name}-%{version}
29 %endif
30
31 %description
32 The XMLTooling library contains generic XML parsing and processing
33 classes based on the Xerces-C DOM. It adds more powerful facilities
34 for declaring element- and type-specific API and implementation
35 classes to add value around the DOM, as well as signing and encryption
36 support.
37
38 %package -n lib@PACKAGE_NAME@5
39 Summary:    OpenSAML XMLTooling library
40 Group:      Development/Libraries
41 Provides:   @PACKAGE_NAME@ = %{version}-%{release}
42 Obsoletes:  @PACKAGE_NAME@ < %{version}-%{release}
43
44 %description -n lib@PACKAGE_NAME@5
45 The XMLTooling library contains generic XML parsing and processing
46 classes based on the Xerces-C DOM. It adds more powerful facilities
47 for declaring element- and type-specific API and implementation
48 classes to add value around the DOM, as well as signing and encryption
49 support.
50
51 This package contains just the shared library.
52
53 %package -n lib@PACKAGE_NAME@-devel
54 Summary:        XMLTooling development Headers
55 Group:          Development/Libraries
56 Requires:       lib@PACKAGE_NAME@5 = %{version}-%{release}
57 Provides:       @PACKAGE_NAME@-devel = %{version}-%{release}
58 Obsoletes:      @PACKAGE_NAME@-devel < %{version}-%{release}
59 %if 0%{?suse_version} > 1030
60 Requires:  libXerces-c-devel >= 2.8.0
61 %else
62 Requires:  libxerces-c-devel >= 2.8.0
63 %endif
64 Requires: libxml-security-c-devel >= 1.4.0
65 %{?_with_log4cpp:Requires: liblog4cpp-devel >= 1.0}
66 %{!?_with_log4cpp:Requires: liblog4shib-devel}
67 Requires: openssl-devel, curl-devel >= 7.10.6
68
69 %description -n lib@PACKAGE_NAME@-devel
70 The XMLTooling library contains generic XML parsing and processing
71 classes based on the Xerces-C DOM. It adds more powerful facilities
72 for declaring element- and type-specific API and implementation
73 classes to add value around the DOM, as well as signing and encryption
74 support.
75
76 This package includes files needed for development with XMLTooling.
77
78 %package -n @PACKAGE_NAME@-schemas
79 Summary:        XMLTooling schemas and catalog
80 Group:          Development/Libraries
81
82 %description -n @PACKAGE_NAME@-schemas
83 The XMLTooling library contains generic XML parsing and processing
84 classes based on the Xerces-C DOM. It adds more powerful facilities
85 for declaring element- and type-specific API and implementation
86 classes to add value around the DOM, as well as signing and encryption
87 support.
88
89 This package includes XML schemas and related files.
90
91 %prep
92 %setup -q
93
94 %build
95 %configure %{?@PACKAGE_NAME@_options}
96 %{__make}
97
98 %install
99 %{__make} install DESTDIR=$RPM_BUILD_ROOT pkgdocdir=%{pkgdocdir}
100 # Don't package unit tester if present.
101 %{__rm} -f $RPM_BUILD_ROOT/%{_bindir}/@PACKAGE_NAME@test
102
103 %check
104 %{__make} check
105
106 %clean
107 [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
108
109 %ifnos solaris2.8 solaris2.9 solaris2.10
110 %post -n lib@PACKAGE_NAME@5 -p /sbin/ldconfig
111 %endif
112
113 %ifnos solaris2.8 solaris2.9 solaris2.10
114 %postun -n lib@PACKAGE_NAME@5 -p /sbin/ldconfig
115 %endif
116
117 %files -n lib@PACKAGE@5
118 %defattr(-,root,root,-)
119 %{_libdir}/*.so.*
120
121 %files -n @PACKAGE_NAME@-schemas
122 %defattr(-,root,root,-)
123 %dir %{_datadir}/xml/@PACKAGE_NAME@
124 %{_datadir}/xml/@PACKAGE_NAME@/*
125
126 %files -n lib@PACKAGE_NAME@-devel
127 %defattr(-,root,root,-)
128 %{_includedir}/*
129 %{_libdir}/*.so
130 %{_libdir}/pkgconfig/@PACKAGE_NAME@.pc
131 %doc %{pkgdocdir}
132
133 %changelog
134 * Thu Dec 24 2009  Scott Cantor  <cantor.2@osu.edu>  - 1.4-1
135 - Add pkg-config support.
136 - Sync package names for side by side install.
137
138 * Mon Aug 31 2009  Scott Cantor  <cantor.2@osu.edu>  - 1.3-1
139 - Bump soname for SUSE packaging.
140
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.