blob: 80dde846a2442988928d10e204eb737de955a0f7 (
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: Maxqia <contrib@maxqia.com>
# Co-Maintainer: Felix Golatofski <contact@xdfr.de>
pkgname=als-controller-git
pkgver=r86.a2f9f2b
pkgrel=1
pkgdesc="A daemon that adjusts screen and keyboard backlight using the Zenbook's light sensor"
arch=('i686' 'x86_64')
url="https://github.com/hitzemann/Asus-Zenbook-Ambient-Light-Sensor-Controller"
license=('Apache')
depends=('qt5-base' 'libbsd')
makedepends=('git' 'als-dkms')
provides=('als-controller')
conflicts=('als-controller')
source=("${pkgname}::git+https://github.com/hitzemann/Asus-Zenbook-Ambient-Light-Sensor-Controller.git"
"als-controller.service")
sha256sums=('SKIP'
'47b3e42bd5d59867e639975597d5225b1654c92b2965509280ffd71956849ba4')
pkgver() {
cd "${srcdir}/$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd $srcdir/${pkgname}/example
sed -i 's|/bin/bash|/usr/bin/env bash|;s|"\$DIR"/\.\./service/||' switch.sh
}
build() {
cd $srcdir/${pkgname}/service
[[ "$CARCH" = "x86_64" ]] \
&& qmake als-controller.pro -r -spec linux-g++-64 \
|| qmake als-controller.pro -r -spec linux-g++
make
}
package() {
cd $srcdir/$pkgname
install -Dm644 example/images/active.svg "$pkgdir"/usr/share/als-controller/example/images/active.svg
install -Dm644 example/images/inactive.svg "$pkgdir"/usr/share/als-controller/example/images/inactive.svg
install -Dm644 ../als-controller.service "$pkgdir"/usr/lib/systemd/system/als-controller.service
install -Dm755 example/switch.sh "$pkgdir"/usr/share/als-controller/example/switch.sh
install -Dm755 service/${pkgname} "$pkgdir"/usr/bin/${pkgname}
}
|