aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-olefile/APKBUILD
blob: 92be2b2eb03ed5245f7d558190b623f342908a6e (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-olefile
pkgver=0.46
pkgrel=1
pkgdesc="A Python module to read/write MS OLE2 files"
url="http://www.decalage.info/olefile"
arch="noarch"
license="custom"
depends=""
makedepends="python2-dev py-setuptools python3-dev"
install=""
subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
source="https://github.com/decalage2/${pkgname/py-/}/releases/download/v$pkgver/${pkgname/py-/}-$pkgver.tar.gz"

builddir="$srcdir"/${pkgname/py-/}-$pkgver

build() {
	cd "$builddir"
	python2 setup.py build || return 1
	python3 setup.py build || return 1
}

package() {
	mkdir -p "$pkgdir"
}

_py() {
	local python=$1
	pkgdesc="$pkgdesc - $python"
	install_if="$pkgname=$pkgver-r$pkgrel $python"
	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
}

_py2() {
	_py python2
	replaces="$pkgname"
}

_py3() {
	_py python3
}


sha512sums="285dff1eb250d464e338f892dca3e465504523fd956ceeb8bfe40eb9a82510713f64f490749a23bfdc911555f8d9c49580af5b03a15063c2598bb1a39999778f  olefile-0.46.tar.gz"