summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 004a810c3acce91f8ea79af1d793d35550e6b975 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Maintainer: Nihal Kumar <2tv8xupqg at mozmail dot com>
pkgname=contextpilot
pkgver=0.9.1
pkgrel=1
pkgdesc="Analyze Git blame information, infer code context, and index your codebase for deep, fine-grained search and navigation."
arch=('x86_64' 'aarch64')
url="https://github.com/krshrimali/context-pilot-rs"
license=('MIT')
depends=('git')
makedepends=('rust')
optdepends=('neovim: For neovim integration'
  'visual-studio-code-bin: For VSCode integration')
provides=("$pkgname")
conflicts=("$pkgname")
replaces=("context-pilot")
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('09ee999241b9098ace60ffcfbb137d860b581919d513a1450455a9b02fe52a5d')

prepare() {
  cd "$srcdir/context-pilot-rs-$pkgver"
  case "$CARCH" in
  armv7h) target="armv7-unknown-linux-gnueabihf" ;;
  aarch64) target="aarch64-unknown-linux-gnu" ;;
  *) target="$CARCH-unknown-linux-gnu" ;;
  esac
  cargo fetch --target "$target"
}

build() {
  cd "$srcdir/context-pilot-rs-$pkgver"
  cargo build --release
}

package() {
  cd "$srcdir/context-pilot-rs-$pkgver"
  install -Dm755 "target/release/contextpilot" "$pkgdir/usr/bin/$pkgname"
}