summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 17c144446457258f8e3e5fb9e409fafb8ecfcfdd (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
38
39
40
41
42
# Maintainer: Sabu Siyad <ssiyad at disroot dot org>
# This PKGBUILD is maintained at https://github.com/ssiyad/pkgbuilds/

pkgname=shelby-git
_pkgname=shelby
pkgver=r139.281761c
pkgrel=1
pkgdesc="A fast, lightweight, minimal, shell prompt written in Go"
arch=('x86_64')
url="https://github.com/athul/shelby"
license=("GPL3")
makedepends=(
        "git"
        "go")
provides=("shelby")
source=(
    "git+https://github.com/athul/shelby.git"
)
sha256sums=("SKIP")
conflicts=("shelby-bin")

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

prepare() {
    cd "${srcdir}/${_pkgname}"
    mkdir -pv build/
}

build() {
    cd "${srcdir}/${_pkgname}"
    go get -v
    go build -o build
}

package() {
    cd "${srcdir}/${_pkgname}"
    install -D "build/${_pkgname}" "${pkgdir}/usr/local/bin/shelby"
    install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}