pantry/projects/micro-editor.github.io/package.yml
Max Howell 81e7a5e16f
pkgx
2023-10-01 14:44:42 -04:00

32 lines
895 B
YAML

distributable:
url: https://github.com/zyedidia/micro/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1
versions:
github: zyedidia/micro/tags
strip: /^v/
provides:
- bin/micro
build:
dependencies:
go.dev: ^1.16
script: |
mkdir -p "{{ prefix }}"/{bin,share/man/man1}
go build -ldflags "$LDFLAGS -X 'github.com/zyedidia/micro/v2/internal/util.CompileDate=$(go run tools/build-date.go)'" ./cmd/micro
install -m755 micro "{{ prefix }}"/bin
cp assets/packaging/micro.1 "{{ prefix }}"/share/man/man1
env:
LDFLAGS:
- -s
- -w
- -X github.com/zyedidia/micro/v2/internal/util.Version={{ version }}
linux:
LDFLAGS:
- -buildmode=pie
GOOS: $(go env GOHOSTOS)
ADDITIONAL_GO_LINKER_FLAGS: $(go run tools/info-plist.go $GOOS {{ version }})
GOARCH: $(go env GOHOSTARCH)
test: micro -version | grep {{ version }}