summaryrefslogtreecommitdiff
path: root/user/py3-pillow/APKBUILD
blob: efc2a7b64a9795b7518dfdde308e5df9f7484bf8 (plain) (blame)
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
47
48
49
50
51
52
53
54
# Contributor: Max Rees <maxcrees@me.com>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=py3-pillow
_pkgname=Pillow
_p="${_pkgname#?}"
_p="${_pkgname%"$_p"}"
pkgver=6.2.0
pkgrel=0
pkgdesc="A Python Imaging Library"
url="https://pypi.org/project/Pillow"
arch="all"
# Certified net clean
license="Custom"
depends="py3-olefile python3"
makedepends="python3-dev freetype-dev libjpeg-turbo-dev libwebp-dev
	tiff-dev libpng-dev lcms2-dev openjpeg-dev zlib-dev"
subpackages="$pkgname-doc"
_scripts_rev="b24479c"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/P/$_pkgname/$_pkgname-$pkgver.tar.gz
	https://dev.sick.bike/dist/$pkgname-scripts-$_scripts_rev.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

unpack() {
	default_unpack
	mv pillow-scripts-*/Scripts "$builddir/Scripts"
}

build() {
	# zlib resides in lib
	export CFLAGS="$CFLAGS -L/lib"
	python3 setup.py build
}

check() {
	PYTHONPATH="$(find 'build' -name 'lib.*')" python3 selftest.py
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

doc() {
	pkgdesc="Example scripts for $pkgname"
	depends="$pkgname"

	cd "$builddir"
	local destdir="$subpkgdir/usr/share/doc/$pkgname"
	install -d "$destdir"/Scripts
	install -m 644 Scripts/* "$destdir"/Scripts/
	install -Dm644 LICENSE "$subpkgdir/usr/share/licenses/$pkgname/LICENSE"
}

sha512sums="6eeb51d764c85a9b1f4eb0a59bbff41541852d5e2988c0e32b03acb56010b7d398f5761daaa56731bde278e52a551b44fab5b662988e096e8fd53e5d15d4e083  py3-pillow-6.2.0.tar.gz
c01e83a7cef6653a33f60acbcbc737f0d40ff0dbc792ce0b2ce52f21092d3071845830fa0f64b27a1c5e679c53df57e0ec2e89867ee717f938d4e6f19db77790  py3-pillow-scripts-b24479c.tar.gz"