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

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

build() {
	python2 setup.py build
	python3 setup.py build
}

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"