summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 182451eb6c6f36a137f0067c7f85d6dfc8bd0fb7 (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
# Maintainer: Tristan Brugère < tristan at bruge dot re >
_pkgname=yabd
pkgname="$_pkgname-git"
pkgver=0.2.2.31.a6af8c0
pkgrel=1
pkgdesc="Yet Another Brightness Daemon — set screen brightness from ambient light sensor"
arch=("any")
url="https://github.com/tbrugere/yabd"
license=("custom:CeCILL-B")

depends=(
    "python>=3.10" 
    "iio-sensor-proxy"
    "python-sdbus"
)

makedepends=(
    "python-poetry"
    "git"
)

source=(
    "git+https://github.com/tbrugere/yabd.git"
)

sha256sums=('SKIP')


pkgver() {
  cd "$_pkgname"
  REVISION="$(git rev-list --count HEAD).$(git rev-parse --short=7 HEAD)"
  RELEASE=$(poetry version -s)
  echo "$RELEASE.$REVISION"
}

package() {
    cd "$_pkgname"
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" #license
    install -D yabd.py "$pkgdir/usr/bin/yabd"
    install -Dm644 etc/yabd.service "$pkgdir/usr/lib/systemd/user/yabd.service"
}