diff options
author | Lubosz Sarnecki | 2018-12-08 15:20:14 +0100 |
---|---|---|
committer | Lubosz Sarnecki | 2018-12-08 15:25:03 +0100 |
commit | 3a87fa832b5fcc8c079f931f908e0e7f344c6dc4 (patch) | |
tree | dab10ad5d60e33902e2a8bb0f5f8b572cc425390 | |
parent | 8b46bcc8a03c032e94f3a20ff8ff39b18459449f (diff) | |
download | aur-3a87fa832b5fcc8c079f931f908e0e7f344c6dc4.tar.gz |
Parse version from build files. Use meson build.
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 43 |
2 files changed, 31 insertions, 23 deletions
@@ -1,16 +1,19 @@ +# Generated by mksrcinfo v8 +# Sat Dec 8 14:22:58 UTC 2018 pkgbase = openhmd-git - pkgdesc = Free and Open Source API and drivers for immersive technology. Supports Oculus Rift. - pkgver = 0.2.0.246.g38183e0 + pkgdesc = Free and Open Source API and drivers for immersive technology. + pkgver = 0.3.0.393.4ca169b pkgrel = 1 url = https://github.com/OpenHMD/OpenHMD arch = x86_64 arch = i686 license = Boost depends = hidapi - optdepends = oculus-udev: Udev rule for Oculus Rift + optdepends = oculus-udev: Udev rule for Oculus Rift, + optdepends = vive-udev: Udev rule for HTC Vive provides = openhmd conflicts = openhmd - source = git+https://github.com/OpenHMD/OpenHMD.git + source = openhmd::git+https://github.com/OpenHMD/OpenHMD.git sha256sums = SKIP pkgname = openhmd-git @@ -1,41 +1,46 @@ # Maintainer: Lubosz Sarnecki <lubosz@gmail.com> -pkgname=openhmd-git -pkgver=0.2.0.246.g38183e0 +basename=openhmd +pkgname=$basename-git +pkgver=0.3.0.393.4ca169b pkgrel=1 -pkgdesc="Free and Open Source API and drivers for immersive technology. Supports Oculus Rift." +pkgdesc="Free and Open Source API and drivers for immersive technology." arch=(x86_64 i686) url="https://github.com/OpenHMD/OpenHMD" license=(Boost) depends=(hidapi) -options=() -conflicts=('openhmd') -provides=('openhmd') +conflicts=($basename) +provides=($basename) optdepends=( - 'oculus-udev: Udev rule for Oculus Rift' + 'oculus-udev: Udev rule for Oculus Rift', + 'vive-udev: Udev rule for HTC Vive' ) -_gitname='OpenHMD' -source=("git+https://github.com/OpenHMD/OpenHMD.git") +source=($basename::"git+https://github.com/OpenHMD/OpenHMD.git") sha256sums=("SKIP") +ver() { + PREFIX=" version : '" + echo $(grep "$PREFIX" meson.build | sed -e "s/${PREFIX}//" | sed "s/',//") +} + pkgver() { - cd $_gitname - git describe --tag | sed 's|-|.|g' + cd $basename + hash=$(git log --pretty=format:'%h' -n 1) + revision=$(git rev-list --count HEAD) + echo $(ver).$revision.$hash } build() { - cd $_gitname - ./autogen.sh - ./configure --prefix=/usr - make + cd $basename + rm -rf build + meson build --prefix=/usr/ --libdir=lib + ninja -C build } package() { - cd $_gitname - make DESTDIR="$pkgdir/" install - mv $pkgdir/usr/bin/simple $pkgdir/usr/bin/openhmd-example - mv $pkgdir/usr/bin/unittests $pkgdir/usr/bin/openhmd-unittests + cd $basename + DESTDIR="$pkgdir" ninja -C build install install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } |