summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e9fef39e19655e4b8e16595daef62d87ba6bfeae (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
# Maintainer: fk29g <fk29g.uphill912@slmails.com>
_projectname=codegrab
pkgname=$_projectname-git
pkgrel=1
pkgver=r68.39cea2c
pkgdesc="CLI and TUI for selecting and bundling code into a single, LLM-ready output file"
arch=("x86_64")
url="https://github.com/epilande/codegrab"
license=('MIT')
makedepends=("go" "git")
provides=("codegrab")
conflicts=("codegrab")
source=(git+$url.git)
sha256sums=("SKIP")

pkgver() {
    cd $_projectname
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd $_projectname
    go build ./cmd/grab
}

package() {
    cd $_projectname
    install -Dm 755 grab "$pkgdir/usr/bin/grab"
    install -Dm 644 LICENSE "$pkgdir/usr/share/licences/$_projectname/LICENSE"
    install -Dm 644 README.md "$pkgdir/usr/share/doc/$_projectname/README.md"
}