summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuraj Fiala2017-02-03 18:17:04 +0100
committerJuraj Fiala2017-02-03 18:17:04 +0100
commit1907e0e6c00bd8264b194d86e140323107ae9456 (patch)
tree0adf1d7d05f99e1cfb83a29dbe6a4c76989d8461
parentf2515ad1ba4cbf4164f99497bd6999816cc4a515 (diff)
downloadaur-1907e0e6c00bd8264b194d86e140323107ae9456.tar.gz
Add Python 3 version, update.
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD49
2 files changed, 53 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b87931c9e3ae..748fe0cd9970 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,20 @@
# Generated by mksrcinfo v8
-# Thu Apr 7 13:36:57 UTC 2016
-pkgbase = python2-srp
- pkgdesc = Python implementation of the Secure Remote Password protocol (SRP).
- pkgver = 1.0.5
+# Fri Feb 3 17:17:04 UTC 2017
+pkgbase = python-srp
+ pkgdesc = Python implementation of the Secure Remote Password protocol (SRP)
+ pkgver = 1.0.6
pkgrel = 1
url = https://github.com/cocagne/pysrp
arch = any
license = MIT
- depends = python2
- source = https://pypi.python.org/packages/source/s/srp/srp-1.0.5.tar.gz
- sha256sums = 9ba792f7ec2681b90d9ea70abeb2ffc153a11ae53aa114fcb1bb296eba6a75fe
+ makedepends = python
+ makedepends = python2
+ source = https://files.pythonhosted.org/packages/source/s/srp/srp-1.0.6.tar.gz
+ md5sums = 199d02926e61444891ff0342de49393e
+
+pkgname = python-srp
+ depends = python
pkgname = python2-srp
+ depends = python2
diff --git a/PKGBUILD b/PKGBUILD
index 73eaa41c1f7e..f3dc83a5561d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,52 @@
# Maintainer: Juraj Fiala <doctorjellyface at riseup dot net
_srcname=srp
-pkgname=python2-$_srcname
-pkgver=1.0.5
+pkgbase=python-srp
+pkgname=(python-$_srcname python2-$_srcname)
+pkgver=1.0.6
pkgrel=1
-pkgdesc='Python implementation of the Secure Remote Password protocol (SRP).'
+pkgdesc='Python implementation of the Secure Remote Password protocol (SRP)'
arch=('any')
url="https://github.com/cocagne/py$_srcname"
license=('MIT')
-depends=('python2')
-source=("https://pypi.python.org/packages/source/s/$_srcname/$_srcname-$pkgver.tar.gz")
-sha256sums=('9ba792f7ec2681b90d9ea70abeb2ffc153a11ae53aa114fcb1bb296eba6a75fe')
+makedepends=('python' 'python2')
+source=("https://files.pythonhosted.org/packages/source/${_srcname::1}/${_srcname}/${_srcname}-${pkgver}.tar.gz")
+md5sums=('199d02926e61444891ff0342de49393e')
+
+prepare() {
+ cd "$srcdir"
+ cp -a $_srcname-$pkgver{,-py2}
+}
+
+build() {
+ cd "$srcdir/$_srcname-$pkgver"
+ python setup.py build
+
+ cd "$srcdir/$_srcname-$pkgver-py2"
+ python2 setup.py build
+}
+
+check() {
+ # Test script isn’t compatible with Python 3 by the looks of it
+ #cd "$srcdir/$_srcname-$pkgver"
+ #python srp/test_srp.py
+
+ cd "$srcdir/$_srcname-$pkgver-py2"
+ python2 srp/test_srp.py
+}
+
+package_python-srp() {
+ depends=('python')
-package() {
cd "$srcdir/$_srcname-$pkgver"
- python2 setup.py install --root="$pkgdir" --optimize=1
+ python setup.py install --skip-build --root="$pkgdir" --optimize=1
+ install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_python2-srp() {
+ depends=('python2')
+
+ cd "$srcdir/$_srcname-$pkgver-py2"
+ python2 setup.py install --skip-build --root="$pkgdir" --optimize=1
install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}