forked from ports/contrib
shfmt: initial commit, version 3.7.0
This commit is contained in:
parent
c933b87274
commit
83a68b52a3
3
shfmt/.footprint
Normal file
3
shfmt/.footprint
Normal file
@ -0,0 +1,3 @@
|
||||
drwxr-xr-x root/root usr/
|
||||
drwxr-xr-x root/root usr/bin/
|
||||
-rwxr-xr-x root/root usr/bin/shfmt
|
5
shfmt/.signature
Normal file
5
shfmt/.signature
Normal file
@ -0,0 +1,5 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF3w1nSyzxTwMR6D3Lg3oqHtsTrtKWBP7SiP1zkDxuHCiE91cMjImOT1AV0LYyUToBcy9LbupevAjA1rzbKdcmTQw=
|
||||
SHA256 (Pkgfile) = 4379dd20a6670932d4d03d96d7f9eb4f0250c631219bb9b7f2dc72fec274eefe
|
||||
SHA256 (.footprint) = e76b7841309fdb6e5426809ab65c17f8b3f56ace07ad3811e7110236b2a2043c
|
||||
SHA256 (shfmt-3.7.0.tar.gz) = 89eafc8790df93305dfa42233e262fb25e1c96726a3db420a7555abadf3111ed
|
35
shfmt/Pkgfile
Normal file
35
shfmt/Pkgfile
Normal file
@ -0,0 +1,35 @@
|
||||
# Description: A shell parser, formatter, and interpreter with bash support
|
||||
# URL: https://github.com/mvdan/sh
|
||||
# Maintainer: Tim Biermann, tbier at posteo dot de
|
||||
# Depends on: go
|
||||
# Optional: scdoc
|
||||
|
||||
name=shfmt
|
||||
version=3.7.0
|
||||
release=1
|
||||
source=(https://github.com/mvdan/sh/archive/v$version/$name-$version.tar.gz)
|
||||
|
||||
build() {
|
||||
cd sh-$version/cmd/shfmt
|
||||
|
||||
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||
export CGO_CFLAGS="${CFLAGS}"
|
||||
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||
export CGO_LDFLAGS="${LDFLAGS}"
|
||||
|
||||
mkdir "$PKGMK_SOURCE_DIR/gopath" || true
|
||||
export GOPATH="$PKGMK_SOURCE_DIR/gopath"
|
||||
|
||||
go build \
|
||||
-trimpath \
|
||||
-buildmode=pie \
|
||||
-mod=readonly \
|
||||
-modcacherw \
|
||||
-o shfmt .
|
||||
|
||||
install -Dm755 shfmt $PKG/usr/bin/shfmt
|
||||
if prt-get isinst scdoc; then
|
||||
scdoc < shfmt.1.scd | gzip > shfmt.1.gz
|
||||
install -Dm644 -t $PKG/usr/share/man/man1/ shfmt.1.gz
|
||||
fi
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user