From 127ab54d77fa030c5f91eabaff913e9efaa7a296 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Jan 07 2010 16:48:03 +0000 Subject: - Add switches to disable gda and gdl subpackages. --- diff --git a/gnome-python2-extras.spec b/gnome-python2-extras.spec index d8e79b0..c8c14cf 100644 --- a/gnome-python2-extras.spec +++ b/gnome-python2-extras.spec @@ -10,11 +10,14 @@ %define libgda_version 3.99.9 %define libgdl_version 2.24.0 +%define enable_gda 1 +%define enable_gdl 1 + ### Abstract ### Name: gnome-python2-extras Version: 2.25.3 -Release: 14%{?dist} +Release: 15%{?dist} License: GPLv2+ and LGPLv2+ Group: Development/Languages Summary: Additional PyGNOME Python extension modules @@ -46,15 +49,45 @@ BuildRequires: gtk2 >= %{gtk_version} BuildRequires: gtkhtml2-devel >= %{gtkhtml2_version} BuildRequires: gtkspell-devel >= %{gtkspell_version} BuildRequires: libbonoboui-devel -BuildRequires: libgda-devel >= %{libgda_version} -BuildRequires: libgdl-devel >= %{libgdl_version} BuildRequires: pygtk2-devel BuildRequires: python-devel +%if %{enable_gda} +BuildRequires: libgda-devel >= %{libgda_version} +%endif + +%if %{enable_gdl} +BuildRequires: libgdl-devel >= %{libgdl_version} +%endif + %description The gnome-python-extra package contains the source packages for additional Python bindings for GNOME. It should be used together with gnome-python. +%if %{enable_gda} +%package -n gnome-python2-gda +Summary: Python bindings for interacting with libgda +Group: Development/Languages +Requires: %{name} = %{version}-%{release} +Requires: libgda >= %{libgda_version} + +%description -n gnome-python2-gda +This module contains a wrapper that allows the use of libgda via Python. + +%package -n gnome-python2-gda-devel +Summary: Headers for developing programs that will use gnome-python2-gda +Group: Development/Libraries +Requires: gnome-python2-gda = %{version}-%{release} +Requires: pkgconfig +Requires: pygobject2-devel +Requires: libgda-devel >= %{libgda_version} + +%description -n gnome-python2-gda-devel +This module contains files needed for developing applications using +gnome-python2-gda. +%endif + +%if %{enable_gdl} %package -n gnome-python2-gdl Summary: Python bindings for the GNOME Development Library Group: Development/Languages @@ -64,6 +97,7 @@ Requires: libgdl >= %{libgdl_version} %description -n gnome-python2-gdl This module contains a wrapper that allows the use of the GNOME Development Library (gdl) via Python. +%endif %package -n gnome-python2-gtkhtml2 Summary: Python bindings for interacting with gtkhtml2 @@ -104,33 +138,25 @@ Requires: gnome-python2-gnome >= %{gnome_python_version} This module contains a wrapper that allows the use of recent files and tray icons via Python. -%package -n gnome-python2-gda -Summary: Python bindings for interacting with libgda -Group: Development/Languages -Requires: %{name} = %{version}-%{release} -Requires: libgda >= %{libgda_version} - -%description -n gnome-python2-gda -This module contains a wrapper that allows the use of libgda via Python. - -%package -n gnome-python2-gda-devel -Summary: Headers for developing programs that will use gnome-python2-gda -Group: Development/Libraries -Requires: gnome-python2-gda = %{version}-%{release} -Requires: pkgconfig -Requires: pygobject2-devel -Requires: libgda-devel >= %{libgda_version} - -%description -n gnome-python2-gda-devel -This module contains files needed for developing applications using -gnome-python2-gda. - %prep %setup -q -n gnome-python-extras-%{version} %patch1 -p1 -b .update-for-2.27.2 %build -%configure --with-gtkmozembed=mozilla --enable-docs + +%if %{enable_gda} +%define gda_flags --enable-gda +%else +%define gda_flags --disable-gda +%endif + +%if %{enable_gdl} +%define gdl_flags --enable-gdl +%else +%define gdl_flags --disable-gdl +%endif + +%configure --with-gtkmozembed=mozilla --enable-docs %gda_flags %gdl_flags make %{?_smp_mflags} %install @@ -150,9 +176,22 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/gnome-python-extras-2.0.pc %{_datadir}/pygtk +%if %{enable_gda} +%files -n gnome-python2-gda +%defattr(-,root,root,-) +%{python_sitearch}/gtk-2.0/gda.so + +%files -n gnome-python2-gda-devel +%defattr(-,root,root,-) +%{_includedir}/pygda-4.0/ +%{_libdir}/pkgconfig/pygda-4.0.pc +%endif + +%if %{enable_gdl} %files -n gnome-python2-gdl %defattr(-,root,root,-) %{python_sitearch}/gtk-2.0/gdl.so +%endif %files -n gnome-python2-gtkhtml2 %defattr(-,root,root,-) @@ -176,16 +215,10 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %doc examples/egg/* -%files -n gnome-python2-gda -%defattr(-,root,root,-) -%{python_sitearch}/gtk-2.0/gda.so - -%files -n gnome-python2-gda-devel -%defattr(-,root,root,-) -%{_includedir}/pygda-4.0/ -%{_libdir}/pkgconfig/pygda-4.0.pc - %changelog +* Thu Jan 07 2010 Matthew Barnes - 2.25.3-15 +- Add switches to disable gda and gdl subpackages. + * Thu Nov 26 2009 Jan Horak - 2.25.3-14 - Rebuild against newer gecko