summaryrefslogtreecommitdiff
path: root/community/python-reportlab/PKGBUILD
blob: 6e44f03d66a0e93c40bc353df610a4436daff0a0 (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
# $Id: PKGBUILD 78251 2012-10-17 10:27:06Z allan $
# 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.6
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.org/ftp/${_origname}-$pkgver.tar.gz)
md5sums=('e5d27a24a2c8456b168913242aa1940f')

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
}