Date: Tuesday, December 18, 2018 @ 01:22:06 Author: anthraxx Revision: 416604
archrelease: copy trunk to community-any Added: python-flask-paranoid/repos/community-any/ python-flask-paranoid/repos/community-any/PKGBUILD (from rev 416603, python-flask-paranoid/trunk/PKGBUILD) ----------+ PKGBUILD | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) Copied: python-flask-paranoid/repos/community-any/PKGBUILD (from rev 416603, python-flask-paranoid/trunk/PKGBUILD) =================================================================== --- community-any/PKGBUILD (rev 0) +++ community-any/PKGBUILD 2018-12-18 01:22:06 UTC (rev 416604) @@ -0,0 +1,56 @@ +# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> + +_pkgname=flask-paranoid +pkgbase=python-flask-paranoid +pkgname=('python-flask-paranoid' 'python2-flask-paranoid') +pkgver=0.2 +pkgrel=1 +pkgdesc='Simple user session protection for Flask applications' +url='https://github.com/miguelgrinberg/flask-paranoid/' +arch=('any') +license=('MIT') +makedepends=('python-flask' 'python-sphinx' 'python-setuptools' + 'python2-flask' 'python2-sphinx' 'python2-setuptools') +checkdepends=('python-pytest' + 'python2-pytest') +source=(${pkgbase}-${pkgver}.tar.gz::https://github.com/miguelgrinberg/flask-paranoid/archive/v${pkgver}.tar.gz) +sha256sums=('cda72c43fd17e6b782e079942b79ec9b19ac40c06337c871cc1dfedbe49297d3') +sha512sums=('0d642999fa4d5b795c3dcecc586fc1600cdfceec4adb38bb87ca8be9825d9ddafabb07d98df573a89e61a44a0abd27cbbd21524237b0e23b337a7d5e32ddfdae') + +build() { + cd ${_pkgname}-${pkgver} + python setup.py build + sphinx-build -b text docs docs/_build/text + sphinx-build -b man docs docs/_build/man + python2 setup.py build + sphinx-build2 -b text docs docs/_build-py2/text + sphinx-build2 -b man docs docs/_build-py2/man +} + +check() { + cd ${_pkgname}-${pkgver} + python setup.py test + python2 setup.py test +} + +package_python-flask-paranoid() { + depends=('python' 'python-flask') + cd ${_pkgname}-${pkgver} + python setup.py install --root="${pkgdir}" --optimize=1 --skip-build + install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}" + install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" + install -Dm 644 docs/_build/text/*.txt -t "${pkgdir}/usr/share/doc/${pkgname}" + install -Dm 644 docs/_build/man/flask-paranoid.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1" +} + +package_python2-flask-paranoid() { + depends=('python2' 'python2-flask') + cd ${_pkgname}-${pkgver} + python2 setup.py install --root="${pkgdir}" --optimize=1 --skip-build + install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}" + install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" + install -Dm 644 docs/_build-py2/text/*.txt -t "${pkgdir}/usr/share/doc/${pkgname}" + install -Dm 644 docs/_build-py2/man/flask-paranoid.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1" +} + +# vim: ts=2 sw=2 et: