%define buildglade %(pkg-config libglade-2.0 && echo 1 || echo 0) Name: pygtk2 Version: 2.4.0 Release: 1.fdr.1 Summary: Python bindings for the GTK+ widget set. License: LGPL Group: Development/Languages Source: ftp://ftp.gtk.org/pub/gtk/python/pygtk-%{version}.tar.bz2 Source2: acinclude.m4 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: gtk2 >= 2.4.0 Requires: python2 >= 2.3 BuildRequires: python2-devel >= 2.3 BuildRequires: libglade2-devel BuildRequires: gtk2-devel >= 2.4 # needed for automake/autoconf to work right with multilib python BuildRequires: automake >= 1.6.3-5 BuildRequires: libtool # somebody kill libtool BuildRequires: gcc-c++ %description PyGTK is an extension module for python that gives you access to the GTK+ widget set. Just about anything you can write in C with GTK+ you can write in python with PyGTK (within reason), but with all the benefits of python. %package libglade Summary: A wrapper for the libglade library for use with PyGTK Group: Development/Languages Requires: pygtk2 = %{version} %description libglade This module contains a wrapper for the libglade library. Libglade allows a program to construct its user interface from an XML description, which allows the programmer to keep the UI and program logic separate. %package devel Summary: files needed to build wrappers for GTK+ addon libraries Group: Development/Languages Requires: pygtk2 = %{version} %description devel This package contains files required to build wrappers for GTK+ addon libraries so that they interoperate with pygtk. %prep %setup -q -n pygtk-%{version} %build cp %SOURCE2 . aclocal && automake && autoconf %configure --enable-thread --enable-numpy export tagname=CC make LIBTOOL=/usr/bin/libtool %install rm -rf $RPM_BUILD_ROOT export tagname=CC make LIBTOOL=/usr/bin/libtool DESTDIR=$RPM_BUILD_ROOT install find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -f %files %defattr(644, root, root, 755) %dir %{_libdir}/python?.?/site-packages/gtk-2.0 %dir %{_libdir}/python?.?/site-packages/gtk-2.0/gtk %{_libdir}/python?.?/site-packages/gtk-2.0/gtk/*.py* %{_libdir}/python?.?/site-packages/gtk-2.0/dsextras.py* %defattr(755, root, root, 755) %{_libdir}/python?.?/site-packages/pygtk* %{_libdir}/python?.?/site-packages/gtk-2.0/atk.so %{_libdir}/python?.?/site-packages/gtk-2.0/gobject.so %{_libdir}/python?.?/site-packages/gtk-2.0/pango.so %{_libdir}/python?.?/site-packages/gtk-2.0/gtk/_gtk.so %doc AUTHORS NEWS README MAPPING ChangeLog %doc examples %if %{buildglade} %files libglade %defattr(755, root, root, 755) %{_libdir}/python?.?/site-packages/gtk-2.0/gtk/glade.so %endif %files devel %defattr(755, root, root, 755) %{_bindir}/pygtk-codegen-2.0 %defattr(644, root, root, 755) %{_includedir}/pygtk-2.0 %{_libdir}/pkgconfig/pygtk-2.0.pc %{_datadir}/pygtk %changelog * Mon Oct 18 2004 Thomas Vander Stichele - 2.4.0-1.fdr.1: adapted the Red Hat development spec file