[arch-commits] Commit in pyglet/trunk (PKGBUILD)

Kyle Keen kkeen at archlinux.org
Thu Feb 19 00:53:41 UTC 2015


    Date: Thursday, February 19, 2015 @ 01:53:40
  Author: kkeen
Revision: 127967

upgpkg: pyglet 1.2.0-1

Modified:
  pyglet/trunk/PKGBUILD

----------+
 PKGBUILD |   48 +++++++++++++++++++++++++++++++++++-------------
 1 file changed, 35 insertions(+), 13 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-02-19 00:35:56 UTC (rev 127966)
+++ PKGBUILD	2015-02-19 00:53:40 UTC (rev 127967)
@@ -5,29 +5,51 @@
 # Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
 
 pkgbase=pyglet
-pkgname=('python2-pyglet')
-pkgver=1.1.4
-pkgrel=2
+pkgname=('python-pyglet' 'python2-pyglet')
+pkgver=1.2.0
+pkgrel=1
 pkgdesc="A cross-platform windowing and multimedia library for Python"
 arch=('any')
 url="http://pyglet.org/"
 license=('BSD')
-depends=('python2')
+makedepends=('python' 'python2' 'python-setuptools' 'python2-setuptools')
 optdepends=('avbin: provides audio&video support')
-conflicts=('pyglet')
-provides=('pyglet')
-replaces=('pyglet')
-source=(http://pyglet.googlecode.com/files/${pkgbase}-${pkgver}.tar.gz)
-md5sums=('b2363642dc3832e95dc4e63a6793467f')
+source=("https://pypi.python.org/packages/source/p/pyglet/pyglet-$pkgver.tar.gz")
+md5sums=('db1e2ca6a68c8b7dca2937906afc5763')
 
+prepare() {
+	cd "$srcdir"
+	cp -r "$srcdir/$pkgbase-$pkgver" "$srcdir/${pkgbase}2-$pkgver"
+}
+
 build() { 
-	cd ${srcdir}/${pkgbase}-${pkgver}
+	cd "$srcdir/${pkgbase}2-$pkgver"
 	python2 setup.py build
+
+	cd "$srcdir/$pkgbase-$pkgver"
+	python3 setup.py build
 }
 
 package_python2-pyglet() {
-	cd ${srcdir}/${pkgbase}-${pkgver}
-	python2 setup.py install --root=${pkgdir} --optimize=0
+	depends=('python2')
+	conflicts=('pyglet')
+	provides=('pyglet')
+	replaces=('pyglet')
+	cd "$srcdir/${pkgbase}2-$pkgver"
+	find ./ -type f -name '*.py' | xargs -n 1 sed -i 's|/usr/bin/env python$|/usr/bin/env python2|'
+	find ./ -type f -name '*.py' | xargs -n 1 sed -i 's|/usr/bin/python|/usr/bin/env python2|'
+	python2 setup.py install --root="$pkgdir" --optimize=0
         find "$pkgdir/" -name '*.pyc' -delete
-	install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+	install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }
+
+package_python-pyglet() {
+	depends=('python')
+	cd "$srcdir/$pkgbase-$pkgver"
+	python3 setup.py install --root="$pkgdir" --optimize=0
+        find "$pkgdir/" -name '*.pyc' -delete
+	find "$pkgdir/" -type d -empty -delete
+	install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+



More information about the arch-commits mailing list