diff options
author | Chocobo1 | 2023-04-10 17:15:04 +0800 |
---|---|---|
committer | Chocobo1 | 2023-04-10 17:15:04 +0800 |
commit | b174decbc15aaab2479e30d7e6db43bdb555a9dd (patch) | |
tree | 3b691074381103e8186fef6cb6f832f6a10c479b /PKGBUILD | |
parent | b7a8e41405c87ee0776a67810488aa9a889bebf6 (diff) | |
download | aur-b174decbc15aaab2479e30d7e6db43bdb555a9dd.tar.gz |
upgpkg: ufw-git 0.36.1.r85.g506546a-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,7 +1,7 @@ # Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net> pkgname=ufw-git -pkgver=r1911.g506546a +pkgver=0.36.1.r85.g506546a pkgrel=1 pkgdesc="Uncomplicated firewall" arch=('any') @@ -9,7 +9,7 @@ url="https://launchpad.net/ufw" license=('GPL3') depends=('python' 'iptables') makedepends=('git' 'python-build' 'python-installer' 'python-wheel') -provides=('ufw') +provides=("ufw=$pkgver") conflicts=('ufw') backup=('etc/default/ufw' 'etc/ufw/after.rules' @@ -42,9 +42,10 @@ prepare() { pkgver() { cd "ufw" - _rev=$(git rev-list --count --all) + _tag=$(git tag -l --sort -v:refname | grep -E '^v?[0-9\.]+$' | head -n1) + _rev=$(git rev-list --count $_tag..HEAD) _hash=$(git rev-parse --short HEAD) - printf "r%s.g%s" "$_rev" "$_hash" + printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's/^v//' } build() { |