summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e5ea346cf320cb83bb1f7bf664fe1d5dd091379a (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
# Maintainer: Sven Rademakers <sven.rademakers@gmail.com>
pkgname=tpi
pkgver=1.0.7
pkgdesc='Official Turing-Pi2 CLI tool'
source=("git+https://github.com/turing-machines/tpi.git#tag=v1.0.7")
pkgrel=3
url=https://turingpi.com/
license=('Apache-2.0')
makedepends=('cargo' 'git')
arch=('x86_64' 'aarch64' 'armv7h')
options=(!lto)

prepare() {
    cd tpi
    export RUSTUP_TOOLCHAIN=stable
    cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
    cd tpi
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo build --frozen --release --target "$CARCH-unknown-linux-gnu"
}

check() {
    cd tpi
    export RUSTUP_TOOLCHAIN=stable
    cargo test --frozen
}
package() {
TARGET=$CARCH-unknown-linux-gnu
pkgname=tpi
mkdir -p ${pkgdir}/usr/bin
mkdir -p ${pkgdir}/usr/share/doc/tpi
install -m 755 ${srcdir}/${pkgname}/target/${TARGET}/release/tpi ${pkgdir}/usr/bin/tpi
install -m 644 ${srcdir}/${pkgname}/README.md ${pkgdir}/usr/share/doc/tpi/README.md
install -m 644 ${srcdir}/${pkgname}/LICENSE ${pkgdir}/usr/share/doc/tpi/copyright
}

sha256sums=('SKIP')
sha256sums=('SKIP')