summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4ce7c95ebc9fd6e3395338cc2380e6c00979b887 (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: Jan Waś <janek.jan at gmail com>
# Maintainer: Nicolas Martyanoff <nicolas@n16f.net>

pkgname="jp"
pkgver="0.2.1"
pkgrel="1"
pkgdesc="Command line interface to JMESPath"
arch=("x86_64")
url="https://github.com/jmespath/jp"
license=("Apache")
makedepends=("go" "git")
options=("!strip" "!emptydirs")
source=("jp::git+https://github.com/jmespath/jp#tag=0.2.1")
sha512sums=("SKIP")

build() {
    tempgopath="$(pwd)/go"
    jppath="${tempgopath}/src/github.com/jmespath"
    fakerepo="$jppath/jp"
    mkdir -p $jppath
    ln -s "$(pwd)/${pkgname}" "$jppath/jp"
    export GOPATH="$tempgopath"
    cd "$fakerepo"
    go build
}

package() {
    cd "${pkgname}"
    install -Dm755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}