summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorLuis Martinez2021-09-22 17:47:31 -0500
committerLuis Martinez2021-09-22 17:47:31 -0500
commit85353286a4a94648a38ed2fd868b5746ec5e0352 (patch)
tree8fed48478efcbcef6f1efd903fbd616bae231ad0 /PKGBUILD
parentd34aa1a95a6121e0a933adbca07efb2212edd7cb (diff)
downloadaur-python-iptools.tar.gz
package cleanup
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD65
1 files changed, 44 insertions, 21 deletions
diff --git a/PKGBUILD b/PKGBUILD
index adf73593d75..8f5d64972ce 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,34 +1,57 @@
-# Maintainer: shieldwed <shieldwed [at] outlook [dot] com>
+# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
+# Contributor: shieldwed <shieldwed [at] outlook [dot] com>
pkgbase=python-iptools
pkgname=(python-iptools python2-iptools)
pkgver=0.7.0
-pkgrel=1
+pkgrel=2
pkgdesc="Collection of utilities for dealing with IP addresses"
-url="http://python-iptools.readthedocs.org/"
+url="https://python-iptools.readthedocs.org/"
license=('BSD')
arch=('any')
-makedepends=(
- 'python-setuptools'
- 'python2-setuptools'
- )
-source=(
- "LICENSE"
- "https://github.com/bd808/$pkgbase/archive/v$pkgver.tar.gz"
- )
-sha256sums=('c85e8d34884219ec4ac360f28983b015953ec34b1c6d91e6afbb8b421626ea9e'
- '5ea59c0867e72d8243305ff1297fc5b2d8feaca650369a29985453ce4f39ca97')
+makedepends=('python-setuptools' 'python-sphinx' 'python2-setuptools')
+checkdepends=('python-nose' 'python2-nose')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/bd808/$pkgbase/archive/v$pkgver.tar.gz")
+sha256sums=('5ea59c0867e72d8243305ff1297fc5b2d8feaca650369a29985453ce4f39ca97')
+
+prepare() {
+ cp -a "$pkgbase-$pkgver" "$pkgbase-$pkgver-py2"
+}
+
+build() {
+ pushd "$pkgbase-$pkgver"
+ python setup.py build
+ cd docs
+ make man BUILDDIR="$srcdir"
+ popd
+
+ pushd "$pkgbase-$pkgver-py2"
+ python2 setup.py build
+}
+
+check() {
+ pushd "$pkgbase-$pkgver"
+ nosetests
+ popd
+
+ pushd "$pkgbase-$pkgver-py2"
+ nosetests2
+}
package_python-iptools() {
- depends=('python')
- install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- cd "$srcdir/$pkgbase-$pkgver"
- python setup.py install "--root=$pkgdir" --optimize=1
+ depends=('python')
+
+ install -Dm 644 man/iptools.1 -t "$pkgdir/usr/share/man/man1/"
+ cd "$pkgbase-$pkgver"
+ PYTHONHASHSEED=0 python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
+ install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}
package_python2-iptools() {
- depends=('python2')
- install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- cd "$srcdir/$pkgbase-$pkgver"
- python2 setup.py install "--root=$pkgdir" --optimize=1
+ depends=('python2')
+
+ install -Dm 644 man/iptools.1 "$pkgdir/usr/share/man/man1/iptools.py2.1"
+ cd "$srcdir/$pkgbase-$pkgver"
+ PYTHONHASHSEED=0 python2 setup.py install --root="$pkgdir/" --optimize=1 --skip-build
+ install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}