summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Alff2020-08-03 22:53:52 -0400
committerTed Alff2020-08-03 22:53:52 -0400
commitfd1b66e46a675daaefbf8264fd086af5fa329b03 (patch)
treeaa254bc9af80b94dcc497d0c6025a2ff9dfd386f
downloadaur-fd1b66e46a675daaefbf8264fd086af5fa329b03.tar.gz
Import to AUR
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD36
2 files changed, 57 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..200fc445503
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = python2-pygame
+ pkgdesc = Python game library
+ pkgver = 1.9.6
+ pkgrel = 1
+ url = http://www.pygame.org/
+ arch = x86_64
+ arch = i686
+ arch = armv7h
+ arch = aarch64
+ license = LGPL
+ makedepends = python2-setuptools
+ depends = sdl_mixer
+ depends = sdl_ttf
+ depends = sdl_image
+ depends = python2
+ depends = portmidi
+ source = https://pypi.io/packages/source/p/pygame/pygame-1.9.6.tar.gz
+ sha256sums = 301c6428c0880ecd4a9e3951b80e539c33863b6ff356a443db1758de4f297957
+
+pkgname = python2-pygame
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..f263d3eefbe
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: twa022 <twa022 at gmail dot com>
+
+pkgname=python2-pygame
+pkgver=1.9.6
+pkgrel=1
+pkgdesc="Python game library"
+arch=('x86_64' 'i686' 'armv7h' 'aarch64')
+url="http://www.pygame.org/"
+license=('LGPL')
+depends=('sdl_mixer' 'sdl_ttf' 'sdl_image' 'python2' 'portmidi')
+makedepends=('python2-setuptools')
+source=(https://pypi.io/packages/source/p/pygame/pygame-$pkgver.tar.gz)
+sha256sums=('301c6428c0880ecd4a9e3951b80e539c33863b6ff356a443db1758de4f297957')
+
+prepare() {
+ cd pygame-${pkgver}
+ # don't ship python2 *and* python3 compiled bytecode from upstream
+ find . -name "*.pyc" -delete
+ find . -type f -exec sed -i 's#/usr/bin/env python#/usr/bin/env python2#' {} +
+}
+
+build() {
+ cd pygame-${pkgver}
+ python2 setup.py build
+}
+
+package_python2-pygame() {
+ cd pygame-${pkgver}
+ python2 setup.py install --root="${pkgdir}" --prefix=/usr
+
+# Copying the examples
+ cp -R examples "${pkgdir}/usr/lib/python2.7/site-packages/pygame"
+
+# Fixing permissions
+ chmod 644 "${pkgdir}"/usr/include/python2.7/pygame/*
+}