From 11b6226bd1aadd8640814a444140fe2d1273c370 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Mon, 22 Aug 2011 09:01:25 -0400 Subject: [PATCH 1/3] initial import --- .gitignore | 1 + pygobject3.spec | 173 ++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 175 insertions(+) create mode 100644 pygobject3.spec diff --git a/.gitignore b/.gitignore index e69de29..38971d8 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/pygobject-2.90.2.tar.bz2 diff --git a/pygobject3.spec b/pygobject3.spec new file mode 100644 index 0000000..d0298b7 --- /dev/null +++ b/pygobject3.spec @@ -0,0 +1,173 @@ +# Last updated for version 2.21.0 +%define glib2_version 2.22.4 +%define gobject_introspection_version 0.10.8 +%define python2_version 2.3.5 + +%if 0%{?fedora} > 12 || 0%{?rhel} > 6 +%global with_python3 1 +%define python3_version 3.1 +%endif + +### Abstract ### + +Name: pygobject3 +Version: 2.90.2 +Release: 3%{?dist} +License: LGPLv2+ and MIT +Group: Development/Languages +Summary: Python 2 bindings for GObject Introspection +URL: https://live.gnome.org/PyGObject +BuildRoot: %{_tmppath}/%{name}-%{version}-root +#VCS: git:git://git.gnome.org/pygobject +Source: http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.90/pygobject-%{version}.tar.bz2 + +### Patches ### + +### Build Dependencies ### + +BuildRequires: glib2-devel >= %{glib2_version} +BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version} +BuildRequires: python2-devel >= %{python2_version} +%if 0%{?with_python3} +BuildRequires: python3-devel >= %{python3_version} +BuildRequires: python3-cairo-devel +%endif # if with_python3 + +BuildRequires: pycairo-devel + +# The cairo override module depends on this +Requires: pycairo + +Requires: gobject-introspection >= %{gobject_introspection_version} + +%description +The %{name} package provides a convenient wrapper for the GObject library +for use in Python programs. + +%package devel +Summary: Development files for embedding PyGObject introspection support +Group: Development/Languages +Requires: %{name} = %{version}-%{release} +Requires: glib2-devel +Requires: gobject-introspection-devel +Requires: pkgconfig + +%description devel +This package contains files required to embed PyGObject + +%if 0%{?with_python3} +%package -n python3-gobject +Summary: Python 3 bindings for GObject Introspection +Group: Development/Languages + +# The cairo override module depends on this +#Requires: python3-cairo +Requires: gobject-introspection >= %{gobject_introspection_version} + +%description -n python3-gobject +The python3-gobject package provides a convenient wrapper for the GObject +library and and other libraries that are compatible with GObject Introspection, +for use in Python 3 programs. + +%endif # with_python3 + +%prep +%setup -q -n pygobject-%{version} + +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' +%endif # with_python3 + +find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|' + +%build +PYTHON=%{__python} +export PYTHON +%configure +make %{?_smp_mflags} + +%if 0%{?with_python3} +pushd %{py3dir} +PYTHON=%{__python3} +export PYTHON +%configure +make %{_smp_mflags} +popd +%endif # with_python3 + +%install +rm -rf $RPM_BUILD_ROOT + +%if 0%{?with_python3} +pushd %{py3dir} +PYTHON=%{__python3} +export PYTHON +make DESTDIR=$RPM_BUILD_ROOT install +popd + +# dsextra stuff is for windows installs so remove it +rm $RPM_BUILD_ROOT/%{python3_sitearch}/gtk-2.0/* +rmdir $RPM_BUILD_ROOT/%{python3_sitearch}/gtk-2.0 + +%endif # with_python3 + +make DESTDIR=$RPM_BUILD_ROOT install +find $RPM_BUILD_ROOT -name '*.la' -delete +find $RPM_BUILD_ROOT -name '*.a' -delete + +rm examples/Makefile* + +# dsextra stuff is for windows installs so remove it +rm $RPM_BUILD_ROOT/%{python_sitearch}/gtk-2.0/* +rmdir $RPM_BUILD_ROOT/%{python_sitearch}/gtk-2.0 + +# docs are out of date and are being reworked upstream +# so remove them +rm -rf $RPM_BUILD_ROOT/%{_datadir}/gtk-doc +rm -rf $RPM_BUILD_ROOT/%{_datadir}/pygobject + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(644, root, root, 755) +%doc AUTHORS NEWS README COPYING +%doc examples + +%{_libdir}/libpyglib-gi-2.0-python.so* +%dir %{python_sitearch}/gi +%{python_sitearch}/gi/* + +%files devel +%defattr(644, root, root, 755) +%dir %{_includedir}/pygobject-3.0/ +%{_includedir}/pygobject-3.0/pygobject.h +%{_libdir}/pkgconfig/pygobject-3.0.pc + +%if 0%{?with_python3} +%files -n python3-gobject +%defattr(644, root, root, 755) +%doc AUTHORS NEWS README COPYING +%doc examples + +%{_libdir}/libpyglib-gi-2.0-python3.so* +%dir %{python3_sitearch}/gi + +%{python3_sitearch}/gi/* + +%endif # with_python3 + +%changelog +* Thu Aug 22 2011 John (J5) Palmieri - 2.90.2-3 +- remove some old requires + +* Thu Aug 19 2011 John (J5) Palmieri - 2.90.2-2 +- fix up issues uncovered during package review +- disable docs because they still reference the static bindings + and upstream is working on new documentation + +* Thu Aug 18 2011 John (J5) Palmieri - 2.90.2-1 +- Initial package diff --git a/sources b/sources index e69de29..18d1b01 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +c9b692d3e4998fa6c8fa9fde7aff58a4 pygobject-2.90.2.tar.bz2 From 85d6ce9951f9e058766774cc110b44081d71b3c3 Mon Sep 17 00:00:00 2001 From: Ignacio Casal Quinteiro Date: Wed, 31 Aug 2011 18:24:42 +0200 Subject: [PATCH 2/3] 2.90.3 --- .gitignore | 1 + pygobject3.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 38971d8..0457464 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /pygobject-2.90.2.tar.bz2 +/pygobject-2.90.3.tar.gz diff --git a/pygobject3.spec b/pygobject3.spec index d0298b7..6d00ad7 100644 --- a/pygobject3.spec +++ b/pygobject3.spec @@ -11,8 +11,8 @@ ### Abstract ### Name: pygobject3 -Version: 2.90.2 -Release: 3%{?dist} +Version: 2.90.3 +Release: 1%{?dist} License: LGPLv2+ and MIT Group: Development/Languages Summary: Python 2 bindings for GObject Introspection @@ -161,6 +161,9 @@ rm -rf $RPM_BUILD_ROOT/%{_datadir}/pygobject %endif # with_python3 %changelog +* Wed Aug 31 2011 Ignacio Casal Quinteiro - 2.90.3-1 +- udpate to 2.90.3 + * Thu Aug 22 2011 John (J5) Palmieri - 2.90.2-3 - remove some old requires diff --git a/sources b/sources index 18d1b01..1fb161c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c9b692d3e4998fa6c8fa9fde7aff58a4 pygobject-2.90.2.tar.bz2 +4a497f991ac26d28cd898159b7bed94f pygobject-2.90.3.tar.gz From 55a78214aa51f2a05c7ea792a643b754cc336ecf Mon Sep 17 00:00:00 2001 From: Ignacio Casal Quinteiro Date: Wed, 31 Aug 2011 18:36:44 +0200 Subject: [PATCH 3/3] right source for 2.90.3 --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0457464..b86a2ac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /pygobject-2.90.2.tar.bz2 /pygobject-2.90.3.tar.gz +/pygobject-2.90.3.tar.bz2 diff --git a/sources b/sources index 1fb161c..e9ca91d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4a497f991ac26d28cd898159b7bed94f pygobject-2.90.3.tar.gz +7c833f68288850bf592566699740cfb7 pygobject-2.90.3.tar.bz2