summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 22ad8766629286dec08434c481f210057b1b69ca (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
# Maintainer: Sabu Siyad <ssiyad at disroot dot org>
# This PKGBUILD is maintained at https://github.com/ssiyad/pkgbuilds/

pkgname=hopp-cli
pkgver=0.0.8
pkgrel=1
pkgdesc="HTTP client like cURL / HTTPie and a CLI client for https://hoppscotch.io"
arch=('x86_64')
url="https://github.com/hoppscotch/hopp-cli"
license=("MIT")
makedepends=("go")
provides=("hopp-cli")
source=(
    "https://github.com/hoppscotch/hopp-cli/archive/v${pkgver}.tar.gz"
)
sha256sums=("SKIP")

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

build() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    go get -v -u github.com/knadh/stuffbin/...
    go build -o build/${pkgname} -ldflags="-s -w -X 'main.buildVersion=${pkgver}'" *.go
    stuffbin -a stuff -in build/${pkgname} -out build/${pkgname} ./templates/index.html ./templates/template.md:/template.md
}

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