Browse code

Added python3-libxml2 package. (Bug 1838024)

Change-Id: Ia2a0857a32274be6029dad6fc8b4438425bb4739
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2427
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Priyesh Padmavilasom <ppadmavilasom@vmware.com>

xiaolin-vmware authored on 2017/04/15 01:55:21
Showing 1 changed files
... ...
@@ -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:        5%{?dist}
7
+Release:        6%{?dist}
5 8
 License:        MIT
6 9
 URL:            http://xmlsoft.org/
7 10
 Group:          System Environment/General Libraries
... ...
@@ -32,6 +35,14 @@ 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.
35 43
 
36 44
 %package devel
37 45
 Summary:    Libraries and header files for libxml
... ...
@@ -58,12 +69,23 @@ sed \
58 58
     --disable-static \
59 59
     --with-history
60 60
 make %{?_smp_mflags}
61
+
61 62
 %install
62 63
 [ %{buildroot} != "/"] && rm -rf %{buildroot}/*
63 64
 make DESTDIR=%{buildroot} install
64 65
 find %{buildroot}/%{_libdir} -name '*.la' -delete
65 66
 %{_fixperms} %{buildroot}/*
66 67
 
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
+
67 78
 %check
68 79
 make %{?_smp_mflags} check
69 80
 
... ...
@@ -84,7 +106,11 @@ rm -rf %{buildroot}/*
84 84
 
85 85
 %files python
86 86
 %defattr(-,root,root)
87
-%{_libdir}/python*
87
+%{python2_sitelib}/*
88
+
89
+%files -n python3-libxml2
90
+%defattr(-,root,root)
91
+%{python3_sitelib}/*
88 92
 
89 93
 %files devel
90 94
 %defattr(-,root,root)
... ...
@@ -95,6 +121,8 @@ rm -rf %{buildroot}/*
95 95
 
96 96
 
97 97
 %changelog
98
+*   Thu Apr 13 2017 Xiaolin Li <xiaolinl@vmware.com> 2.9.4-6
99
+-   Added python3-libxml2 package.
98 100
 *   Tue Jan 3 2017 Alexey Makhalov <amakhalov@vmware.com> 2.9.4-5
99 101
 -   Fix for CVE-2016-9318
100 102
 *   Wed Dec 07 2016 Xiaolin Li <xiaolinl@vmware.com> 2.9.4-4