diff options
author | Jeff Dickey | 2022-09-04 22:21:51 -0500 |
---|---|---|
committer | Jeff Dickey | 2022-09-04 22:21:51 -0500 |
commit | 00ee4f6c02743960c4cb82d03a405700542c1334 (patch) | |
tree | bdd214afe98957d7ee7b64aa0116c4517ef48933 | |
parent | 701c97054535908b9eb04befbc6e1b9cdb21f27c (diff) | |
download | aur-00ee4f6c02743960c4cb82d03a405700542c1334.tar.gz |
switch to tarballs instead of HEAD
-rw-r--r-- | PKGBUILD | 39 |
1 files changed, 23 insertions, 16 deletions
@@ -7,33 +7,40 @@ pkgdesc='Cross-platform binary shims with optional remote fetching' arch=('x86_64' 'aarch64') url='https://chim.sh' license=('MIT') -makedepends=('cargo' 'git') +makedepends=('cargo' 'jq') provides=('chim') conflicts=('chim') -source=("git+https://github.com/jdxcode/chim.git") -md5sums=('SKIP') - -pkgver() { - cd $pkgname - printf "%s" "$(git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g')" -} +source=("$pkgname-$pkgver.tar.gz::https://github.com/jdxcode/$pkgname/archive/v$pkgver.tar.gz") +sha512sums=('725ed27c09be809a592a3eccef7de3f161db2393a4b67b60538d8d2cd4f39221e91dd3465636343ed4b5d2f5dc422eff52380ea852024cfce4b38c6797acd095') prepare() { - cd $pkgname + cd "$pkgname-$pkgver" + cargo fetch --locked --target "$CARCH-unknown-linux-gnu" } build() { - cd $pkgname + cd "$pkgname-$pkgver" + export RUSTUP_TOOLCHAIN=stable export CARGO_TARGET_DIR=target - cargo build --frozen --release + cargo build --release --locked --message-format=json-render-diagnostics | + jq -r 'select(.out_dir) | select(.package_id | startswith("ripgrep ")) | .out_dir' > out_dir } package() { - cd $pkgname - install -Dm755 "target/release/$pkgname" \ - -t "$pkgdir/usr/bin" - install -Dm644 LICEN?E \ - "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + cd "$pkgname-$pkgver" + local OUT_DIR=$(<out_dir) + + install -Dm755 "target/release/$pkgname" -t "$pkgdir/usr/bin" + + install -Dm644 "README.md" "$pkgdir/usr/share/doc/$pkgname/README.md" + install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + +check() { + cd "$pkgname-$pkgver" + + export RUSTUP_TOOLCHAIN=stable + cargo test --locked } |