Blob Blame History Raw
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

Name:           pybox2d
Version:        2.0.2b2
Release:        12%{?dist}
Summary:        A 2D rigid body simulation library for Python

Group:          Development/Libraries
License:        zlib
URL:            http://code.google.com/p/pybox2d/
Source0:        http://pybox2d.googlecode.com/files/pybox2d-2.0.2b2.zip

BuildRequires:  gcc
BuildRequires:  python-devel
BuildRequires:  python-setuptools
BuildRequires:  swig

%description
Programmer's can use Box2D in their games to make objects move in
believable ways and make the world seem more interactive. From the
game's point of view a physics engine is just a system for procedural
animation. Rather than paying (or begging) an animator to move your
actors around, you can let Sir Isaac Newton do the directing.


%prep
%setup -q -n Box2D-%{version}

# calm rpmlint down
sed -i LICENSE README -e 's/\r//'

%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build


%install
%{__python} setup.py install -O1 --skip-build --root %{buildroot}

# copy missing files
cp Box2D.py %{buildroot}%{python_sitearch}/Box2D/

# calm rpmlint down
sed -i %{buildroot}%{python_sitearch}/Box2D/__init__.py -e 1d
sed -i %{buildroot}%{python_sitearch}/Box2D/__init__.py -e 's/\r//'

 
%files
%defattr(-,root,root,-)
%doc LICENSE README doc/*
%{python_sitearch}/*


%changelog
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2b2-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2b2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2b2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2b2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2b2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2b2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Sun Nov 20 2011 Peter Robinson <pbrobinson@fedoraproject.org> - 2.0.2b2-6
- update to zip file

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-5.20100110svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 2.0.2-4.20100110svn
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Mon Jan 11 2009 Sebastian Dziallas <sebastian@when.com> - 2.0.2-3.20100110svn
- implement comments from the review

* Sun Jan 10 2009 Sebastian Dziallas <sebastian@when.com> - 2.0.2-2.20100110svn
- add setuptools build dependency
- make sure to include box2d.py

* Sun Jan 10 2009 Sebastian Dziallas <sebastian@when.com> - 2.0.2-1.20100110svn
- initial packaging