2024-10-11 16:37:06 +00:00
|
|
|
pkgver=0.4.7.r163
|
2024-10-11 16:35:40 +00:00
|
|
|
_name=asset-tool
|
|
|
|
pkgname=$_name-git
|
2024-08-25 00:03:53 +00:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc="A tool for quickly downloading many Roblox assets."
|
|
|
|
arch=('x86_64')
|
2024-10-11 16:35:40 +00:00
|
|
|
url="https://git.itzana.me/StrafesNET/$_name"
|
2024-08-25 00:06:52 +00:00
|
|
|
license=('MIT')
|
2024-08-25 00:03:53 +00:00
|
|
|
makedepends=('cargo')
|
2024-10-11 16:35:40 +00:00
|
|
|
source=("$pkgname::git+https://git.itzana.me/StrafesNET/$_name")
|
2024-08-25 00:03:53 +00:00
|
|
|
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
|
2024-10-11 16:35:40 +00:00
|
|
|
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$_name"
|
2024-08-25 00:03:53 +00:00
|
|
|
}
|