Change-Id: If866dacf2c39d5ddffe3c46f91e6a26584f1cc5e
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2434
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Priyesh Padmavilasom <ppadmavilasom@vmware.com>
| ... | ... |
@@ -1,7 +1,10 @@ |
| 1 |
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
|
|
| 2 |
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
|
|
| 3 |
+ |
|
| 1 | 4 |
Summary: Libxml2 |
| 2 | 5 |
Name: libxml2 |
| 3 | 6 |
Version: 2.9.4 |
| 4 |
-Release: 3%{?dist}
|
|
| 7 |
+Release: 4%{?dist}
|
|
| 5 | 8 |
License: MIT |
| 6 | 9 |
URL: http://xmlsoft.org/ |
| 7 | 10 |
Group: System Environment/General Libraries |
| ... | ... |
@@ -32,10 +35,19 @@ Requires: python2-libs |
| 32 | 32 |
%description python |
| 33 | 33 |
The libxml2 python module |
| 34 | 34 |
|
| 35 |
+%package -n python3-libxml2 |
|
| 36 |
+Summary: Python 3 bindings for libxml2. |
|
| 37 |
+Group: Development/Libraries |
|
| 38 |
+BuildRequires: python3-devel |
|
| 39 |
+Requires: python3 |
|
| 40 |
+ |
|
| 41 |
+%description -n python3-libxml2 |
|
| 42 |
+Python3 libxml2. |
|
| 43 |
+ |
|
| 35 | 44 |
|
| 36 | 45 |
%package devel |
| 37 | 46 |
Summary: Libraries and header files for libxml |
| 38 |
-Requires: %{name} = %{version}
|
|
| 47 |
+Requires: %{name} = %{version}
|
|
| 39 | 48 |
|
| 40 | 49 |
%description devel |
| 41 | 50 |
Static libraries and header files for the support library for libxml |
| ... | ... |
@@ -52,21 +64,33 @@ sed \ |
| 52 | 52 |
-i parser.c |
| 53 | 53 |
%build |
| 54 | 54 |
./configure \ |
| 55 |
- --prefix=%{_prefix} \
|
|
| 56 |
- --bindir=%{_bindir} \
|
|
| 57 |
- --libdir=%{_libdir} \
|
|
| 58 |
- --disable-static \ |
|
| 59 |
- --with-history |
|
| 55 |
+ --prefix=%{_prefix} \
|
|
| 56 |
+ --bindir=%{_bindir} \
|
|
| 57 |
+ --libdir=%{_libdir} \
|
|
| 58 |
+ --disable-static \ |
|
| 59 |
+ --with-history |
|
| 60 | 60 |
make %{?_smp_mflags}
|
| 61 | 61 |
%install |
| 62 | 62 |
[ %{buildroot} != "/"] && rm -rf %{buildroot}/*
|
| 63 | 63 |
make DESTDIR=%{buildroot} install
|
| 64 | 64 |
find %{buildroot}/%{_libdir} -name '*.la' -delete
|
| 65 | 65 |
%{_fixperms} %{buildroot}/*
|
| 66 |
+ |
|
| 67 |
+#Build and install python3-libxml2 |
|
| 68 |
+make clean |
|
| 69 |
+./configure \ |
|
| 70 |
+ --prefix=%{_prefix} \
|
|
| 71 |
+ --bindir=%{_bindir} \
|
|
| 72 |
+ --libdir=%{_libdir} \
|
|
| 73 |
+ --disable-static \ |
|
| 74 |
+ --with-python=/usr/bin/python3.5 |
|
| 75 |
+make %{?_smp_mflags}
|
|
| 76 |
+make install DESTDIR=%{buildroot}
|
|
| 77 |
+ |
|
| 66 | 78 |
%check |
| 67 | 79 |
make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
|
| 68 |
-%post -p /sbin/ldconfig |
|
| 69 |
-%postun -p /sbin/ldconfig |
|
| 80 |
+%post -p /sbin/ldconfig |
|
| 81 |
+%postun -p /sbin/ldconfig |
|
| 70 | 82 |
%clean |
| 71 | 83 |
rm -rf %{buildroot}/*
|
| 72 | 84 |
%files |
| ... | ... |
@@ -82,7 +106,11 @@ rm -rf %{buildroot}/*
|
| 82 | 82 |
|
| 83 | 83 |
%files python |
| 84 | 84 |
%defattr(-,root,root) |
| 85 |
-%{_libdir}/python*
|
|
| 85 |
+%{python2_sitelib}/*
|
|
| 86 |
+ |
|
| 87 |
+%files -n python3-libxml2 |
|
| 88 |
+%defattr(-,root,root) |
|
| 89 |
+%{python3_sitelib}/*
|
|
| 86 | 90 |
|
| 87 | 91 |
%files devel |
| 88 | 92 |
%defattr(-,root,root) |
| ... | ... |
@@ -92,25 +120,27 @@ rm -rf %{buildroot}/*
|
| 92 | 92 |
|
| 93 | 93 |
|
| 94 | 94 |
%changelog |
| 95 |
-* Tue Jan 3 2017 Alexey Makhalov <amakhalov@vmware.com> 2.9.4-3 |
|
| 96 |
-- Fix for CVE-2016-9318 |
|
| 97 |
-* Thu Oct 20 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.9.4-2 |
|
| 98 |
-- Apply patch for CVE-2016-5131 |
|
| 99 |
-* Wed Jun 01 2016 Anish Swaminathan <anishs@vmware.com> 2.9.4-1 |
|
| 100 |
-- Upgrade to 2.9.4 |
|
| 101 |
-* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.9.3-2 |
|
| 102 |
-- GA - Bump release of all rpms |
|
| 103 |
-* Tue Feb 23 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 2.9.3-1 |
|
| 104 |
-- Upgraded to version 2.9.3 |
|
| 105 |
-* Thu Jan 28 2016 Xiaolin Li <xiaolinl@vmware.com> 2.9.2-1 |
|
| 106 |
-- Downgrade to version 2.9.2 |
|
| 107 |
-- libxml 2.9.3 has been found to have major functional issues. |
|
| 108 |
-- Until these are resolved, please roadmap updating to 2.9.2. |
|
| 109 |
-* Wed Dec 2 2015 Xiaolin Li <xiaolinl@vmware.com> 2.9.3-1 |
|
| 110 |
-- Update to version 2.9.3 |
|
| 111 |
-* Thu Jul 2 2015 Mahmoud Bassiouny <mbassiouny@vmware.com> 2.9.1-3 |
|
| 112 |
-- Seperate the python module from the main library |
|
| 113 |
-* Thu Jun 11 2015 Alexey Makhalov <amakhalov@vmware.com> 2.9.1-2 |
|
| 114 |
-- Moved 'Provides: pkgconfig(...)' into base package |
|
| 115 |
-* Mon Oct 13 2014 Divya Thaluru <dthaluru@vmware.com> 2.9.1-1 |
|
| 116 |
-- Initial build. First version |
|
| 95 |
+* Thu Apr 13 2017 Xiaolin Li <xiaolinl@vmware.com> 2.9.4-4 |
|
| 96 |
+- Added python3-libxml2 package. |
|
| 97 |
+* Tue Jan 3 2017 Alexey Makhalov <amakhalov@vmware.com> 2.9.4-3 |
|
| 98 |
+- Fix for CVE-2016-9318 |
|
| 99 |
+* Thu Oct 20 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.9.4-2 |
|
| 100 |
+- Apply patch for CVE-2016-5131 |
|
| 101 |
+* Wed Jun 01 2016 Anish Swaminathan <anishs@vmware.com> 2.9.4-1 |
|
| 102 |
+- Upgrade to 2.9.4 |
|
| 103 |
+* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.9.3-2 |
|
| 104 |
+- GA - Bump release of all rpms |
|
| 105 |
+* Tue Feb 23 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 2.9.3-1 |
|
| 106 |
+- Upgraded to version 2.9.3 |
|
| 107 |
+* Thu Jan 28 2016 Xiaolin Li <xiaolinl@vmware.com> 2.9.2-1 |
|
| 108 |
+- Downgrade to version 2.9.2 |
|
| 109 |
+- libxml 2.9.3 has been found to have major functional issues. |
|
| 110 |
+- Until these are resolved, please roadmap updating to 2.9.2. |
|
| 111 |
+* Wed Dec 2 2015 Xiaolin Li <xiaolinl@vmware.com> 2.9.3-1 |
|
| 112 |
+- Update to version 2.9.3 |
|
| 113 |
+* Thu Jul 2 2015 Mahmoud Bassiouny <mbassiouny@vmware.com> 2.9.1-3 |
|
| 114 |
+- Seperate the python module from the main library |
|
| 115 |
+* Thu Jun 11 2015 Alexey Makhalov <amakhalov@vmware.com> 2.9.1-2 |
|
| 116 |
+- Moved 'Provides: pkgconfig(...)' into base package |
|
| 117 |
+* Mon Oct 13 2014 Divya Thaluru <dthaluru@vmware.com> 2.9.1-1 |
|
| 118 |
+- Initial build. First version |