archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / python-pyotp / trunk / PKGBUILD
blobd66f40881cb326fb4073d2163cc16b3cc8653bac
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: ELmoussaoui Bilal <bil.elmoussaoui@gmail.com>
4 pkgname=python-pyotp
5 _pkgname=pyotp
6 _gitcommit=a50b2701e1ecaaafc62b90a7424f602ce8edfceb
7 pkgver=2.6.0
8 pkgrel=5
9 pkgdesc='Python library for generating and verifying one-time passwords'
10 url='https://pyotp.readthedocs.io/'
11 arch=('any')
12 license=('MIT')
13 depends=('python')
14 makedepends=('git' 'python-setuptools' 'python-sphinx' 'python-guzzle-sphinx-theme')
15 options=('!makeflags')
16 source=("git+https://github.com/pyotp/pyotp#commit=${_gitcommit}?signed")
17 sha512sums=('SKIP')
18 validpgpkeys=('29BCBADB4ECAAAC2382699388AFAFCD242818A52') # Andrey Kislyuk <kislyuk@gmail.com>
20 pkgver() {
21   cd ${_pkgname}
22   git describe --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
25 build() {
26   cd ${_pkgname}
27   python setup.py build
28   sphinx-build -b text docs docs/_build/text
29   sphinx-build -b man docs docs/_build/man
32 check() {
33   cd ${_pkgname}
34   python setup.py test
37 package() {
38   cd ${_pkgname}
39   python setup.py install --root="${pkgdir}" -O1 --skip-build
40   install -Dm 644 README.rst ./docs/_build/text/*.txt -t "${pkgdir}/usr/share/doc/${pkgname}"
41   install -Dm 644 ./docs/_build/man/${_pkgname}.1 -t "${pkgdir}/usr/share/man/man1"
42   ln -s /usr/share/man/man1/${_pkgname}.1.gz "${pkgdir}/usr/share/man/man1/${pkgname}.1.gz"
43   install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
46 # vim: ts=2 sw=2 et: