archrelease: copy trunk to community-any
[ArchLinux/community.git] / seqdiag / trunk / PKGBUILD
blob45990bd23ba44d8824c11f64704a890c49dd4048
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: David Runge <dvzrv@archlinux.org>
4 pkgname=seqdiag
5 pkgver=3.0.0
6 pkgrel=2
7 pkgdesc="Sequence-diagram images from .diag files"
8 arch=('any')
9 url="https://blockdiag.com/en/seqdiag/index.html"
10 license=('Apache')
11 depends=('blockdiag')
12 checkdepends=('python-docutils' 'python-nose' 'python-pycodestyle' 'python-reportlab')
13 optdepends=('python-reportlab: for PDF export'
14             'python-docutils: for RST parser')
15 source=(
16   "$pkgname-$pkgver.tar.gz::https://github.com/blockdiag/seqdiag/archive/$pkgver.tar.gz"
17   "${pkgname}-2.0.0-remove_broken_test.patch"
19 sha512sums=('f2f70ed86a970d0e949092b1c49681073526daa8c06cf7ec6b09042f5194b9549924911751a5b83695f6179759eb5ffb3a40962ef379a69aeaa7d43ae84b0287'
20             'de01e48df2ffbe3af30e810d74550e70bd176db6a2becfb61e44f67e2808662a10eb1348aed140b7dec10e56b3c8b17cc000184c7d9ea9203653ab9f52273710')
21 b2sums=('e633cfb895a1c7a753513acdda14f3cd460ea6a9cd41d245667322b6cfa482aff57ab7e9272724f776060c88c9dcf583095164cd084c35d32ed393c4ac0a3ad5'
22         '4bcb3227ea42fc0b4951ad8605f14949e13eec697f89687b0b98c844a2260eabb3dac74c0d33d0bc4984705fd9b5aea771f729845e4adaa47b35efbbb328bf34')
24 prepare() {
25   cd seqdiag-$pkgver
26   # remove a broken test, that fails due to wrong font:
27   # https://github.com/blockdiag/seqdiag/issues/51
28   patch -Np1 -i ../"${pkgname}-2.0.0-remove_broken_test.patch"
31 build() {
32   cd seqdiag-$pkgver
33   python setup.py build
36 check() {
37   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
38   cd seqdiag-$pkgver
39   python setup.py install --root="$PWD/tmp_install" --optimize=1
40   PYTHONPATH="$PWD/tmp_install/${site_packages}" nosetests -v
43 package() {
44   cd seqdiag-$pkgver
45   python setup.py install --root="$pkgdir" --optimize=1
46   install -vDm 644 {CHANGES,README}.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
47   install -vDm 644 "${pkgname}.1" -t "${pkgdir}/usr/share/man/man1/"