Subject: [alpine-aports] [PATCH] testing/py-iptools: new aport

From: Daniel Isaksen <[email-masked]>
Date: Fri, 7 Sep 2018 06:47:23 +0000

---
 testing/py-iptools/APKBUILD | 52 +++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 testing/py-iptools/APKBUILD

diff --git a/testing/py-iptools/APKBUILD b/testing/py-iptools/APKBUILD
new file mode 100644
index 0000000000..e46457d4d4
--- /dev/null
+++ b/testing/py-iptools/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: Daniel Isaksen <[email-masked]
+# Maintainer: Daniel Isaksen <[email-masked]>
+pkgname=py-iptools
+_pkgname="${pkgname//py-/python-}"
+pkgver=0.6.1
+pkgrel=0
+pkgdesc="A crypto and SSL toolkit for Python"
+url="https://pypi.python.org/pypi/M2Crypto/"
+arch="all"
+license="BSD"
+depends="py-typing"
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="py-iptools.tar.gz::https://github.com/bd808/$_pkgname/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+	cd "$builddir"
+	python2 setup.py build
+	python3 setup.py build
+}
+
+package() {
+	mkdir -p "$pkgdir"
+}
+
+check() {
+	cd "$builddir"
+	python3 setup.py test
+}
+
+_py() {
+	local python="$1"
+	pkgdesc="$pkgdesc ${python#python}"
+	depends="$depends $python"
+	install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+	cd "$builddir"
+	$python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+_py2() {
+	depends="${depends//py-/py2-}"
+	_py python2
+}
+
+_py3() {
+	depends="${depends//py-/py3-}"
+	_py python3
+}
+
+sha512sums="a9cae8b035741efe8874f432b9200b118b5ebf63f081d522df4c1ffa0096e23ac6db552f1989049d4e421cc95d13dd0b22ee8cf07a8340aa4db5fb79646380eb  py-iptools.tar.gz"
-- 
2.18.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Daniel Isaksen <[email-masked]>
Date: Fri, 7 Sep 2018 10:38:01 +0200

I accidentally had py-typing in there as a dependency. It can be removed,
as I did in this reply.

-----
Sincerely / Med vennlig hilsen,
Daniel Isaksen <[email-masked]> (https://duniel.no)

On Fri, Sep 7, 2018 at 8:47 AM, Daniel Isaksen <[email-masked]> wrote:

> +sha512sums="a9cae8b035741efe8874f432b9200b118b5ebf63f081d522df4c1ffa0096
> e23ac6db552f1989049d4e421cc95d13dd0b22ee8cf07a8340aa4db5fb79646380eb
> py-iptools.tar.gz"
> --
> 2.18.0
>
>

---

From: Daniel Isaksen <[email-masked]>
Date: Fri, 7 Sep 2018 10:42:23 +0200

Also, now that I think of it, I made a slight mistake with the license.
It's actually BSD-2-Clause.

I have again fixed it in this reply.

-----

On Fri, Sep 7, 2018 at 10:38 AM, Daniel Isaksen <[email-masked]> wrote:

>> +license="BSD-2-Clause"
>> +sha512sums="a9cae8b035741efe8874f432b9200b118b5ebf63f081d52
>> 2df4c1ffa0096e23ac6db552f1989049d4e421cc95d13dd0b22ee8cf07a8340aa4db5fb79646380eb
>> py-iptools.tar.gz"
>> --
>> 2.18.0
>>
>>
>