diff options
-rw-r--r-- | pcr/python2-amqplib/PKGBUILD | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/pcr/python2-amqplib/PKGBUILD b/pcr/python2-amqplib/PKGBUILD index ef0aa30bb..744787ab9 100644 --- a/pcr/python2-amqplib/PKGBUILD +++ b/pcr/python2-amqplib/PKGBUILD @@ -3,20 +3,22 @@ pkgname=python2-amqplib pkgver=1.0.2 -pkgrel=3 +pkgrel=4 pkgdesc="Python client for the Advanced Message Queuing Procotol (AMQP). Uses Python2." -arch=('any') -url="http://code.google.com/p/py-amqplib/" -license=("LGPL") -depends=('python2>=2.6' 'setuptools') +arch=(any) +url=http://code.google.com/p/py-amqplib/ +license=(LGPL) +depends=(python2-setuptools) source=(http://py-amqplib.googlecode.com/files/amqplib-$pkgver.tgz) +sha256sums=('843d69b681a60afd21fbf50f310404ec67fcdf9d13dfcf6e9d41f3b456217e5b') +sha512sums=('6c8c9fd7fd68fd6a1eb944962094e57f89525bc78dd002dc0dadd491b262293367a86569dfc52f0701723b4327b7c290150dc2e69e3ac1a28613578d9e0d0710') -build() { - cd $srcdir/amqplib-$pkgver - - # replace /usr/bin/env python with python2 - find . -name '*.py' -exec sed -i -e '1 s/python\s*$/python2/' {} \; - - python2 ./setup.py install --root=$pkgdir --prefix=/usr || return 1 +prepare() { + # replace /usr/bin/env python with python2 + find amqplib-$pkgver -name '*.py' -type f -exec sed -ri 's:^#!/usr/bin/(env )?python$:&2:' '{}' \; +} + +package() { + cd amqplib-$pkgver/ + python2 setup.py install --root="$pkgdir" --prefix=/usr } - |