summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 111600399180ebe9d33965cc035330ba2fffe90a (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
# Maintainer: zefr0x < Matrix: "@zer0-x:kde.org" >

pkgname="ianny-git"
_pkgname=${pkgname%-git}
pkgver=0.1.0alpha.1
pkgrel=2
pkgdesc="Desktop utility periodically informing the user to take breaks"
arch=("x86_64")
url="https://github.com/zefr0x/ianny"
license=("GPL3")
depends=("libdbus-1.so")
makedepends=("cargo" "meson")
provides=(${_pkgname})
conflicts=(${_pkgname})
source=("${pkgname}::git+${url}#branch=main")
sha512sums=("SKIP")

pkgver() {
    cd "${pkgname}"

    git describe --tags --abbrev=0 --match 'v*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
    cd "${pkgname}"

    git reset --hard "$(git describe --tags --abbrev=0 --match 'v*')"

    arch-meson build
}

build() {
    cd "${pkgname}"
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target

    meson compile -C build
}

package() {
    cd "${pkgname}"

    meson install -C build --destdir "${pkgdir}"
}