pkgname=("tickertape")
pkgver="0.1.0"
pkgrel=1
epoch=1
pkgdesc="A LCD ticker for host details"

arch=("any")

depends=(
    python
)

source=(
    tickertape.service
    config.toml
)

sha256sums=(
    "SKIP"
    "SKIP"
)

makedepends=(
    python
    bazel
)

# Input file verification
verify() {
    true
}

# Input file patching
prepare() {
    true
}

# Building
build() {
    cd ..
    bazel build :tickertape.zapp
    cp -f $(bazel run --run_under=echo :tickertape.zapp) $srcdir/
}

# Post-build verification (tests)
check() {
    true
}

# Emplacing artifacts
package() {
    install -Dm755 tickertape.zapp "${pkgdir}"/usr/bin/tickertape
    install -Dm644 tickertape.service "${pkgdir}"/usr/lib/systemd/system/tickertape.service
    install -Dm644 config.toml "${pkgdir}"/etc/tickertape/config.toml
}