From e6599fdf7bbe34cb0f86f60e6c2defa1cdb8568b Mon Sep 17 00:00:00 2001 From: Michal Date: Sat, 23 Jul 2022 01:22:00 +0100 Subject: [PATCH] Fixed up PKGBUILD --- PKGBUILD | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index c4860ce..723b626 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,24 +1,36 @@ -# Maintainer: Matt C +# Maintainer: Matt C +# Maintainer: Michal S +# Developer: Michal S pkgname=malachite pkgver=2.0.0 pkgrel=1 pkgdesc="Tool for packaging and maintaining pacman repositories" -license=('GPL3') -arch=('any') +arch=('x86_64') url="https://github.com/crystal-linux/malachite" +license=('GPL3') source=("git+$url") sha256sums=('SKIP') depends=('git' 'pacman-contrib' 'gnupg') makedepends=('cargo') +prepare() { + cd "$srcdir/$pkgname" + cargo fetch --locked --target "$CARCH-unknown-linux-gnu" +} + build() { - cd ${srcdir}/malachite - cargo build --release + cd "$srcdir/$pkgname" + export RUSTUP_TOOLCHAIN=stable + export CARGO_TARGET_DIR=target + cargo build --frozen --release --all-features } package() { - mkdir -p $pkgdir/usr/bin - chmod +x ${srcdir}/malachite/target/release/mlc - cp ${srcdir}/malachite/target/release/mlc $pkgdir/usr/bin/. -} + cd "$srcdir/$pkgname" + find target/release \ + -maxdepth 1 \ + -executable \ + -type f \ + -exec install -Dm0755 -t "${pkgdir}/usr/bin" {} + +} \ No newline at end of file