summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dcef7a8e10f41639a45b148508528490844c32f9 (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
# Maintainer: Frederic Van Assche <frederic at fredericva.com>
# Contributor: Eugene Dvoretsky <radioxoma at gmail dot com>

pkgname=python-pylibtiff-git
pkgver=r218.51d6f2a
pkgrel=1
pkgdesc="A python wrapper of the C libtiff library"
arch=('i686' 'x86_64')
url="https://github.com/pearu/pylibtiff"
license=('BSD')
depends=('python-numpy' 'libtiff')
makedepends=('python-setuptools' 'git')
provides=('python-libtiff' 'python-pylibtiff')
replaces=('python-libtiff-svn')
source=("${pkgname%-git}::git+https://github.com/pearu/pylibtiff.git")
sha256sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname%-git}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd $srcdir/python-pylibtiff
	python setup.py build

	# Don't care about "ImportError: No module named tif_lzw"
	python -c "from libtiff import TIFF" || true
}

package() {
	cd $srcdir/python-pylibtiff
	python setup.py install --root="$pkgdir" --optimize=1
}