summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2811ff60ebbc6aaeda854c95d3061564443902e6 (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
# 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=2
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 | 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" \
    -Wno-dev
  make -C build
}

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

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