summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAtomicFS2024-05-05 00:21:55 +0200
committerAtomicFS2024-05-05 00:21:55 +0200
commit150929b2928d147af4f37435e0b113bd9b601597 (patch)
tree16e0bb38a9d53f328c75a2c99edfadde7738d076
parent45a9e3948379c3a6574d7a047d4782e5e271d3bd (diff)
downloadaur-150929b2928d147af4f37435e0b113bd9b601597.tar.gz
chore: cleanup
Signed-off-by: AtomicFS <vojtech_vesely@white-hat-hacker.icu>
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD30
2 files changed, 22 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9085692a89a9..6b1798dbc70f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -9,7 +9,7 @@ pkgbase = python-ipware
makedepends = python-installer
makedepends = python-setuptools
conflicts = python-django-ipware
- source = python-ipware-2.0.3.src.tar.gz::https://github.com/un33k/python-ipware/archive/v2.0.3.tar.gz
- sha256sums = 499b141f4de01d27b548e57a604a99408122fc5ecd1e96aa53a2ee20035ccc8d
+ source = python-ipware::git+https://github.com/un33k/python-ipware#tag=v2.0.3
+ sha256sums = SKIP
pkgname = python-ipware
diff --git a/PKGBUILD b/PKGBUILD
index 24310af0a0c6..9ef0aa192f74 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,5 @@
-# Maintainer: amo <https://aur.archlinux.org/account/amo>
+# Maintainer: atomicfs <https://aur.archlinux.org/account/atomicfs>
-_pkgname=ipware
pkgname=python-ipware
pkgver=2.0.3
pkgrel=2
@@ -8,19 +7,30 @@ pkgdesc="Returns the best matched IP address from a given HTTP(s) header in Pyth
arch=('any')
url="https://github.com/un33k/python-ipware"
license=('MIT')
-makedepends=('python-build' 'python-installer' 'python-setuptools')
-conflicts=('python-django-ipware')
-source=("$pkgname-$pkgver.src.tar.gz::https://github.com/un33k/python-ipware/archive/v$pkgver.tar.gz")
-sha256sums=('499b141f4de01d27b548e57a604a99408122fc5ecd1e96aa53a2ee20035ccc8d')
+makedepends=(
+ 'python-build'
+ 'python-installer'
+ 'python-setuptools'
+)
+conflicts=(
+ 'python-django-ipware'
+)
+source=("${pkgname}::git+${url}#tag=v${pkgver}")
+sha256sums=('SKIP')
+
+check() {
+ cd "${srcdir}/${pkgname}"
+ ./test.sh
+}
build() {
- cd "$pkgname-$pkgver" || exit
+ cd "${srcdir}/${pkgname}"
python -m build --wheel --no-isolation
}
package() {
- cd "$pkgname-$pkgver" || exit
- python -m installer --destdir="$pkgdir" dist/*.whl
+ cd "${srcdir}/${pkgname}"
+ python -m installer --destdir="${pkgdir}" dist/*.whl
- install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
+ install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}