create strafe-client-git
This commit is contained in:
parent
d63901a77b
commit
6130d87a40
58
strafe-client-git/PKGBUILD
Normal file
58
strafe-client-git/PKGBUILD
Normal file
@ -0,0 +1,58 @@
|
||||
name=strafe-client
|
||||
binname=${name}
|
||||
pkgname=${name}-git
|
||||
pkgver=0.11.0.r1207
|
||||
pkgrel=1
|
||||
pkgdesc="A tool for quickly downloading many Roblox assets."
|
||||
arch=('x86_64')
|
||||
url="https://git.itzana.me/StrafesNET/strafe-project"
|
||||
license=('MIT')
|
||||
makedepends=('cargo')
|
||||
source=(
|
||||
"$pkgname::git+https://git.itzana.me/StrafesNET/strafe-project"
|
||||
"strafe-client.desktop"
|
||||
)
|
||||
sha256sums=(
|
||||
'SKIP'
|
||||
'c064e14fcf577bfcfd5926c090a7b15f1b0c87107cb0b0a754531996afafe377'
|
||||
)
|
||||
|
||||
pkgver() {
|
||||
cd "$pkgname"
|
||||
|
||||
# Parse Cargo.toml to get version number
|
||||
local version=$(grep -oP 'version\s*=\s*"\K[^"]+' strafe-client/Cargo.toml | head -n 1)
|
||||
|
||||
# Get git revision number
|
||||
local revision=$(git rev-list --count HEAD)
|
||||
|
||||
# Combine version and revision to form PKGBUILD version string
|
||||
echo "${version}.r${revision}"
|
||||
}
|
||||
|
||||
|
||||
prepare() {
|
||||
cd $pkgname
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $pkgname
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
export CARGO_TARGET_DIR=target
|
||||
cargo build --frozen --release --all-features --bin $binname
|
||||
}
|
||||
|
||||
check() {
|
||||
cd $pkgname
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
cargo test --frozen --all-features
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $pkgname
|
||||
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$binname"
|
||||
install -D -m 0644 "$srcdir/${name}.desktop" "$pkgdir/usr/share/applications/${name}.desktop"
|
||||
install -D -m 0644 "logo.png" "$pkgdir/usr/share/icons/hicolor/128x128/apps/${name}.png"
|
||||
}
|
9
strafe-client-git/strafe-client.desktop
Normal file
9
strafe-client-git/strafe-client.desktop
Normal file
@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Comment=In development client for jumping on squares (and riding on triangles)
|
||||
Exec=/usr/bin/strafe-client
|
||||
Icon=strafe-client
|
||||
Name=Strafe Client
|
||||
StartupNotify=true
|
||||
Terminal=true
|
||||
Type=Application
|
||||
Categories=Game;
|
Loading…
x
Reference in New Issue
Block a user