2007-01-12 16:15:54 +00:00
|
|
|
#
|
2011-05-04 13:30:01 +00:00
|
|
|
# spec file for package python-gtk
|
2007-01-12 16:15:54 +00:00
|
|
|
#
|
2011-05-04 13:30:01 +00:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-12 16:15:54 +00:00
|
|
|
#
|
2008-11-03 13:18:39 +00:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-12 16:15:54 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-04-08 22:46:18 +00:00
|
|
|
|
2007-01-12 16:15:54 +00:00
|
|
|
Name: python-gtk
|
|
|
|
%define _name pygtk
|
2009-04-27 19:51:59 +00:00
|
|
|
BuildRequires: fdupes libglade2-devel python-cairo-devel python-devel python-gobject2-devel
|
2010-08-08 16:57:53 +00:00
|
|
|
%if %suse_version <= 1130
|
2007-05-08 23:15:15 +00:00
|
|
|
BuildRequires: python-gobject2-doc
|
|
|
|
%endif
|
2010-08-07 10:45:59 +00:00
|
|
|
BuildRequires: python-numpy-devel
|
2009-04-27 19:51:59 +00:00
|
|
|
Requires: python-numpy
|
2010-01-21 10:02:33 +00:00
|
|
|
# Only for directory ownership:
|
2007-01-12 16:15:54 +00:00
|
|
|
BuildRequires: gtk-doc
|
2007-10-02 23:09:00 +00:00
|
|
|
Url: http://www.pygtk.org/
|
2007-01-12 16:15:54 +00:00
|
|
|
Summary: Python bindings for the GTK+ widget set
|
2011-05-04 13:30:01 +00:00
|
|
|
Version: 2.24.0
|
2010-08-08 13:40:28 +00:00
|
|
|
Release: 1
|
2010-01-15 12:14:37 +00:00
|
|
|
License: LGPLv2.1+
|
2007-01-12 16:15:54 +00:00
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Source: %{_name}-%{version}.tar.bz2
|
2011-02-09 18:15:42 +00:00
|
|
|
# conditionally use the new Capsule API instead of PyCObject, bnc#669802
|
|
|
|
Patch0: pygtk-2.22.0-capsule.patch
|
2007-01-12 16:15:54 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-02-09 18:15:42 +00:00
|
|
|
|
2011-05-04 14:03:11 +00:00
|
|
|
# for cross-distro compatibility:
|
|
|
|
Provides: pygtk2 = %{version}
|
|
|
|
|
2007-10-16 23:31:34 +00:00
|
|
|
%define lparen (
|
|
|
|
%define rparen )
|
2007-10-17 15:35:37 +00:00
|
|
|
%define python_gtk_req %(zgrep -a _required_version %{S:0} | sed -n 's/_required_version,[[:space:]]*/ >= /;s/%{rparen}$//;s/1.0.2%{rparen} dnl or 1.1.7/1.1.7/;s/\\%{lparen}glib\\|gtk\\|libglade\\|gobject\\%{rparen}/&2/;s/py\\%{lparen}.*\\%{rparen} /python-\\1 /;/gtk2unixprint/d;s/^m4_define%{lparen}//p' | tr '\\n' ' ')
|
2009-04-27 19:51:59 +00:00
|
|
|
Requires: %python_gtk_req
|
2007-01-12 16:15:54 +00:00
|
|
|
%{py_requires}
|
|
|
|
|
|
|
|
%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 of
|
|
|
|
python's benefits.
|
|
|
|
|
|
|
|
%package devel
|
2010-01-15 12:14:37 +00:00
|
|
|
License: LGPLv2.1+
|
2007-01-12 16:15:54 +00:00
|
|
|
Summary: Files needed to build wrappers for GTK+ addon libraries
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Requires: %{name} = %{version} python-gobject2-devel python-cairo-devel
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains files required to build wrappers for GTK+ addon
|
|
|
|
libraries so that they interoperate with pygtk.
|
|
|
|
|
|
|
|
%package doc
|
2010-01-15 12:14:37 +00:00
|
|
|
License: LGPLv2.1+
|
2007-01-12 16:15:54 +00:00
|
|
|
Summary: Python bindings for the GTK+ widget set
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Requires: %{name} = %{version}
|
2010-01-15 12:14:37 +00:00
|
|
|
%if 0%{?suse_version} >= 1120
|
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
2007-01-12 16:15:54 +00:00
|
|
|
|
|
|
|
%description doc
|
|
|
|
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 of
|
|
|
|
python's benefits.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{_name}-%{version}
|
2011-02-09 18:15:42 +00:00
|
|
|
%patch0 -p1
|
2007-01-12 16:15:54 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
%configure
|
|
|
|
make %{?jobs:-j%jobs}
|
|
|
|
|
|
|
|
%install
|
2010-01-21 10:02:33 +00:00
|
|
|
%makeinstall
|
2007-05-25 15:21:15 +00:00
|
|
|
find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -v
|
2008-04-08 22:46:18 +00:00
|
|
|
rm examples/Makefile*
|
2010-08-08 13:40:28 +00:00
|
|
|
# demo is already in devel package
|
|
|
|
rm -rf examples/pygtk-demo
|
2009-04-27 19:51:59 +00:00
|
|
|
chmod +x $RPM_BUILD_ROOT%{_libdir}/pygtk/2.0/{,*/}*.py
|
2007-10-16 23:31:34 +00:00
|
|
|
%fdupes $RPM_BUILD_ROOT%{_libdir}
|
|
|
|
%fdupes $RPM_BUILD_ROOT%{_datadir}
|
2007-01-12 16:15:54 +00:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2010-08-08 13:40:28 +00:00
|
|
|
%doc AUTHORS NEWS README MAPPING ChangeLog THREADS COPYING examples
|
|
|
|
%{py_sitedir}/gtk-2.0/gtk/
|
|
|
|
%{py_sitedir}/gtk-2.0/atk.so
|
|
|
|
%{py_sitedir}/gtk-2.0/gtkunixprint.so
|
|
|
|
%{py_sitedir}/gtk-2.0/pango*.so
|
2007-01-12 16:15:54 +00:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
2010-08-08 13:40:28 +00:00
|
|
|
%{_includedir}/%{_name}-2.0/%{_name}/
|
|
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
## codegen
|
2007-01-12 16:15:54 +00:00
|
|
|
%{_bindir}/%{_name}-codegen-2.0
|
2010-08-08 13:40:28 +00:00
|
|
|
# we explicitly list the directories here to be sure we don't include something
|
|
|
|
# that should live in the main package
|
|
|
|
%dir %{_datadir}/%{_name}
|
|
|
|
%dir %{_datadir}/%{_name}/2.0
|
|
|
|
%{_datadir}/%{_name}/2.0/defs/
|
|
|
|
## demo
|
2007-01-12 16:15:54 +00:00
|
|
|
%{_bindir}/%{_name}-demo
|
2010-08-08 13:40:28 +00:00
|
|
|
# we explicitly list the directories here to be sure we don't include something
|
|
|
|
# that should live in the main package
|
|
|
|
%dir %{_libdir}/%{_name}
|
|
|
|
%dir %{_libdir}/%{_name}/2.0
|
|
|
|
%{_libdir}/%{_name}/2.0/demos/
|
|
|
|
%{_libdir}/%{_name}/2.0/pygtk-demo.py*
|
2007-01-12 16:15:54 +00:00
|
|
|
|
|
|
|
%files doc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_datadir}/gtk-doc/html/*
|
2007-12-14 16:21:17 +00:00
|
|
|
|
2007-05-08 23:15:15 +00:00
|
|
|
%changelog
|