summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d5bdde35dddbd995cf3ecdd80102a90580d6ba0e (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
# Maintainer: coffebar i8ehkvien@mozmail.com

pkgname=intel_backlight_brightness_step
pkgver=0.1
pkgrel=1
pkgdesc='Fix tiny brightness step for fn keys on intel-core laptops'
arch=('x86_64')
url="https://github.com/coffebar/$pkgname"
license=('GPL')
makedepends=(git go)
_commit=21db97de589a24b233946105715498cffd327ce6
source=("git+$url#commit=$_commit")
sha256sums=('SKIP')

pkgver(){
  cd "$pkgname"
  git describe --tags | sed 's/^v//;s/-/+/g'
}

build() {
  cd "$pkgname"
  export CGO_CPPFLAGS="${CPPFLAGS}"
  export CGO_CFLAGS="${CFLAGS}"
  export CGO_CXXFLAGS="${CXXFLAGS}"
  export CGO_LDFLAGS="${LDFLAGS}"
  export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
  go build -o $pkgname $pkgname.go
}

# check() {
#   cd "$pkgname"
# }

package() {
  cd "$pkgname"
  install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
}