fixes freebsd package
This commit is contained in:
parent
c833c1d5e5
commit
3bd43bfc7a
|
|
@ -12,7 +12,6 @@ builds:
|
||||||
binary: unpoller
|
binary: unpoller
|
||||||
goos:
|
goos:
|
||||||
- linux
|
- linux
|
||||||
- freebsd
|
|
||||||
goarch:
|
goarch:
|
||||||
- amd64
|
- amd64
|
||||||
- "386"
|
- "386"
|
||||||
|
|
@ -20,8 +19,22 @@ builds:
|
||||||
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser -X "golift.io/version.Version={{.Version}}" -X "golift.io/version.Branch={{.Branch}} ({{.Commit}})" -X "golift.io/version.BuildDate={{.Date}}" -X "golift.io/version.BuildUser=goreleaser" -X "golift.io/version.Revision=1"
|
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser -X "golift.io/version.Version={{.Version}}" -X "golift.io/version.Branch={{.Branch}} ({{.Commit}})" -X "golift.io/version.BuildDate={{.Date}}" -X "golift.io/version.BuildUser=goreleaser" -X "golift.io/version.Revision=1"
|
||||||
ignore:
|
ignore:
|
||||||
- goamd64: v4
|
- goamd64: v4
|
||||||
- goos: freebsd
|
- id: unpoller-freebsd
|
||||||
goarch: "386"
|
env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
binary: usr/local/bin/unpoller
|
||||||
|
goos:
|
||||||
|
- freebsd
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
- arm
|
||||||
|
goarm:
|
||||||
|
- "7"
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser -X "golift.io/version.Version={{.Version}}" -X "golift.io/version.Branch={{.Branch}} ({{.Commit}})" -X "golift.io/version.BuildDate={{.Date}}" -X "golift.io/version.BuildUser=goreleaser" -X "golift.io/version.Revision=1"
|
||||||
|
ignore:
|
||||||
|
- goamd64: v4
|
||||||
- id: unpoller-mac
|
- id: unpoller-mac
|
||||||
env:
|
env:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
|
|
@ -98,15 +111,41 @@ archives:
|
||||||
- rsrc_windows_*.syso
|
- rsrc_windows_*.syso
|
||||||
- examples/up.*.example
|
- examples/up.*.example
|
||||||
- init/windows/application.ico
|
- init/windows/application.ico
|
||||||
- id: unpoller-txz
|
- id: unpoller-freebsd-pkg
|
||||||
builds:
|
builds:
|
||||||
- unpoller
|
- unpoller-freebsd
|
||||||
format: tar.xz
|
format: tar.xz
|
||||||
name_template:
|
wrap_in_directory: false
|
||||||
files:
|
files:
|
||||||
- LICENSE
|
# config files
|
||||||
- README.md
|
- src: "examples/up.conf.example"
|
||||||
- examples/up.*.example
|
dst: "usr/local/etc/unpoller"
|
||||||
|
strip_parent: true
|
||||||
|
- src: "examples/up.json.example"
|
||||||
|
dst: "usr/local/etc/unpoller"
|
||||||
|
strip_parent: true
|
||||||
|
- src: "examples/up.yaml.example"
|
||||||
|
dst: "usr/local/etc/unpoller"
|
||||||
|
strip_parent: true
|
||||||
|
# docs
|
||||||
|
- src: "README.html"
|
||||||
|
dst: "usr/local/share/doc/unpoller/"
|
||||||
|
strip_parent: true
|
||||||
|
- src: "unpoller_manual.html"
|
||||||
|
dst: "usr/local/share/doc/unpoller/"
|
||||||
|
strip_parent: true
|
||||||
|
- src: LICENSE
|
||||||
|
dst: "usr/local/share/doc/unpoller/"
|
||||||
|
strip_parent: true
|
||||||
|
- src: "unpoller.1.gz"
|
||||||
|
dst: usr/local/share/man/man1
|
||||||
|
strip_parent: true
|
||||||
|
- src: "init/bsd/freebsd.rc.d"
|
||||||
|
dst: usr/local/etc/rc.d
|
||||||
|
strip_parent: true
|
||||||
|
info:
|
||||||
|
mode: 755
|
||||||
|
|
||||||
|
|
||||||
dockers:
|
dockers:
|
||||||
- id: docker-linux-amd64
|
- id: docker-linux-amd64
|
||||||
|
|
|
||||||
4
Makefile
4
Makefile
|
|
@ -65,5 +65,5 @@ build: clean
|
||||||
goreleaser release --rm-dist --skip-validate --skip-publish --skip-sign --debug
|
goreleaser release --rm-dist --skip-validate --skip-publish --skip-sign --debug
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
git clean -xdf
|
git clean -xdf || true
|
||||||
docker images -f "dangling=true" -q | xargs docker rmi
|
(docker images -f "dangling=true" -q | xargs docker rmi) || true
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ real_name="unpoller"
|
||||||
rcvar="unpoller_enable"
|
rcvar="unpoller_enable"
|
||||||
unpoller_command="/usr/local/bin/${real_name}"
|
unpoller_command="/usr/local/bin/${real_name}"
|
||||||
unpoller_user="unpoller"
|
unpoller_user="unpoller"
|
||||||
unpoller_config="/usr/local/etc/${real_name}/{{CONFIG_FILE}}"
|
unpoller_config="/usr/local/etc/${real_name}/up.conf"
|
||||||
pidfile="/var/run/${real_name}/pid"
|
pidfile="/var/run/${real_name}/pid"
|
||||||
|
|
||||||
# This runs `daemon` as the `unpoller_user` user.
|
# This runs `daemon` as the `unpoller_user` user.
|
||||||
|
|
@ -27,6 +27,10 @@ load_rc_config ${name}
|
||||||
mkdir -p $(dirname ${pidfile})
|
mkdir -p $(dirname ${pidfile})
|
||||||
chown -R $unpoller_user $(dirname ${pidfile})
|
chown -R $unpoller_user $(dirname ${pidfile})
|
||||||
|
|
||||||
|
# ensure log directory exists
|
||||||
|
mkdir -p /usr/local/var/log/${real_name}
|
||||||
|
chown -R $unpoller_user /usr/local/var/log/${real_name}
|
||||||
|
|
||||||
# Suck in optional exported override variables.
|
# Suck in optional exported override variables.
|
||||||
# ie. add something like the following to this file: export UP_POLLER_DEBUG=true
|
# ie. add something like the following to this file: export UP_POLLER_DEBUG=true
|
||||||
[ -f "/usr/local/etc/defaults/${real_name}" ] && . "/usr/local/etc/defaults/${real_name}"
|
[ -f "/usr/local/etc/defaults/${real_name}" ] && . "/usr/local/etc/defaults/${real_name}"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue