SPECS/libxml2/libxml2.spec
3e5e6b31
 %{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
 %{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
 
0b7dab7c
 Summary:        Libxml2
 Name:           libxml2
ce1d37c7
 Version:        2.9.8
2366bc4f
 Release:        1%{?dist}
0b7dab7c
 License:        MIT
 URL:            http://xmlsoft.org/
 Group:          System Environment/General Libraries
 Vendor:         VMware, Inc.
 Distribution:   Photon
 Source0:        ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz
ce1d37c7
 %define sha1    libxml2=66bcefd98a6b7573427cf66f9d3841b59eb5b8c3
0b7dab7c
 Provides:       pkgconfig(libxml-2.0)
f4d17450
 
 %description
 The libxml2 package contains libraries and utilities used for parsing XML files. 
 
33b59025
 %package python
a876bec0
 Summary:        The libxml2 python module
 Group:          Development/Languages/Python
 BuildRequires:  python2-devel
 BuildRequires:  python2-libs
 Requires:       %{name} = %{version}
 Requires:       python2
 Requires:       python2-libs
33b59025
 
a876bec0
 %description    python
33b59025
 The libxml2 python module
 
3e5e6b31
 %package -n     python3-libxml2
 Summary:        Python 3 bindings for libxml2.
 Group:          Development/Libraries
 BuildRequires:  python3-devel
a876bec0
 Requires:       %{name} = %{version}
3e5e6b31
 Requires:       python3
 
 %description -n python3-libxml2
 Python3 libxml2.
33b59025
 
f4d17450
 %package devel
 Summary:    Libraries and header files for libxml
0b7dab7c
 Requires:   %{name} = %{version}
f4d17450
 
 %description devel
 Static libraries and header files for the support library for libxml
 
 %prep
 %setup -q
05bf919f
 sed \
   -e /xmlInitializeCatalog/d \
   -e 's/((ent->checked =.*&&/(((ent->checked == 0) ||\
           ((ent->children == NULL) \&\& (ctxt->options \& XML_PARSE_NOENT))) \&\&/' \
   -i parser.c
f4d17450
 %build
 ./configure \
0b7dab7c
     --prefix=%{_prefix} \
     --bindir=%{_bindir} \
     --libdir=%{_libdir} \
     --disable-static \
     --with-history
f4d17450
 make %{?_smp_mflags}
3e5e6b31
 
f4d17450
 %install
 [ %{buildroot} != "/"] && rm -rf %{buildroot}/*
 make DESTDIR=%{buildroot} install
 find %{buildroot}/%{_libdir} -name '*.la' -delete
 %{_fixperms} %{buildroot}/*
2a807a3e
 
3e5e6b31
 make clean
 ./configure \
     --prefix=%{_prefix} \
     --bindir=%{_bindir} \
     --libdir=%{_libdir} \
     --disable-static \
f11b4791
     --with-python=/usr/bin/python3
3e5e6b31
 make %{?_smp_mflags}
 make install DESTDIR=%{buildroot}
 
f4d17450
 %check
2a807a3e
 make %{?_smp_mflags} check
 
0b7dab7c
 %post   -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
f4d17450
 %clean
 rm -rf %{buildroot}/*
 %files
 %defattr(-,root,root)
 %{_docdir}/*
 %{_libdir}/libxml*
 %{_libdir}/xml2Conf.sh
 %{_bindir}/*
 %{_datadir}/aclocal/*
 %{_datadir}/gtk-doc/*
 %{_mandir}/man1/*
0b7dab7c
 
f4d17450
 
33b59025
 %files python
 %defattr(-,root,root)
3e5e6b31
 %{python2_sitelib}/*
 
 %files -n python3-libxml2
 %defattr(-,root,root)
 %{python3_sitelib}/*
33b59025
 
f4d17450
 %files devel
 %defattr(-,root,root)
 %{_includedir}/*
0b7dab7c
 %{_mandir}/man3/*
f4d17450
 %{_libdir}/pkgconfig/libxml-2.0.pc
269e74cf
 %{_libdir}/cmake/libxml2/libxml2-config.cmake
 
f4d17450
 %changelog
ce1d37c7
 *   Tue Sep 11 2018 Keerthana K <keerthanak@vmware.com> 2.9.8-1
 -   Update to version 2.9.8
5b415532
 *   Mon Feb 12 2018 Xiaolin Li <xiaolinl@vmware.com> 2.9.7-1
 -   Update to version 2.9.7
2366bc4f
 *   Wed Oct 18 2017 Xiaolin Li <xiaolinl@vmware.com> 2.9.6-1
 -   Update to version 2.9.6
ea6516be
 *   Mon Oct 2 2017 Anish Swaminathan <anishs@vmware.com> 2.9.4-12
 -   Remove call to _PyVerify_fd
10b12edd
 *   Wed Aug 09 2017 Dheeraj Shetty <dheerajs@vmware.com> 2.9.4-11
 -   Apply patch for CVE-2017-8872
4b8433d9
 *   Mon Aug 07 2017 Danut Moraru <dmoraru@vmware.com> 2.9.4-10
 -   Change expected parsing error for test for upstream bug 781205 introduced by CVE-2017-9049
78c84aa9
 *   Mon Jul 10 2017 Divya Thaluru <dthaluru@vmware.com> 2.9.4-9
 -   Apply patch for CVE-2017-9047, CVE-2017-9048, CVE-2017-9049 and CVE-2017-9050
a876bec0
 *   Thu May 18 2017 Xiaolin Li <xiaolinl@vmware.com> 2.9.4-8
 -   Move python2 requires to python subpackage.
f11b4791
 *   Wed Apr 26 2017 Siju Maliakkal <smaliakkal@vmware.com> 2.9.4-7
 -   Modified python3 version in configure
3e5e6b31
 *   Thu Apr 13 2017 Xiaolin Li <xiaolinl@vmware.com> 2.9.4-6
 -   Added python3-libxml2 package.
941822c0
 *   Tue Jan 3 2017 Alexey Makhalov <amakhalov@vmware.com> 2.9.4-5
 -   Fix for CVE-2016-9318
0b7dab7c
 *   Wed Dec 07 2016 Xiaolin Li <xiaolinl@vmware.com> 2.9.4-4
 -   Moved man3 to devel subpackage.
 *   Thu Oct 20 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.9.4-3
 -   Apply patch for CVE-2016-5131
 *   Mon Oct 03 2016 Chang Lee <changlee@vmware.com> 2.9.4-2
 -   Modified check
 *   Wed Jun 01 2016 Anish Swaminathan <anishs@vmware.com> 2.9.4-1
 -   Upgrade to 2.9.4
 *   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.9.3-2
 -   GA - Bump release of all rpms
 *   Tue Feb 23 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 2.9.3-1
 -   Upgraded to version 2.9.3
 *   Thu Jan 28 2016 Xiaolin Li <xiaolinl@vmware.com> 2.9.2-1
 -   Downgrade to version 2.9.2
 -   libxml 2.9.3 has been found to have major functional issues. 
 -   Until these are resolved, please roadmap updating to 2.9.2.
 *   Wed Dec 2 2015 Xiaolin Li <xiaolinl@vmware.com> 2.9.3-1
 -   Update to version 2.9.3
 *   Thu Jul 2 2015 Mahmoud Bassiouny <mbassiouny@vmware.com> 2.9.1-3
 -   Seperate the python module from the main library
 *   Thu Jun 11 2015 Alexey Makhalov <amakhalov@vmware.com> 2.9.1-2
 -   Moved 'Provides: pkgconfig(...)' into base package
 *   Mon Oct 13 2014 Divya Thaluru <dthaluru@vmware.com> 2.9.1-1
 -   Initial build.  First version