blob: 3a1811f4f6f763f9ac1d88bb8af86c59688d395c (
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: Caleb Maclennan <caleb@alerque.com>
pkgname=teracli
_pkgname=tera-cli # upstream repo conflicts with a different project on crates.io
pkgver=0.4.0
pkgrel=1
pkgdesc='A utility on top of the tera templating engine, takes json|yaml|toml|ENV as input'
arch=(x86_64)
url="https://github.com/chevdor/$_pkgname"
license=(MIT)
depends=(gcc-libs
glibc)
makedepends=(cargo)
conflicts=($_pkgname)
_archive="$_pkgname-$pkgver"
source=("$url/archive/v$pkgver/$_archive.tar.gz")
sha256sums=('d97876b2a56c77ba18b0dae8f50b9c4a83a34026aa2b40ff2be943b05f5c0e91')
prepare() {
cd "$_archive"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
_srcenv() {
cd "$_archive"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
}
build() {
_srcenv
cargo build --frozen --release --all-features
}
check() {
_srcenv
cargo test --frozen --all-features
}
package() {
cd "$_archive"
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/tera"
install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
}
|