From: Elan Ruusamäe Date: Wed, 21 May 2014 21:56:50 +0000 (+0300) Subject: new, version 0.0.0 at svn rev24 X-Git-Tag: auto/th/python-enet-0.0.0-0.svn24.1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=fb56e9924a7bce828e8d47a4319712382ba8be39;p=packages%2Fpython-enet.git new, version 0.0.0 at svn rev24 based on src.rpm from openSuSE repos http://download.opensuse.org/repositories/games/openSUSE_13.1/src/python-enet-0.0.0+svn24-7.1.src.rpm --- fb56e9924a7bce828e8d47a4319712382ba8be39 diff --git a/pyenet-build-against-system-enet.patch b/pyenet-build-against-system-enet.patch new file mode 100644 index 0000000..c02d7f5 --- /dev/null +++ b/pyenet-build-against-system-enet.patch @@ -0,0 +1,39 @@ +Description: Make python-enet build against system libenet 0.0~svn21-1 +Origin: debian +Forwarded: no +Last-Update: 2011-05-01 + +--- python-enet-0.0~svn21.orig/setup.py ++++ python-enet-0.0~svn21/setup.py +@@ -31,22 +31,22 @@ import sys + + source_files = ["enet.pyx"] + +-_enet_files = glob.glob("enet/*.c") ++# _enet_files = glob.glob("enet/*.c") + +-if not _enet_files: +- print("You need to download and extract the enet 1.3 source to enet/") +- print("Download the source from: http://enet.bespin.org/SourceDistro.html") +- print("See the README for more instructions") +- sys.exit(1) +- +-source_files.extend(_enet_files) ++# if not _enet_files: ++# print("You need to download and extract the enet 1.3 source to enet/") ++# print("Download the source from: http://enet.bespin.org/SourceDistro.html") ++# print("See the README for more instructions") ++# sys.exit(1) ++# ++# source_files.extend(_enet_files) + + define_macros = [('HAS_POLL', None), + ('HAS_FCNTL', None), + ('HAS_MSGHDR_FLAGS', None), + ('HAS_SOCKLEN_T', None) ] + +-libraries = [] ++libraries = ['enet'] + + if sys.platform == 'win32': + define_macros.extend([('WIN32', None)]) diff --git a/python-enet.spec b/python-enet.spec new file mode 100644 index 0000000..377a9a3 --- /dev/null +++ b/python-enet.spec @@ -0,0 +1,50 @@ +# No releases, source only available through svn. +# svn co http://pyenet.googlecode.com/svn/trunk/ pyenet-trunk-svn24 +%define module pyenet +%define svnrev svn24 +%define rel 1 +Summary: Python bindings for ENet +Name: python-enet +Version: 0.0.0 +Release: 0.%{svnrev}.%{rel} +License: MIT +Group: Libraries/Python +URL: http://code.google.com/p/pyenet +Source0: %{module}-trunk-%{svnrev}.tar.bz2 +# Source0-md5: 1fa3e0ff41974fee2defc88d03a1c293 +Patch0: pyenet-build-against-system-enet.patch +BuildRequires: enet-devel >= 1.3.3 +BuildRequires: python-Cython >= 0.13 +BuildRequires: python-devel +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +Pyenet was written originally by Scott Robinson . + +It's currently maintained by Andrew Resch and +provides the Python bindings for ENet. + +%prep +%setup -q -n %{module}-trunk-%{svnrev} +%patch0 -p1 + +%build +CC="%{__cc}" \ +CFLAGS="%{rpmcflags}" \ +%{__python} setup.py build + +%install +rm -rf $RPM_BUILD_ROOT +%{__python} setup.py install \ + --skip-build \ + --optimize=2 \ + --root=$RPM_BUILD_ROOT + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(644,root,root,755) +%doc LICENSE README ChangeLog +%attr(755,root,root) %{py_sitedir}/enet.so +%{py_sitedir}/enet-%{version}-py*.egg-info