/
Portfile
61 lines (46 loc) · 2.1 KB
/
Portfile
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup golang 1.0
go.setup github.com/danielgtaylor/restish 0.20.0 v
github.tarball_from archive
revision 0
homepage https://rest.sh
description \
Restish is a CLI for interacting with REST-ish HTTP APIs with some nice \
features built-in
long_description \
{*}${description}, like always having the latest API resources, fields, \
and operations available when they go live on the API without needing to \
install or update anything.
categories devel
installs_libs no
license MIT
maintainers {gmail.com:herby.gillot @herbygillot} \
openmaintainer
checksums rmd160 d419c070df908f76ce4c9400afea745ad5c7478a \
sha256 0aebd5eaf4b34870e40c8b94a0cc84ef65c32fde32eddae48e9529c73a31176d \
size 314045
# Allow Go to fetch dependencies at build time.
go.offline_build no
build.pre_args-append \
-ldflags \"-X main.version=${version}\"
destroot {
xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/
file mkdir ${worksrcpath}/_completions
foreach _shell { bash fish zsh } {
system -W ${worksrcpath}/_completions \
"../${name} completion ${_shell} > ${name}.${_shell}"
}
# Install bash completion
xinstall -d ${destroot}${prefix}/share/bash-completion/completions
copy ${worksrcpath}/_completions/${name}.bash \
${destroot}${prefix}/share/bash-completion/completions/${name}
# Install zsh completion
xinstall -d ${destroot}${prefix}/share/zsh/site-functions
copy ${worksrcpath}/_completions/${name}.zsh \
${destroot}${prefix}/share/zsh/site-functions/_${name}
# Install fish completion
xinstall -d ${destroot}${prefix}/share/fish/vendor_completions.d
copy ${worksrcpath}/_completions/${name}.fish \
${destroot}${prefix}/share/fish/vendor_completions.d/${name}.fish
}