%define major 1 %define libname %mklibname expat %{major} %define devname %mklibname expat -d Summary: XML parser written in C Name: expat Version: 2.2.10 %define subrel 1 Release: %mkrel 1 License: MIT Group: Text tools URL: http://www.libexpat.org Source0: http://prdownloads.sourceforge.net/expat/expat-%{version}.tar.xz Patch0: CVE-2021-45960.patch Patch1: CVE-2021-46143.patch Patch2: CVE-2022-22822-to-22827.patch BuildRequires: docbook2x %description Expat is an XML 1.0 parser written in C by James Clark. It aims to be fully conforming. It is currently not a validating XML parser. %package -n %{libname} Summary: Main library for expat Group: Development/C %description -n %{libname} This package contains the library needed to run programs dynamically linked with expat. %package -n %{devname} Summary: Development environment for the expat XML parser Group: Development/C Requires: %{libname} = %{version}-%{release} Provides: lib%{name}-devel = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %description -n %{devname} Development environment for the expat XML parser. %prep %setup -q %autopatch -p1 %build #rm -rf autom4te*.cache #rm conftools/libtool.m4 #libtoolize --copy --force --automake; aclocal; autoheader; autoconf #export CFLAGS="%{optflags} -fPIC" %configure \ --disable-static \ --with-docbook %make_build %check make check %install %make_install #we don't want these find %{buildroot} -name "*.la" -delete %files %{_bindir}/xmlwf %{_mandir}/man*/* %files -n %{libname} %{_libdir}/libexpat.so.%{major}{,.*} %files -n %{devname} %doc doc/reference.html %{_libdir}/libexpat.so %{_includedir}/expat.h %{_includedir}/expat_config.h %{_includedir}/expat_external.h %{_libdir}/pkgconfig/expat.pc %{_docdir}/expat/AUTHORS %{_docdir}/expat/changelog