pkgname=sniprun pkgver=1.3.20 pkgrel=1 pkgdesc="A neovim plugin to run lines/blocs of code (independently of the rest of the file), supporting multiples languages" arch=('x86_64') url="https://github.com/michaelb/sniprun" license=('MIT') makedepends=('cargo' 'gcc-libs') provides=('sniprun') options=('!lto' '!debug') source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz") sha512sums=('84870f2c70843070673ffae394832042c37e9183d95f3f120eb62b1080df5717f3c401937aec2cc560586b8c4d3dfa152de4ec41f291e4c950c1c9a3196244fd') build() { export RUSTFLAGS="-C force-frame-pointers=yes -C target-cpu=native" cd "${pkgname}-${pkgver}" cargo build --release --frozen } package() { install -Dm 755 "${srcdir}/${pkgname}-${pkgver}/target/release/sniprun" "${pkgdir}/usr/bin/sniprun" install -Dm 644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname" }