summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: afbc70683f40b4ff412d1fc55a2f1125148684a6 (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
# Davide Depau <davide@depau.eu>

_pkgname=libuinputplus
pkgname=$_pkgname-git
pkgver=v0.1.3.r3.g036b057
pkgrel=1
pkgdesc="Easy-to-use uinput library in C++"
arch=('i686' 'x86_64')
makedepends=('cmake' 'git' 'make' 'pkg-config')
url="https://github.com/YukiWorkshop/libuInputPlus"
license=('MIT')
source=(${_pkgname}::git+https://github.com/YukiWorkshop/libuInputPlus.git)
sha256sums=('SKIP')
provides=($_pkgname)
conflicts=($_pkgname)

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

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

  mkdir -p build && cd build

  cmake .. \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_BUILD_TYPE=Release
  make
}

package() {
  cd "$srcdir/$_pkgname"
  make DESTDIR="$pkgdir" install -C build/
}