# Maintainer: Daniel M. Capella # Contributor: Sergey A. pkgname=rust-analyzer _pkgver=2023-05-15 pkgver=${_pkgver//-} pkgrel=1 pkgdesc='Rust compiler front-end for IDEs' arch=('x86_64') url=https://rust-analyzer.github.io/ license=('Apache' 'MIT') depends=('gcc-libs' 'rust-src') makedepends=('git') source=("git+https://github.com/rust-lang/$pkgname.git#tag=$_pkgver") b2sums=('SKIP') # Use LTO export CARGO_PROFILE_RELEASE_LTO=true CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 # Use debug export CARGO_PROFILE_RELEASE_DEBUG=2 prepare() { cd $pkgname cargo fetch --locked --target "$CARCH-unknown-linux-gnu" } build() { cd $pkgname CFG_RELEASE=1 cargo build --release --locked --offline } package() { cd $pkgname install -Dt "$pkgdir"/usr/bin target/release/$pkgname install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE-MIT }