# Maintainer: Reflex Contributors
pkgname=reflex-bin
pkgver=0.2.10
pkgrel=1
pkgdesc="A local-first, structure-aware code search engine for AI agents"
arch=('x86_64' 'aarch64')
url="https://github.com/reflex-search/reflex"
license=('MIT' 'Apache-2.0')
provides=('reflex')
conflicts=('reflex')

source_x86_64=("${pkgname}-${pkgver}-x86_64::https://github.com/reflex-search/reflex/releases/download/v${pkgver}/rfx-linux-x64")
source_aarch64=("${pkgname}-${pkgver}-aarch64::https://github.com/reflex-search/reflex/releases/download/v${pkgver}/rfx-linux-arm64")

sha256sums_x86_64=('SKIP')  # Will be updated by updpkgsums
sha256sums_aarch64=('SKIP')  # Will be updated by updpkgsums

package() {
    if [ "$CARCH" = "x86_64" ]; then
        install -Dm755 "${pkgname}-${pkgver}-x86_64" "${pkgdir}/usr/bin/rfx"
    elif [ "$CARCH" = "aarch64" ]; then
        install -Dm755 "${pkgname}-${pkgver}-aarch64" "${pkgdir}/usr/bin/rfx"
    fi
}
