summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d6242677fd127a8687b8d4c18f3a9f035ed394ea (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
45
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
# Contributor: Federico Di Pierro <nierro92@gmail.com>
pkgname=clight
pkgver=4.11
pkgrel=1
pkgdesc="A C daemon that turns your webcam into a light sensor. It can also change display gamma temperature, dim your screen and set your dpms."
arch=('x86_64' 'aarch64')
url="https://github.com/FedeDP/Clight"
license=('GPL-3.0-or-later')
depends=(
  'clightd'
  'gsl'
  'hicolor-icon-theme'
  'libconfig'
  'popt'
)
makedepends=(
  'bash-completion'
  'cmake'
  'git'
)
optdepends=(
  'bash-completion: to add support for bash automatic completion.'
  'clight-gui: Clight GUI written in Qt.'
  'geoclue: to retrieve user location through geoclue.'
  'upower: to save energy by increasing timeouts between captures while on battery
    and to autocalibrate keyboard backlight.'
)
backup=("etc/$pkgname/$pkgname.conf"
        "etc/$pkgname/modules.conf.d"/{backlight,daytime,dimmer,dpms,gamma,inhibit,keyboard,screen,sensor}.conf)
install="$pkgname.install"
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha256sums=('9a7ec2070b0e1d074477cd219d6894dde9eb85cbe83daebc22054fab29dade34')

build() {
  cmake -B build -S Clight-$pkgver \
    -DCMAKE_BUILD_TYPE='None' \
    -DCMAKE_INSTALL_PREFIX='/usr' \
    -Wno-dev
  cmake --build build
}

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