2019-12-30 13:14:00 +00:00
|
|
|
# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
|
2020-04-25 09:51:42 +00:00
|
|
|
pkgname=hello-world-rust
|
2023-02-16 16:50:22 +00:00
|
|
|
pkgver=0.1.1
|
2023-08-06 13:40:14 +00:00
|
|
|
pkgrel=1
|
2019-12-30 13:14:00 +00:00
|
|
|
pkgdesc="Small test program for (cross) compiling rust"
|
|
|
|
url="https://gitlab.com/ollieparanoid/hello-world-rust/"
|
|
|
|
arch="all"
|
|
|
|
license="Unlicense"
|
|
|
|
makedepends="cargo"
|
|
|
|
source="https://gitlab.com/ollieparanoid/hello-world-rust/-/archive/$pkgver/hello-world-rust-$pkgver.tar.bz2"
|
|
|
|
|
2022-10-24 13:05:56 +00:00
|
|
|
[ "$CARCH" = "riscv64" ] && options="$options textrels"
|
|
|
|
|
2019-12-30 13:14:00 +00:00
|
|
|
build() {
|
2023-08-06 13:40:14 +00:00
|
|
|
export CROSSDIRECT_DEBUG=1
|
|
|
|
cargo build --release --locked --verbose --verbose
|
2019-12-30 13:14:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
|
|
|
printf 'Hello, world!\n' > expected
|
|
|
|
target/release/hello_world_rust > real
|
|
|
|
diff -q expected real
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2023-08-06 13:40:14 +00:00
|
|
|
install -Dm755 target/release/hello_world_rust \
|
|
|
|
-t "$pkgdir"/usr/bin/
|
2019-12-30 13:14:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sha512sums="b755b02529e6ad40a969d5d563bc28be1202c8008661b72335c8c9e6f06bc5f0220fa047f5444b552815df5184c3ab86eb2f6a4f70701962fa0d4bc9a25ab259 hello-world-rust-0.1.1.tar.bz2"
|