diff options
-rw-r--r-- | community/py-impacket/APKBUILD (renamed from testing/py-impacket/APKBUILD) | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/testing/py-impacket/APKBUILD b/community/py-impacket/APKBUILD index 3453555514..56d5222d5b 100644 --- a/testing/py-impacket/APKBUILD +++ b/community/py-impacket/APKBUILD @@ -3,27 +3,48 @@ pkgname=py-impacket _pkgname=impacket pkgver=0.9.15 -pkgrel=0 +pkgrel=1 pkgdesc="A collection of Python classes providing access to network packets" url="http://code.google.com/p/impacket/" arch="noarch" license="ASL 2.0" -depends="python" -depends_dev="" -makedepends="python-dev" +depends="" +makedepends="python2-dev py-setuptools" install="" -subpackages="$pkgname-doc" +subpackages="py2-${pkgname/py-/}:_py2 $pkgname-doc" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir"/$_pkgname-$pkgver build() { cd "$builddir" - python setup.py build || return 1 + python2 setup.py build || return 1 } package() { + mkdir -p "$pkgdir" + install -Dm0644 "$builddir"/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE +} + +_py() { + local python=$1 + pkgdesc="$pkgdesc - $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" - python setup.py install --root=$pkgdir/ --optimize=1 || return 1 + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +_py2() { + _py python2 + replaces="$pkgname" + depends="py2-asn1 py2-crypto" +} + +doc() { + cd "$builddir" + mkdir -p "$subpkgdir"/usr/share/doc/$pkgname + mv impacket/testcases "$subpkgdir"/usr/share/doc/$pkgname + mv README.md "$subpkgdir"/usr/share/doc/$pkgname + install -Dm0644 LICENSE "$subpkgdir"/usr/share/licenses/$pkgname/LICENSE } md5sums="53fb6d1c375dd3ef8fff4ce2b7ff8f15 impacket-0.9.15.tar.gz" |