summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f3a49a9f56954d71340e3d8895fe553b4d4b5b2e (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
# Contributor: Joermungand <joermungand at gmail dot com>
# Maintainer: Joermungand <joermungand at gmail dot com>

pkgname=python2-reportlab
pkgver=3.5.34
pkgrel=1
pkgdesc="A proven industry-strength PDF generating solution"
url="http://www.reportlab.com/"
depends=('freetype2' 'python2-pip' 'python2-pillow' )
makedepends=('python2-distribute' )
license=('BSD')
arch=('x86_64')
source=('https://files.pythonhosted.org/packages/0f/0b/bce8f4a6641c30889fd82b50665f0f7521d633bfd3360af2c11b8b2200af/reportlab-3.5.34.tar.gz')
md5sums=('77d37a7f9f785b3666206de0fbc44aab')

build() {
    cd $srcdir/${pkgname#*-}-$pkgver
    python2 setup.py build
}

package() {
    cd $srcdir/${pkgname#*-}-$pkgver
	for file in src/reportlab/lib/units.py src/reportlab/lib/normalDate.py src/reportlab/lib/logger.py \
	src/reportlab/graphics/testdrawings.py src/reportlab/lib/fonts.py src/reportlab/lib/pagesizes.py \
	src/reportlab/graphics/testshapes.py src/reportlab/lib/randomtext.py src/reportlab/lib/__init__.py \
	src/reportlab/lib/formatters.py src/reportlab/graphics/widgets/table.py src/reportlab/lib/corp.py \
	src/reportlab/graphics/barcode/test.py; do
	sed -i 's/#!\/usr\/bin\/env python/#!\/usr\/bin\/env python2/' $file;
	sed -i 's/#!\/bin\/env python/#!\/bin\/env python2/' $file;
	sed -i 's/#!\/usr\/pkg\/bin\/python/#!\/usr\/pkg\/bin\/python2/' $file;
	done
    python2 setup.py install --root="$pkgdir" --optimize=1
    install -D -m644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/license.txt
}