commit 64f71ebb57af592f5c6a1903e87c781b79d6d15b Author: Quaternions Date: Sat Aug 24 17:03:53 2024 -0700 Initial commit diff --git a/asset-tool/PKGBUILD b/asset-tool/PKGBUILD new file mode 100644 index 0000000..ea08774 --- /dev/null +++ b/asset-tool/PKGBUILD @@ -0,0 +1,48 @@ +pkgname=asset-tool +pkgver=0.4.5.r148 +pkgrel=1 +pkgdesc="A tool for quickly downloading many Roblox assets." +arch=('x86_64') +url="https://git.itzana.me/StrafesNET/asset-tool" +license=('MPL2') +makedepends=('cargo') +source=("$pkgname::git+file:///home/quat/strafesnet/asset-tool") +sha256sums=('SKIP') + +pkgver() { + cd "$pkgname" + + # Parse Cargo.toml to get version number + local version=$(grep -oP 'version\s*=\s*"\K[^"]+' 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 +} + +check() { + cd $pkgname + export RUSTUP_TOOLCHAIN=stable + cargo test --frozen --all-features +} + +package() { + cd $pkgname + install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname" +} diff --git a/map-tool/PKGBUILD b/map-tool/PKGBUILD new file mode 100644 index 0000000..248b3a4 --- /dev/null +++ b/map-tool/PKGBUILD @@ -0,0 +1,47 @@ +pkgname=map-tool +pkgver=1.5.1.r101 +pkgrel=1 +pkgdesc="A tool for working with bhop and surf maps." +arch=('x86_64') +url="https://git.itzana.me/StrafesNET/map-tool" +license=('MPL2') +makedepends=('cargo') +source=("$pkgname::git+file:///home/quat/strafesnet/map-tool") +sha256sums=('SKIP') + +pkgver() { + cd "$pkgname" + + # Parse Cargo.toml to get version number + local version=$(grep -oP 'version\s*=\s*"\K[^"]+' 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 +} + +check() { + cd $pkgname + export RUSTUP_TOOLCHAIN=stable + cargo test --frozen --all-features +} + +package() { + cd $pkgname + install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname" +} diff --git a/mapfixer/PKGBUILD b/mapfixer/PKGBUILD new file mode 100644 index 0000000..e795cd2 --- /dev/null +++ b/mapfixer/PKGBUILD @@ -0,0 +1,47 @@ +pkgname=mapfixer +pkgver=1.1.1.r111 +pkgrel=1 +pkgdesc="A tool for reviewing bhop and surf maps." +arch=('x86_64') +url="https://git.itzana.me/StrafesNET/mapfixer" +license=('MPL2') +makedepends=('cargo') +source=("$pkgname::git+file:///home/quat/strafesnet/mapfixer") +sha256sums=('SKIP') + +pkgver() { + cd "$pkgname" + + # Parse Cargo.toml to get version number + local version=$(grep -oP 'version\s*=\s*"\K[^"]+' 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 +} + +check() { + cd $pkgname + export RUSTUP_TOOLCHAIN=stable + cargo test --frozen --all-features +} + +package() { + cd $pkgname + install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname" +}