# Maintainer: Maymall <tung1trump@gmail.com>
# In-repo copy of the AUR rgfile-bin PKGBUILD. The canonical package lives at
# https://aur.archlinux.org/packages/rgfile-bin — keep both in sync on release.
pkgname=rgfile-bin
pkgver=0.5.1
pkgrel=1
pkgdesc="Fast, robust command-line client for GigaFile.nu (prebuilt binary)"
arch=('x86_64')
url="https://github.com/Maymall/gigafile-rust-cli"
license=('GPL-3.0-only')
provides=('rgfile')
conflicts=('rgfile')
source=("$url/releases/download/v$pkgver/rgfile-$pkgver-x86_64-unknown-linux-gnu.tar.gz")
sha256sums=('332a1a1ab4ebbc9b5947ea306ed0154d21c0c0824fc8069fcd1d9fa294dbfa92')

package() {
    local dir="rgfile-$pkgver-x86_64-unknown-linux-gnu"
    install -Dm755 "$srcdir/$dir/rgfile" "$pkgdir/usr/bin/rgfile"
    install -Dm644 "$srcdir/$dir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
    install -Dm644 "$srcdir/$dir/NOTICE.md" "$pkgdir/usr/share/licenses/$pkgname/NOTICE.md"
    install -Dm644 "$srcdir/$dir/README.md" "$pkgdir/usr/share/doc/$pkgname/README.md"
}
