Files
MSYS2-packages/python-beaker/PKGBUILD
Christoph Reiter a58271b395 Make pkgbase of all packages match the name of the PKGBUILD directory
Similar to https://github.com/Alexpux/MINGW-packages/pull/2878
this adjusts the pkgbase names of all packages to match the directory
name the PKGBUILD is in.

The motivation for this is to provide links to PKGBUILD sources and
git history from the web interface.

The "dwz" directory is deleted as it just contains an older copy of the
elfutils PKGBUILD (elfutils isn't in the repo)
2018-01-28 08:43:40 +01:00

49 lines
1.5 KiB
Bash

# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=beaker
pkgbase="python-${_realname}"
pkgname=("python3-${_realname}" "python2-${_realname}")
pkgver=1.9.0
pkgrel=1
pkgdesc="Caching and sessions WSGI middleware for use with web applications and stand-alone Python scripts and applications"
arch=('i686' 'x86_64')
license=('PSF')
url="http://beaker.groovie.org/"
depends=("python2-setuptools" "python3-setuptools")
source=("${_realname}-${pkgver}.tar.gz"::https://github.com/bbangert/beaker/archive/${pkgver}.tar.gz)
sha256sums=('ac8828ea391b463b0f6b844a04648ea8172fd6e9938fe6a7bea412cc6795d5c8')
prepare() {
cd "${srcdir}"
cp -a ${_realname}-${pkgver}{,-python2}
}
build() {
# Build python 3 module
cd "${srcdir}"/${_realname}-${pkgver}
sed -i "s#/usr/bin/python#/usr/bin/python3#" beaker/crypto/pbkdf2.py
python3 setup.py build
# Build python 2 module
cd ../${_realname}-${pkgver}-python2
sed -i "s#/usr/bin/python#/usr/bin/python2#" beaker/crypto/pbkdf2.py
python2 setup.py build
}
package_python3-beaker() {
depends=('python>=3.3')
cd "${srcdir}/${_realname}-${pkgver}"
python3 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/python3-beaker/LICENSE"
}
package_python2-beaker() {
depends=('python2>=2.7')
cd "${srcdir}/${_realname}-${pkgver}-python2"
python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/python2-beaker/LICENSE"
}