forked from pool/python-pygame
- Clean up SPEC, avoid warnings.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygame?expand=0&rev=21
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 3 14:42:31 UTC 2018 - Matěj Cepl <mcepl@suse.com>
|
||||
|
||||
- Clean up SPEC, avoid warnings.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 7 15:32:41 UTC 2018 - toddrme2178@gmail.com
|
||||
|
||||
|
@@ -16,32 +16,23 @@
|
||||
#
|
||||
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-pygame
|
||||
Version: 1.9.4
|
||||
Release: 0
|
||||
Source0: https://files.pythonhosted.org/packages/source/P/Pygame/pygame-%{version}.tar.gz
|
||||
Summary: A Python Module for Interfacing with the SDL Multimedia Library
|
||||
License: LGPL-2.1+
|
||||
License: LGPL-2.1-or-later
|
||||
Group: Development/Libraries/Python
|
||||
Url: https://github.com/pygame/pygame
|
||||
URL: https://github.com/pygame/pygame
|
||||
Source0: https://files.pythonhosted.org/packages/source/p/pygame/pygame-%{version}.tar.gz
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module numpy}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: config(fluid-soundfont-gm)
|
||||
BuildRequires: pkgconfig(SDL_image)
|
||||
BuildRequires: pkgconfig(SDL_mixer)
|
||||
BuildRequires: pkgconfig(SDL_ttf)
|
||||
BuildRequires: pkgconfig(freetype2)
|
||||
BuildRequires: pkgconfig(libjpeg)
|
||||
BuildRequires: pkgconfig(libpng)
|
||||
BuildRequires: pkgconfig(sdl)
|
||||
BuildRequires: pkgconfig(x11)
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: fontconfig
|
||||
BuildRequires: libtiff-devel
|
||||
BuildRequires: libv4l-devel >= 0.8.4
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: portmidi-devel
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: xorg-x11
|
||||
@@ -51,13 +42,21 @@ BuildRequires: xorg-x11-fonts-100dpi
|
||||
BuildRequires: xorg-x11-fonts-75dpi
|
||||
BuildRequires: xorg-x11-fonts-core
|
||||
BuildRequires: xorg-x11-fonts-cyrillic
|
||||
BuildRequires: config(fluid-soundfont-gm)
|
||||
BuildRequires: pkgconfig(SDL_image)
|
||||
BuildRequires: pkgconfig(SDL_mixer)
|
||||
BuildRequires: pkgconfig(SDL_ttf)
|
||||
BuildRequires: pkgconfig(freetype2)
|
||||
BuildRequires: pkgconfig(libjpeg)
|
||||
BuildRequires: pkgconfig(libpng)
|
||||
BuildRequires: pkgconfig(sdl)
|
||||
BuildRequires: pkgconfig(x11)
|
||||
Requires: fontconfig
|
||||
Requires: python-numpy
|
||||
%ifpython2
|
||||
Provides: pygame = %{version}
|
||||
Obsoletes: pygame < %{version}
|
||||
%endif
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@@ -91,11 +90,9 @@ This package contains documentation and example programs for Pygame.
|
||||
sed -i 's/\r$//' docs/reST/ref/code_examples/draw_module_example.py
|
||||
sed -i 's/\r$//' docs/reST/ref/code_examples/joystick_calls.py
|
||||
# Fix wrong-script-interpreter
|
||||
find examples -name '*.py' -exec sed -i "s|^#!/usr/bin/env python$|#!%{__python3}|" {} \;
|
||||
find examples -name '*.py' -exec sed -i "s|^#! /usr/bin/env python$|#!%{__python3}|" {} \;
|
||||
find examples -name '*.py' -exec sed -i "s|^#!%{_bindir}/env python$|#!%{_bindir}/python3|" {} \;
|
||||
find examples -name '*.py' -exec sed -i "s|^#! %{_bindir}/env python$|#!%{_bindir}/python3|" {} \;
|
||||
chmod a+x examples/*.py
|
||||
%fdupes docs
|
||||
%fdupes examples
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
@@ -105,7 +102,7 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
%python_install
|
||||
%{python_expand pushd %{buildroot}%{$python_sitearch}
|
||||
sed -i "s|^#!/usr/bin/env python$|#!%{__python3}|" pygame/tests/test_utils/png.py
|
||||
sed -i "s|^#!%{_bindir}/env python$|#!%{_bindir}/python3|" pygame/tests/test_utils/png.py
|
||||
chmod a+x pygame/tests/test_utils/png.py
|
||||
chmod a+x pygame/examples/macosx/aliens_app_example/aliens.py
|
||||
chmod a+x pygame/examples/*.py
|
||||
@@ -114,9 +111,11 @@ chmod a-x pygame/examples/prevent_display_stretching.py
|
||||
chmod a-x pygame/examples/freetype_misc.py
|
||||
$python -m compileall -d %{$python_sitearch} pygame/tests/test_utils/
|
||||
$python -O -m compileall -d %{$python_sitearch} pygame/tests/test_utils/
|
||||
%fdupes .
|
||||
%fdupes %{buildroot}%{$python_sitearch}
|
||||
popd
|
||||
}
|
||||
%fdupes docs
|
||||
%fdupes examples
|
||||
|
||||
%check
|
||||
export SDL_VIDEODRIVER=dummy
|
||||
|
Reference in New Issue
Block a user