summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorChocobo12023-04-10 17:16:06 +0800
committerChocobo12023-04-10 17:16:06 +0800
commit55e017a20204ecb6d50f5e3040d31840386778fe (patch)
tree31cd2eef0458ee0f25ee0b9980890df754b0f348 /PKGBUILD
parent3e1f6e39cb4531a06e3b68e845ff05a69337c7dc (diff)
downloadaur-tunsafe-git.tar.gz
upgpkg: tunsafe-git 1.4.r79.g85a871c-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD13
1 files changed, 7 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b7542dcf6796..6f1789d8c166 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
pkgname=tunsafe-git
-pkgver=r9.ge116360
+pkgver=1.4.r79.g85a871c
pkgrel=1
pkgdesc="High performance and secure VPN client that uses the WireGuard protocol"
arch=('i686' 'x86_64')
@@ -9,7 +9,7 @@ url="https://tunsafe.com/"
license=('AGPL' 'BSD' 'custom: OpenSSL')
depends=('gcc-libs')
makedepends=('git')
-provides=('tunsafe')
+provides=("tunsafe=$pkgver")
conflicts=('tunsafe')
source=("git+https://github.com/TunSafe/TunSafe.git")
sha256sums=('SKIP')
@@ -24,9 +24,10 @@ prepare() {
pkgver() {
cd "TunSafe"
- _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() {
@@ -38,6 +39,6 @@ build() {
package() {
cd "TunSafe"
- install -Dm755 "tunsafe" "$pkgdir/usr/bin/tunsafe"
- install -Dm644 "LICENSE.AGPL.TXT" "$pkgdir/usr/share/licenses/tunsafe/LICENSE.AGPL.TXT"
+ install -Dm755 "tunsafe" -t "$pkgdir/usr/bin"
+ install -Dm644 "LICENSE.AGPL.TXT" -t "$pkgdir/usr/share/licenses/tunsafe"
}