summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmos Onn2018-09-26 00:23:27 +0200
committerAmos Onn2018-09-26 00:23:27 +0200
commite8e5d0cc810f5df9a76ad6f24b33d675fa9af00f (patch)
tree52033f402ab4a558938903157685d3aef92f8461
parent74d04b9fda57e9b26ee3e18273618d9d5cd18eee (diff)
downloadaur-e8e5d0cc810f5df9a76ad6f24b33d675fa9af00f.tar.gz
1.0.0-2: added split package for python2.
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD24
2 files changed, 25 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6ac059da3c9b..999adf98d463 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,18 @@
# Generated by mksrcinfo v8
-# Mon Apr 10 14:20:39 UTC 2017
+# Tue Sep 25 22:23:10 UTC 2018
pkgbase = python-heapdict
pkgdesc = A python library for a heap with decrease- and increase-key operations.
pkgver = 1.0.0
- pkgrel = 1
+ pkgrel = 2
url = http://stutzbachenterprises.com
arch = any
license = BSD-3-clause
- depends = python>=3.5
source = https://codeload.github.com/DanielStutzbach/heapdict/tar.gz/v1.0.0
sha256sums = 4c8e581f1651ca78da35820fc80b0d50fc060032517f2c7efd9169e204db3793
pkgname = python-heapdict
+ depends = python
+
+pkgname = python2-heapdict
+ depends = python2
diff --git a/PKGBUILD b/PKGBUILD
index f316d50af919..c0d825bdb8b1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,18 +1,32 @@
# Maintainer: Amos Onn <amosonn at gmail dot com>
-pkgname=python-heapdict
+pkgbase=python-heapdict
+pkgname=('python-heapdict' 'python2-heapdict')
+_pkgname=heapdict
pkgver=1.0.0
-pkgrel=1
+pkgrel=2
pkgdesc="A python library for a heap with decrease- and increase-key operations."
arch=('any')
url="http://stutzbachenterprises.com"
license=('BSD-3-clause')
-depends=('python>=3.5')
source=(https://codeload.github.com/DanielStutzbach/heapdict/tar.gz/v$pkgver)
sha256sums=('4c8e581f1651ca78da35820fc80b0d50fc060032517f2c7efd9169e204db3793')
-package() {
- cd $srcdir/heapdict-$pkgver
+prepare() {
+ cp -a $_pkgname-$pkgver{,-py2}
+}
+
+package_python-heapdict() {
+ depends=('python')
+ cd $srcdir/$_pkgname-$pkgver
python setup.py install --root=$pkgdir || return 1
install -d $pkgdir/usr/share/licenses/$pkgname
install LICENSE $pkgdir/usr/share/licenses/$pkgname/COPYING
}
+
+package_python2-heapdict() {
+ depends=('python2')
+ cd $srcdir/$_pkgname-$pkgver-py2
+ python2 setup.py install --root=$pkgdir || return 1
+ install -d $pkgdir/usr/share/licenses/$pkgname
+ install LICENSE $pkgdir/usr/share/licenses/$pkgname/COPYING
+}