Browse code

Updated pygobject to version 3.24.1 and added python3 package.

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

xiaolin-vmware authored on 2017/04/15 07:01:36
Showing 1 changed files
... ...
@@ -1,57 +1,106 @@
1
-%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
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())")}
2 3
 
3 4
 Name:           pygobject
4
-Version:        3.10.2
5
-Release:	3%{?dist}
5
+Version:        3.24.1
6
+Release:        1%{?dist}
6 7
 Summary:        Python Bindings for GObject
7 8
 Group:          Development/Languages
8 9
 License:        LGPLv2+
9
-Vendor:		VMware, Inc.
10
-Distribution:	Photon
10
+Vendor:         VMware, Inc.
11
+Distribution:   Photon
11 12
 URL:            ftp://ftp.gnome.org
12
-Source0:        ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/3.10/pygobject-3.10.2.tar.xz
13
-%define sha1 pygobject=693cc1cb692a8f21ff27d28eaa780f5e67cafb1a
14
-Requires:	python2
15
-Requires:	gobject-introspection
16
-Requires:	glib-devel
17
-Provides:	pygobject
18
-BuildRequires: 	python2-devel
19
-BuildRequires: 	python2-libs
20
-BuildRequires: 	gobject-introspection-devel
21
-BuildRequires: 	glib-devel
13
+Source0:        ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/3.24/pygobject-3.24.1.tar.xz
14
+%define sha1    pygobject=acdb1958e7f9785d92888a423afffd7164502f87
15
+Requires:       python2
16
+Requires:       gobject-introspection
17
+Requires:       glib
18
+Provides:       pygobject
19
+BuildRequires:  python2-devel
20
+BuildRequires:  python2-libs
21
+BuildRequires:  gobject-introspection-devel
22
+BuildRequires:  glib-devel
23
+BuildRequires:  which
22 24
 
23 25
 %description
24 26
 Python bindings for GLib and GObject.
25 27
 
28
+%package -n     python3-pygobject
29
+Summary:        python-pygobject
30
+BuildRequires:  python3
31
+BuildRequires:  python3-devel
32
+BuildRequires:  python3-libs
33
+Requires:       python3
34
+Requires:       python3-libs
35
+Requires:       gobject-introspection
36
+Requires:       glib
37
+
38
+%description -n python3-pygobject
39
+Python 3 version.
40
+
41
+%package        devel
42
+Summary:        Development files for embedding PyGObject introspection support
43
+Requires:       pygobject = %{version}-%{release}
44
+Requires:       python3-pygobject = %{version}-%{release}
45
+
46
+%description    devel
47
+Development files for pygobject.
48
+
26 49
 %prep
27 50
 %setup -q -n pygobject-%{version}
51
+rm -rf ../p3dir
52
+cp -a . ../p3dir
28 53
 
29 54
 %build
30
-./configure --prefix=/usr --disable-cairo --without-cairo
55
+./configure \
56
+    --prefix=%{_prefix} \
57
+    --disable-cairo     \
58
+    --without-cairo     \
59
+    --with-python=/usr/bin/python2
60
+make
61
+pushd ../p3dir
62
+./configure \
63
+    --prefix=%{_prefix} \
64
+    --bindir=%{_bindir} \
65
+    --disable-cairo     \
66
+    --without-cairo     \
67
+    --with-python=/usr/bin/python3
31 68
 make
69
+popd
32 70
 
33 71
 %install
34 72
 make install DESTDIR=%{buildroot}
73
+pushd ../p3dir
74
+make install DESTDIR=%{buildroot}
75
+popd
35 76
 
36 77
 %check
37 78
 make %{?_smp_mflags} check
79
+pushd ../p3dir
80
+make %{?_smp_mflags} check
81
+popd
38 82
 
39 83
 %clean
40 84
 rm -rf %{buildroot}
41 85
 
42 86
 %files
43 87
 %defattr(-,root,root,-)
44
-%{_libdir}/*.la
45
-%{_libdir}/*.so
46
-%{_libdir}/*.so.*
88
+%{python2_sitelib}/*
89
+
90
+%files -n python3-pygobject
91
+%defattr(-,root,root,-)
92
+%{python3_sitelib}/*
93
+
94
+%files  devel
47 95
 %{_libdir}/pkgconfig/*.pc
48
-%{_libdir}/python*/*
49 96
 %{_includedir}/*
50 97
 
51 98
 %changelog
52
-*       Mon Oct 03 2016 ChangLee <changLee@vmware.com> 3.10.2-3
53
--       Modified %check
54
-*	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 3.10.2-2
55
--	GA - Bump release of all rpms
56
-*	Sat Jan 24 2015 Touseef Liaqat <tliaqat@vmware.com> 7.19.5.1
57
--	Initial build.	First version
99
+*   Fri Apr 14 2017 Xiaolin Li <xiaolinl@vmware.com> 3.24.1-1
100
+-   Updated to version 3.24.1 and added python3 package.
101
+*   Mon Oct 03 2016 ChangLee <changLee@vmware.com> 3.10.2-3
102
+-   Modified %check
103
+*   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 3.10.2-2
104
+-   GA - Bump release of all rpms
105
+*   Sat Jan 24 2015 Touseef Liaqat <tliaqat@vmware.com> 7.19.5.1
106
+-   Initial build.  First version