blob: 37264a9d2430703047f2d56bc3cdb433a44ce7d5 (
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
51
52
53
54
|
# Maintainer: Lexi <@alexis@foxgirl.land> (a fediverse address)
pkgname=catgirl-engine
pkgdesc="A game engine for cool moddability and procedurally generated data"
arch=('any')
url="https://github.com/lexi-the-cute/catgirl-engine"
license=(Zlib)
pkgver=0.12.52
pkgrel=21
conflicts=(catgirl-engine-git)
source=("$pkgname-$pkgver.tar.gz::https://static.crates.io/crates/$pkgname/$pkgname-$pkgver.crate")
b2sums=("SKIP")
options=(!strip !debug)
makedepends=(
"rustup"
"cargo-nightly"
"sed"
)
optdepends=(
"wayland: Graphics display server"
"xorg-server: Graphics display server"
)
# Generated in accordance to https://wiki.archlinux.org/title/Rust_package_guidelines.
# Might require further modification depending on the package involved.
prepare() {
cd "$pkgname-$pkgver"
rustup install nightly
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
export RUSTFLAGS="-L/usr/lib -lzstd"
export RUSTUP_TOOLCHAIN=nightly
export CARGO_TARGET_DIR=target
cd "$pkgname-$pkgver"
cargo build --frozen --release
}
check() {
export RUSTUP_TOOLCHAIN=nightly
cd "$pkgname-$pkgver"
cargo test --frozen
}
package() {
cd "$pkgname-$pkgver"
sed -i "s/\${engine_path}/\/usr\/bin\/$pkgname/" $pkgname.desktop
mv logo.png $pkgname.png
install -Dm0755 -t "$pkgdir/usr/share/icons/" "$pkgname.png"
install -Dm0755 -t "$pkgdir/usr/share/applications/" "$pkgname.desktop"
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
}
|