summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b65fd6c9b9320a25f6e6479477e0f9cfc0ecd1d5 (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
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
# Co-Maintainer: Kevin Morris <kevr at 0cost dot org>
pkgname=system76-kbd-led-git
pkgver=0.1.r14.gba5bbd7
pkgrel=3
pkgdesc="System76 keyboard backlight LED controller."
arch=('x86_64')
url="https://github.com/kevr/system76-kbd-led"
license=('MIT')
depends=('boost-libs')
makedepends=(
  'git'
  'boost'
  'cmake'
)
optdepends=('system76-dkms: Control hotkeys and fan on certain System76 laptops')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
install="${pkgname%-git}.install"
source=('git+https://github.com/kevr/system76-kbd-led.git')
sha256sums=('SKIP')

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

build() {
  cmake -B build -S "${pkgname%-git}" \
    -DCMAKE_BUILD_TYPE='None' \
    -DCMAKE_INSTALL_PREFIX='/usr' \
    -DPKG_VERSION="$pkgver" \
    -DCMAKE_POLICY_VERSION_MINIMUM='3.5' \
    -Wno-dev
  make -C build
}

package() {
  make -C build DESTDIR="$pkgdir/" install

  cd "${pkgname%-git}"
  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
  install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
}