blob: 777b2909b069852056d71c3078fa55d64bfdcf5e (
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=hopp-cli-git
_pkgname=hopp-cli
pkgver=r81.ae389ad
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=(
"git"
"go")
provides=("hopp-cli")
source=(
"git+https://github.com/hoppscotch/hopp-cli.git"
)
sha256sums=("SKIP")
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 -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}"
install -D "build/${_pkgname}" "${pkgdir}/usr/local/bin/${_pkgname}"
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
}
|