summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7dd97f3adb20d95b32b3bf5c6b4b2b283c9a39f4 (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
# Maintainer: Hong Shick Pak <hong@hspak.com>

pkgname=brightnessztl
pkgver=0.4
pkgrel=1
pkgdesc="A CLI to control device backlight written in Zig"
arch=('x86_64')
url="https://github.com/hspak/brightnessztl"
license=('MIT')
depends=('systemd-libs')
makedepends=('zig')
provides=("$pkgname")
conflicts=("$pkgname")
source=("https://github.com/hspak/${pkgname}/archive/v${pkgver}.tar.gz")
sha256sums=('223cb78d9e5e99e1cfd3b93b3e340ea67c5c6a034f6621dd021dddd202a15435')

build() {
  cd "${pkgname}-${pkgver}"
  zig build -Drelease-safe=true
}

check() {
  cd "${pkgname}-${pkgver}"
  zig-out/bin/brightnessztl debug &>/dev/null
}

package() {
  cd "${pkgname}-${pkgver}"
  install -D -m 0755 "zig-out/bin/brightnessztl" "${pkgdir}/usr/bin/brightnessztl"
  install -D -m 0644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

# vim: ft=sh syn=sh et