summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Jacobs2015-08-18 00:42:08 -0400
committerJustin Jacobs2015-08-18 00:42:08 -0400
commit32f504d9c55197f5df88c412ae8c7371c6fc048d (patch)
tree0555fa7af74ed70eb56aa93aa97be455f0d1e118
parent1b6527fd8364a72afed87be19923907df49da9c4 (diff)
downloadaur-32f504d9c55197f5df88c412ae8c7371c6fc048d.tar.gz
Migrate to built-in Git support for PKGBUILD
This requires a larger download, since we're grabbing the whole history. However, it properly supports automatically updating the pkgver.
-rw-r--r--PKGBUILD32
1 files changed, 9 insertions, 23 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 108fe95c5cc..74d1bd5b480 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Contributor: dorkster <jajdorkster@gmail.com>
pkgname=flare-game-git
-pkgver=20150802
+pkgver=v0.20.r173.g29a073f
pkgrel=1
pkgdesc="Fantasy action RPG using the FLARE engine - Git version"
url="http://www.flarerpg.org/"
@@ -11,31 +11,17 @@ makedepends=('git>=1.7.10-1' 'cmake')
depends=('flare-engine-git')
conflicts=('flare-game')
replaces=('flare-game')
+source=("git://github.com/clintbellanger/flare-game.git")
+sha1sums=('SKIP')
-_gitroot="git://github.com/clintbellanger/"
-_gitname="flare-game"
-_repo="flare-game"
+pkgver() {
+ cd $srcdir/flare-engine
+ git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
build() {
- cd $srcdir
- msg "Connecting to the GIT server..."
-
- if [[ -d $srcdir/$_repo ]] ; then
- msg "Updating flare-game"
- cd $_repo
- msg "Removing build files..."
- git clean -dfx
- msg "Updating..."
- git pull --no-tags
- msg "Updating flare"
- else
- msg "Cloning..."
- git clone $_gitroot$_repo --depth 1 --single-branch
-
- msg "Clone done."
- fi
+ cd $srcdir/flare-game
- cd $srcdir/$_repo
msg "Running cmake..."
cmake -DCMAKE_INSTALL_PREFIX=/usr -DDATADIR=share/flare
msg "Compiling..."
@@ -43,7 +29,7 @@ build() {
}
package() {
- cd $srcdir/$_repo
+ cd $srcdir/flare-game
msg "Installing..."
make install DESTDIR=$pkgdir
}