summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorskwerlman2021-02-15 19:27:27 -0500
committerskwerlman2021-02-15 19:27:27 -0500
commit72c19393379ff4e1a707677231b658206df76bfd (patch)
treeedd489082f3a9b0771336d19e96f1d86533f170f
parentd9c511b7f8f49831f4413f17e4237fd17eb29bd3 (diff)
downloadaur-72c19393379ff4e1a707677231b658206df76bfd.tar.gz
use git tags/hash in pkgver, dont rely on repo name
-rw-r--r--.SRCINFO4
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD15
3 files changed, 13 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d68dde400fe..5f360db4121 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = cockatrice-client-git
pkgdesc = Open-source multiplatform supported program for playing tabletop card games over a network.
- pkgver = 2.8.0
+ pkgver = 2.8.1.beta.r3.gdb5f6e01
pkgrel = 1
url = https://cockatrice.github.io/
arch = i686
@@ -21,7 +21,7 @@ pkgbase = cockatrice-client-git
optdepends = xz: Support compressed MTGJSON
provides = cockatrice-client
conflicts = cockatrice-client
- source = git+https://github.com/Cockatrice/Cockatrice
+ source = cockatrice-client-git::git+https://github.com/Cockatrice/Cockatrice
sha256sums = SKIP
pkgname = cockatrice-client-git
diff --git a/.gitignore b/.gitignore
index 232f199c7f3..3c8b8a8229a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
Cockatrice/
+cockatrice-client-git/
*.tar.xz
*.swp
pkg/
diff --git a/PKGBUILD b/PKGBUILD
index 3700a805cca..17442e66b07 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
# Contributor: Mikhail Burakov <mikhail.burakov@gmail.com>
pkgname=cockatrice-client-git
-pkgver=2.8.0
+pkgver=2.8.1.beta.r3.gdb5f6e01
pkgrel=1
pkgdesc='Open-source multiplatform supported program for playing tabletop card games over a network.'
arch=('i686' 'x86_64')
@@ -17,11 +17,16 @@ checkdepends=('gtest' 'valgrind')
optdepends=('zlib: Support compressed MTGJSON' 'xz: Support compressed MTGJSON')
provides=('cockatrice-client')
conflicts=('cockatrice-client')
-source=("git+https://github.com/Cockatrice/Cockatrice")
+source=("$pkgname"::"git+https://github.com/Cockatrice/Cockatrice")
sha256sums=('SKIP')
+pkgver() {
+ cd "$srcdir/$pkgname"
+ git describe --long --tags | cut -d- -f5- | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
+}
+
build() {
- cd "$srcdir/Cockatrice"
+ cd "$srcdir/$pkgname"
test -d build && rm -rf build
mkdir build
cd build
@@ -30,11 +35,11 @@ build() {
}
check() {
- cd "$srcdir/Cockatrice/build"
+ cd "$srcdir/$pkgname/build"
make test
}
package() {
- cd "$srcdir/Cockatrice/build"
+ cd "$srcdir/$pkgname/build"
make DESTDIR="$pkgdir/" install
}