diff options
author | Frederik “Freso” S. Olesen | 2024-08-03 01:55:21 +0200 |
---|---|---|
committer | Frederik “Freso” S. Olesen | 2024-08-03 01:55:21 +0200 |
commit | 9639f653848293a9b2f83a7260188dc57b3f2edc (patch) | |
tree | d7cf3da74c6f9bbe274cd5ee7472419f0db0b37f | |
parent | 75d0fcca25e303cedc1409f3db8e7e6e7fb13311 (diff) | |
download | aur-9639f653848293a9b2f83a7260188dc57b3f2edc.tar.gz |
Initial python-onion-location-git PKGBUILD
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | .nvchecker.toml | 5 | ||||
-rw-r--r-- | PKGBUILD | 27 |
3 files changed, 24 insertions, 17 deletions
@@ -1,4 +1,4 @@ -pkgbase = python-onion-location +pkgbase = python-onion-location-git pkgdesc = Python library for discovering Onion-Location HTTP headers pkgver = 0.1.0 pkgrel = 1 @@ -7,13 +7,14 @@ pkgbase = python-onion-location license = AGPL-3.0-or-later makedepends = python-hatchling makedepends = python-hatch-vcs + makedepends = git makedepends = python-build makedepends = python-installer makedepends = python-wheel depends = python depends = python-beautifulsoup4 depends = python-lxml - source = python-onion-location-0.1.0.tar.gz::https://codeberg.org/Freso/python-onion-location/archive/v0.1.0.tar.gz - b2sums = 5f87a045b57a2b4b75f9328f1bb0ee48d16de6092b57405afc8e6ec34810c8e5111d7137a9b9d36d39b994693b2c2785dd2225638f8ccbcca90a4a212b60f1bb + source = git+https://codeberg.org/Freso/python-onion-location.git + b2sums = SKIP -pkgname = python-onion-location +pkgname = python-onion-location-git diff --git a/.nvchecker.toml b/.nvchecker.toml index 59bd63e9fc24..e69de29bb2d1 100644 --- a/.nvchecker.toml +++ b/.nvchecker.toml @@ -1,5 +0,0 @@ -[python-onion-location] -source = "git" -git = "https://codeberg.org/Freso/python-onion-location.git" -include_regex = 'v(\d(?:\d|\.)+)' -prefix = 'v' @@ -1,10 +1,10 @@ # Maintainer: Frederik “Freso” S. Olesen <archlinux@freso.dk> -pkgname=python-onion-location +pkgname=python-onion-location-git pkgver=0.1.0 pkgrel=1 pkgdesc='Python library for discovering Onion-Location HTTP headers' arch=(any) -url="https://codeberg.org/Freso/${pkgname}" +url="https://codeberg.org/Freso/${pkgname%-git}" license=('AGPL-3.0-or-later') depends=( 'python' @@ -15,21 +15,32 @@ makedepends=( 'python-hatchling' 'python-hatch-vcs' # Generic/Arch Linux + 'git' 'python-build' 'python-installer' 'python-wheel' ) -source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz") -b2sums=('5f87a045b57a2b4b75f9328f1bb0ee48d16de6092b57405afc8e6ec34810c8e5111d7137a9b9d36d39b994693b2c2785dd2225638f8ccbcca90a4a212b60f1bb') +source=("git+${url}.git") +b2sums=('SKIP') + +pkgver() { + cd "${pkgname%-git}" + hatch version +} + +prepare () { + cd "${pkgname%-git}" + # Remove potential artifacts from earlier builds + git clean -dfx +} build() { - cd "${pkgname}" - export SETUPTOOLS_SCM_PRETEND_VERSION="${pkgver}" + cd "${pkgname%-git}" python -m build --wheel --no-isolation } package() { - cd "${pkgname}" + cd "${pkgname%-git}" python -m installer --destdir="$pkgdir" dist/*.whl - install -Dm644 README.rst "${pkgdir}/usr/share/doc/${pkgname}/README.rst" + install -Dm644 README.rst "${pkgdir}/usr/share/doc/${pkgname%-git}/README.rst" } |