summaryrefslogtreecommitdiff
path: root/community/python-reportlab/PKGBUILD
blob: 7b4873f45c0b1ad23f3766233262266cb2c11c3b (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
# $Id: PKGBUILD 97429 2013-09-19 20:25:51Z jelle $
# Maintainer:
# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
# Contributor: William Rea <sillywilly@gmail.com>

pkgbase=python-reportlab
pkgname=python2-reportlab
_origname=reportlab
pkgver=2.7
pkgrel=1
pkgdesc="A proven industry-strength PDF generating solution"
arch=('i686' 'x86_64')
url="http://www.reportlab.org/rl_toolkit.html"
depends=('python2' 'freetype2')
conflicts=('python-reportlab<=2.5-2')
replaces=('python-reportlab<=2.5-2')
license=('CUSTOM')
source=(http://www.reportlab.com/ftp/reportlab-$pkgver.tar.gz)
md5sums=('78300e6fe8a0d020fc16734a3de80cc4')

build() {
    cd $srcdir/${_origname}-$pkgver

    # python2 fix
    for file in src/reportlab/graphics/widgets/table.py src/reportlab/lib/normalDate.py \
                src/reportlab/pdfgen/pycanvas.py; do
        sed -i 's_#!.*/usr/bin/env python_#!/usr/bin/env python2_' $file
    done
}

package_python2-reportlab() {
    cd $srcdir/${_origname}-$pkgver
    python2 setup.py install --root=$pkgdir --optimize=1
    install -D -m644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/license.txt
}

check() {
    cd ${srcdir}/${_origname}-${pkgver}
#    python2 setup.py tests
}