summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 757fb127af6c78091bd1ee798a96f56daa5e5a37 (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
# Maintainer: Arthur Zamarin <arthurzam@gmail.com> 

_pkgname=psmoveapi
pkgname=${_pkgname}-git
pkgver=3.9.1.r97.gf08c337
pkgrel=2
pkgdesc="Playstation Move Motion Controller API"
arch=(i686 x86_64)
url="http://thp.io/2010/psmove/"
license=('custom')
depends=('bluez-libs' 'libsystemd')
makedepends=('cmake')
source=(${_pkgname}::git+git://github.com/thp/${_pkgname}.git)
sha1sums=('SKIP')

pkgver() {
  cd "${srcdir}/${_pkgname}"
  git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
}

prepare() {
  cd "${srcdir}/${_pkgname}"
  git submodule init
  git submodule update
  cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DPSMOVEAPI_LIB_DEST=lib .
}

build() {
  cd "${srcdir}/${_pkgname}"
  make
}

package() {
  cd "${srcdir}/${_pkgname}"
  make DESTDIR="$pkgdir" install
  install -D -m644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}