From 6c07feacc0c6f8efc76653df24747ab66123646f Mon Sep 17 00:00:00 2001 From: Francesco Colista Date: Mon, 22 Aug 2016 12:45:41 +0000 Subject: community/py-olefile: moved from testing, added python3 support and py2/py3 subpackage --- community/py-olefile/APKBUILD | 48 +++++++++++++++++++++++++++++++++++++++++++ testing/py-olefile/APKBUILD | 31 ---------------------------- 2 files changed, 48 insertions(+), 31 deletions(-) create mode 100644 community/py-olefile/APKBUILD delete mode 100644 testing/py-olefile/APKBUILD diff --git a/community/py-olefile/APKBUILD b/community/py-olefile/APKBUILD new file mode 100644 index 0000000000..0d8a09bf5e --- /dev/null +++ b/community/py-olefile/APKBUILD @@ -0,0 +1,48 @@ +# Contributor: Francesco Colista +# Maintainer: Francesco Colista +pkgname=py-olefile +pkgver=0.43 +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://bitbucket.org/decalage/olefileio_pl/downloads/${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 +} + + +md5sums="f570df81ebfab51aaa538af39fef6fd3 olefile-0.43.tar.gz" +sha256sums="57102bf3f19c5fa099c0c7128190fe4bb28cd2760aa08f4b5b7dccf28718b876 olefile-0.43.tar.gz" +sha512sums="5a2fbe69bbe13f2633b4d6c8861531f4ac0b41379fea889a6e74a1f0f78960e2b9db10516fae5f3d2a59f2dac6a6befcd78c11a9fc45212009a3097cdc5f61ea olefile-0.43.tar.gz" diff --git a/testing/py-olefile/APKBUILD b/testing/py-olefile/APKBUILD deleted file mode 100644 index a7349e5c7d..0000000000 --- a/testing/py-olefile/APKBUILD +++ /dev/null @@ -1,31 +0,0 @@ -# Contributor: Francesco Colista -# Maintainer: Francesco Colista -pkgname=py-olefile -pkgver=0.43 -pkgrel=0 -pkgdesc="A Python module to read/write MS OLE2 files" -url="http://www.decalage.info/olefile" -arch="noarch" -license="custom" -depends="" -depends_dev="" -makedepends="$depends_dev python-dev py-setuptools" -install="" -subpackages="$pkgname-doc" -source="https://bitbucket.org/decalage/olefileio_pl/downloads/${pkgname/py-/}-$pkgver.tar.gz" - -builddir="$srcdir"/${pkgname/py-/}-$pkgver -build() { - cd "$builddir" - python setup.py build || return 1 -} - -package() { - cd "$builddir" - python setup.py install --prefix=/usr --root="$pkgdir" || return 1 - install -Dm644 olefile/LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE -} - -md5sums="f570df81ebfab51aaa538af39fef6fd3 olefile-0.43.tar.gz" -sha256sums="57102bf3f19c5fa099c0c7128190fe4bb28cd2760aa08f4b5b7dccf28718b876 olefile-0.43.tar.gz" -sha512sums="5a2fbe69bbe13f2633b4d6c8861531f4ac0b41379fea889a6e74a1f0f78960e2b9db10516fae5f3d2a59f2dac6a6befcd78c11a9fc45212009a3097cdc5f61ea olefile-0.43.tar.gz" -- cgit v1.2.3