forked from pool/python-pygame
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pygame?expand=0&rev=16
108 lines
3.5 KiB
RPMSpec
108 lines
3.5 KiB
RPMSpec
#
|
|
# spec file for package python-pygame
|
|
#
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
|
|
Name: python-pygame
|
|
Version: 1.9.1
|
|
Release: 5
|
|
Source: http://pygame.org/ftp/pygame-%{version}release.tar.gz
|
|
Source1: README.SUSE
|
|
Patch1: pygame-v4l-2.6.38.patch
|
|
Summary: A Python Module for Interfacing with the SDL Multimedia Library
|
|
License: LGPLv2.1+
|
|
Group: Development/Libraries/Python
|
|
Url: http://www.pygame.org/
|
|
Provides: pygame = %{version}
|
|
Obsoletes: pygame < %{version}
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: SDL_image-devel
|
|
BuildRequires: SDL_mixer-devel
|
|
BuildRequires: SDL_ttf-devel
|
|
BuildRequires: libjpeg-devel
|
|
BuildRequires: libpng-devel
|
|
BuildRequires: python-devel
|
|
BuildRequires: xorg-x11
|
|
%if 0%{?suse_version} > 1110
|
|
BuildRequires: python-numpy
|
|
%else
|
|
BuildRequires: python-numeric
|
|
%endif
|
|
%if 0%{?suse_version} >= 1210
|
|
BuildRequires: libv4l-devel >= 0.8.4
|
|
%endif
|
|
%{py_requires}
|
|
|
|
%description
|
|
Pygame is a Python wrapper module for the SDL multimedia library. It
|
|
contains Python functions and classes that allow you to use SDL's
|
|
support for playing CD-ROMs, audio and video output, and keyboard,
|
|
mouse and joystick input. Pygame also includes support for the
|
|
Numerical Python extension. Pygame is the successor to the pySDL
|
|
wrapper project, written by Mark Baker.
|
|
|
|
%package doc
|
|
License: LGPLv2.1+
|
|
Summary: Pygame documentation and example programs
|
|
Group: Development/Libraries/Python
|
|
Provides: pygame-doc
|
|
Obsoletes: pygame-doc
|
|
Requires: python-pygame = %{version}
|
|
|
|
%description doc
|
|
Pygame is a Python wrapper module for the SDL multimedia library. It
|
|
contains python functions and classes that will allow you to use SDL's
|
|
support for playing cdroms, audio and video output, and keyboard, mouse
|
|
and joystick input. pygame also includes support for the Numerical
|
|
Python extension. pygame is the successor to the pySDL wrapper project,
|
|
written by Mark Baker.
|
|
|
|
%prep
|
|
%setup -q -n pygame-%{version}release
|
|
%if 0%{?suse_version} >= 1210
|
|
%patch1
|
|
%endif
|
|
|
|
%build
|
|
export CFLAGS="$RPM_OPT_FLAGS -Wall -fno-strict-aliasing"
|
|
yes y | python -d config.py
|
|
python setup.py build
|
|
|
|
%install
|
|
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=INSTALLED_FILES
|
|
#install doc
|
|
install -d $RPM_BUILD_ROOT%{_docdir}/python-pygame
|
|
install -m 644 WHATSNEW README.txt %{SOURCE1} $RPM_BUILD_ROOT%{_docdir}/python-pygame
|
|
cp -r docs/ examples/ $RPM_BUILD_ROOT%{_docdir}/python-pygame
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%files -f INSTALLED_FILES
|
|
%defattr(644,root,root,755)
|
|
%doc %dir %{_docdir}/python-pygame
|
|
%doc %{_docdir}/python-pygame/WHATSNEW
|
|
%doc %{_docdir}/python-pygame/README.txt
|
|
%doc %{_docdir}/python-pygame/README.SUSE
|
|
|
|
%files doc
|
|
%defattr(644,root,root,755)
|
|
%doc %{_docdir}/python-pygame/docs
|
|
%doc %{_docdir}/python-pygame/examples
|
|
|
|
%changelog
|