summaryrefslogtreecommitdiff
path: root/pcr/puzzlemoppet-git/PKGBUILD
blob: 45bbbacc88577d862a9fb9158093b25d24c96e87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Maintainer: bill-auger <bill-auger@programmer.net>
# Maintainer (AUR): MCMic <come.bernigaud@laposte.net>


pkgname=puzzlemoppet-git
pkgver=r64.d79b10e
pkgrel=2
pkgdesc="A challenging 3D puzzle game where you must guide the Moppet through the vast and eternal void of space by solving the various and beautiful puzzles thrown at you"
arch=('i686' 'x86_64')
url=https://bitbucket.org/Knitter/puzzlemoppet/overview
license=('WTFPL')

_latest_version() { pacman -Si $1 | awk '$1=="Version" { sub (/-.*/, "" , $3) ; print $3 }' | sort -V | tail -n 1 ; }
_runtime_couplings=( "ode=$(_latest_version 'ode')" )
depends=(${_runtime_couplings[@]} 'openal' 'irrlicht' 'libxrandr')
makedepends=('make' 'cmake' 'git')
conflicts=('puzzle-moppet-bin')

source=(${pkgname}::git+https://bitbucket.org/Knitter/puzzlemoppet.git)
md5sums=('SKIP')


pkgver()
{
  cd "${srcdir}/${pkgname}"

  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build()
{
  cd "${srcdir}/${pkgname}/puzzlemoppet"

  cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_FOR_INSTALL=ON .
  make
}

package()
{
  cd "${srcdir}/${pkgname}/puzzlemoppet"

  make install DESTDIR=$pkgdir
}