blob: ad345468f6fe6ea3afff23626a5c2a5f030f575e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
_pkgname=flask-babelex
pkgname=python-flask-babelex
pkgver=0.9.4
pkgrel=9
pkgdesc='Adds i18n/l10n support to Flask applications'
url='https://github.com/mrjoes/flask-babelex'
arch=('any')
license=('BSD')
depends=('python' 'python-flask' 'python-babel' 'python-speaklater' 'python-jinja')
makedepends=('python-sphinx' 'python-setuptools')
checkdepends=('python-pytest')
source=(${pkgname}-${pkgver}.tar.gz::"https://github.com/mrjoes/flask-babelex/archive/${pkgver}.tar.gz"
"fix-sphinx.patch")
sha512sums=('e5591bcb83ca7e7644b1d06e604834369973bfba5050bd6890ad57125731981cda1e893544eea61cf69dca536e5473e2e50b08b36b0c3daee15d66f3815bd986'
'4f75872301e22ce2c27f822d676bb7b74f1d72c32134fe49c92faaea1f0645639f7e1f05711795a1c61d0a04acc79f91fbd7dfbfb17ff46c2f175d38c1c98e51')
prepare() {
cd ${_pkgname}-${pkgver}
# The returned time could contain \u202f instead of spaces
# https://bugs.chromium.org/p/chromium/issues/detail?id=1414292
# https://chromium.googlesource.com/chromium/src/+/4e30468e9b3563d7b45e7ade7a1256f69e6967d8
sed -e 's/April 2010 15:46/April 2010, 15:46/' \
-e 's/12.04.2010 15:46:00/12.04.2010, 15:46:00/' \
-e $'s/Apr 12, 2010, 1:46:00 PM/Apr 12, 2010, 1:46:00\u202fPM/' \
-e $'s/Apr 12, 2010, 3:46:00 PM/Apr 12, 2010, 3:46:00\u202fPM/' \
-e $'s/1:46:00 PM/1:46:00\u202fPM/' \
-e $'s/3:46:00 PM/3:46:00\u202fPM/' \
-i tests/tests.py
patch -Np1 -i ${srcdir}/fix-sphinx.patch
}
build() {
cd ${_pkgname}-${pkgver}
python setup.py build
sphinx-build -b text docs docs/_build/text
sphinx-build -b man docs docs/_build/man
}
check() {
cd ${_pkgname}-${pkgver}
py.test tests/tests.py
}
package() {
cd ${_pkgname}-${pkgver}
python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
install -Dm 644 README -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/flaskbabel.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1"
}
# vim: ts=2 sw=2 et:
|