# Maintainer: Your Name <your.email@example.com>
pkgname=gloom
pkgver=0.1.0
pkgrel=1
pkgdesc="High-performance CLI for Google Cloud Context & ADC Switching"
arch=('any')
url="https://github.com/hilmanmustofaa/gloom"
license=('MIT')
depends=(
    'python>=3.10'
    'python-typer'
    'python-rich'
    'python-pydantic'
)
makedepends=(
    'python-build'
    'python-installer'
    'python-wheel'
    'python-hatchling'
)
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/hilmanmustofaa/gloom/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('SKIP')  # Update with actual checksum

build() {
    cd "$srcdir/${pkgname}-${pkgver}"
    python -m build --wheel --no-isolation
}

package() {
    cd "$srcdir/${pkgname}-${pkgver}"
    python -m installer --destdir="$pkgdir" dist/*.whl

    # Install license
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

    # Install shell completions (optional)
    install -d "$pkgdir/usr/share/zsh/site-functions"
    install -d "$pkgdir/usr/share/bash-completion/completions"
}
