summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6be270ac278b743696623a09b716d700aa979594 (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
44
# Contributor: Dennis Hamester <dennis.hamester@startmail.com>

pkgname=scraw
pkgver=0.2.1
pkgrel=2
pkgdesc="Steam Controller C library"
arch=('i686' 'x86_64')
url="https://gitlab.com/dennis-hamester/scraw"
license=('custom:ISC')
depends=(
  'libusb'
)
makedepends=(
  'cmake'
  'doxygen'
)
source=(
  "scraw-v$pkgver.tar.gz::$url/-/archive/v$pkgver/scraw-v$pkgver.tar.gz"
)
sha256sums=(
  '6b0afd0417577aad482a010b3f2754790b1e2cce59d14711dac3a0dd25afc39c'
)

prepare() {
  cd "$srcdir/$pkgname-v$pkgver"

  doxygen -u "doc/Doxyfile.in"
}

build() {
  cmake \
    -B build \
    -S "$pkgname-v$pkgver" \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DBUILD_SCRAW_INFO=ON

  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build

  install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" "$srcdir/$pkgname-v$pkgver/LICENSE"
}