%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: python-pgu Version: 0.12.3 Release: 3%{?dist} Summary: A collection of useful modules for writing games with PyGame Group: Development/Languages License: LGPLv2+ URL: http://code.google.com/p/pgu/ Source0: http://pgu.googlecode.com/files/pgu-%{version}.zip BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel Requires: pygame Requires: bitstream-vera-sans-fonts %description PGU is a collection of useful modules for writing games with PyGame. At the moment the project consists of: - Tools for editing tile-based levels - A module for creating GUIs - A set of general-purpose game libraries %prep %setup -q -n pgu-%{version} %build %{__python} setup.py build cd docs/ && %{__python} build.py %install rm -rf %{buildroot} %{__python} setup.py install -O1 --skip-build --root %{buildroot} # remove these examples programs. rm -f %{buildroot}%{_bindir}/* # put them in a directory that will be included in doc chmod 644 build/scripts-2.6/* mv build/scripts-2.6/* examples # replace the Vera.ttf files by a symlink to the file provided by the # bitstream-vera-sans-fonts rpm find %{buildroot}%{_datadir}/pgu -name Vera.ttf -exec ln -sf %{_datadir}/fonts/bitstream-vera/Vera.ttf '{}' \; %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc GUIDE.txt LICENSE.txt README.txt TODO.txt CHANGES.txt BUGS.txt %doc docs/*.html # some examples %doc examples # python files %{python_sitelib}/* # data files %{_datadir}/pgu %changelog * Sun Jan 31 2010 Le Coz Florent - 0.12.3-3 - Fix license tag, add macro, use system-wide fonts and remove useless doc * Tue Dec 17 2009 Le Coz Florent - 0.12.3-2 - add examples in documentation * Mon Dec 14 2009 Le Coz Florent - 0.12.3-1 - First version