desktop/python-beaker/PKGBUILD
2017-10-27 00:01:37 +02:00

46 lines
1.3 KiB
Bash

# Maintainer: Manuel "UtG" <utg[dot]chakra.linux[at]gmail[dot]com>
# Contributor: Neo Kolokotronis <tetris4@gmail.com>
pkgbase=python-beaker
pkgname=('python3-beaker' 'python2-beaker')
pkgver=1.8.1
pkgrel=1
arch=('x86_64')
license=('custom')
pkgdesc="Caching and sessions WSGI middleware for use with web applications and stand-alone Python scripts and applications."
url="http://beaker.groovie.org/"
makedepends=('python2-setuptools' 'python3-setuptools')
source=("git+https://github.com/bbangert/beaker.git#tag=$pkgver")
md5sums=('SKIP')
prepare() {
cp -a beaker{,-py2}
sed -i "s#/usr/bin/python#/usr/bin/python3#" beaker/beaker/crypto/pbkdf2.py
sed -i "s#/usr/bin/python#/usr/bin/python2#" beaker-py2/beaker/crypto/pbkdf2.py
}
build() {
cd "${srcdir}/beaker"
python3 setup.py build
cd "${srcdir}/beaker-py2"
python2 setup.py build
}
package_python3-beaker() {
depends=('python3')
cd "${srcdir}/beaker"
python3 setup.py install --root="${pkgdir}" --optimize=1
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/python-beaker/LICENSE"
}
package_python2-beaker() {
depends=('python2')
cd "${srcdir}/beaker-py2"
python2 setup.py install --root="${pkgdir}" --optimize=1
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/python2-beaker/LICENSE"
}