summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fab47f24abf9502179f918fd2a78663b0e462dac (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
# Maintainer: AndrĂ¡s Wacha <awacha@gmail.com>
pkgname=python-xhtml2pdf
_name=${pkgname#python-}
pkgver=0.2.2
pkgrel=1
pkgdesc="A library for converting HTML into PDFs using ReportLab"
arch=(any)
url="https://github.com/xhtml2pdf/xhtml2pdf"
license=('Apache')
makedepends=( python-setuptools 
              python-sphinx 
		python-sphinx_rtd_theme
              python-nose 
	      texlive-core
	      texlive-bin
)
depends=( python-reportlab
	python-pillow
	python-html5lib
	python-httplib2
	python-coverage
	python-pypdf2
	python-six
)
source=("https://github.com/${_name}/${_name}/archive/${pkgver}.tar.gz"  )
sha256sums=('3a1e04941adaae1fb44ba51b7f9769fea55ef13ba01acd6fd5666c18d6bf25cf')

build() {
	cd ${_name}-${pkgver}
	python setup.py build
        (cd doc && make html)
	(cd doc && make latexpdf)
}

check() {
	cd ${_name}-${pkgver}
	python setup.py test
}

package() {
	cd ${_name}-${pkgver}
	python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
	mkdir -p ${pkgdir}/usr/share/doc/${pkgname}
	cp ${srcdir}/${_name}-${pkgver}/doc/build/html ${pkgdir}/usr/share/doc/${pkgname} -R
	cp ${srcdir}/${_name}-${pkgver}/doc/build/latex/${_name}.pdf ${pkgdir}/usr/share/doc/${_name}.pdf
}