summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e3889dfd6644d1e115c801e95a027e64db74fe6c (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
# Maintainer: skwerlman <skw@tetrarch.co>

pkgname=aw-watcher-steam-git
_name=${pkgname%-git}
pkgver=r5.13c4b65
pkgrel=1
pkgdesc="ActivityWatch watcher to watch your currently playing Steam game"
arch=('any')
url="https://github.com/Edwardsoen/aw-watcher-steam"
depends=('python' 'python-requests' 'activitywatch-bin')
makedepends=('python-poetry' 'git')
conflicts=('aw-watcher-steam')
provides=('aw-watcher-steam')
source=("$_name::git+https://github.com/Edwardsoen/aw-watcher-steam.git")
md5sums=('SKIP')
license=('MIT')

pkgver() {
  cd "$_name"
  ( set -o pipefail
    git describe --long --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
  )
}

prepare() {
    git -C "${srcdir}/${_name}" clean -dfx
}

build() {
    cd "$_name"
    poetry build
}

package() {
    cd "$_name"
    python -m installer --destdir="$pkgdir" dist/*.whl
}