blob: d6e74c3adb11990a3ccbc62dc2c4da2ccdb9c6e2 (
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
45
46
47
48
49
50
|
# Maintainer: Attila Fidan <archlinux-buildsystem@print0.net>
pkgname=panamax-git
_gitname=${pkgname%-git}
pkgver=r194.2024b5b
pkgrel=1
pkgdesc="Mirror rustup and crates.io repositories, for offline Rust and cargo usage"
url="https://github.com/panamax-rs/panamax"
license=("Apache-2.0 AND MIT")
arch=(x86_64)
depends=(git)
makedepends=(cargo)
provides=("panamax=$pkgver")
conflicts=(panamax)
source=("git+$url.git")
b2sums=(SKIP)
prepare() {
cd "$_gitname"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
pkgver() {
cd "$_gitname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}
build() {
cd "$_gitname"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release
}
check() {
cd "$_gitname"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen
}
package() {
cd "$_gitname"
install -Dm0755 "target/release/panamax" -t "$pkgdir/usr/bin/"
install -Dm644 LICENSE-APACHE -t "$pkgdir/usr/share/licenses/$pkgname/"
install -Dm644 LICENSE-MIT -t "$pkgdir/usr/share/licenses/$pkgname/"
}
|