_name="hl-zed-dc-rpc" pkgname="$_name-git" pkgver=r4.30034b9 pkgrel=1 pkgdesc="zed discord rpc for the poor, and only for hyprland (but it like actually works)" url="https://copeberg.org/virt/$_name" license=(GPL-3.0) arch=(x86_64) makedepends=('cargo-nightly') optdepends=('hyprland: this will not do anything without hyprland') source=("$_name::git+$url.git") md5sums=('SKIP') pkgver() { cd $_name printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { cd $_name export RUSTUP_TOOLCHAIN=nightly cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" } build() { cd $_name export RUSTUP_TOOLCHAIN=nightly cargo build --frozen --release } package() { cd $_name install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$_name" }