summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8f76c90d717ecf5648f66eaf37f4918895c12f90 (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
# Maintainer: Haochen Tong <i at hexchain dot org>

pkgname=elvish-git
_pkgname=elvish
pkgver=r1408.b86ff2e
pkgrel=1
pkgdesc="A novel Unix shell, aims to explore the potential of the Unix shell."
arch=('i686' 'x86_64')
url="https://github.com/elves/elvish"
license=('MIT')
makedepends=('git' 'go')
source=("git+https://github.com/elves/elvish.git")
md5sums=('SKIP')

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

prepare() {
    cd "$srcdir"

    mkdir -p build/src/github.com/elves
    ln -sf "$srcdir/$_pkgname" build/src/github.com/elves/
    export GOPATH="$srcdir/build"
}

build() {
    go get github.com/elves/elvish
}

package() {
    install -Dm755 "$srcdir/build/bin/elvish" -t "$pkgdir/usr/bin/"
    install -Dm644 "$srcdir/$_pkgname/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname/"
}