1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-08-26 20:48:13 +02:00

Split scripts/build*.sh into install and package scripts.

This commit is contained in:
Henrik Hautakoski 2022-08-19 13:17:32 +02:00
parent 3fce1f558b
commit f4a39783b1
No known key found for this signature in database
GPG key ID: 608414D93E862CCD
13 changed files with 252 additions and 197 deletions

View file

@ -2,9 +2,11 @@
GO = go
GOCCFLAGS = -v
GOLDFLAGS = -ldflags="-s -w"
PREFIX = /usr/local
PREFIX = /usr/local
PROGRAM_NAME=eosio-api-healthcheck
export GOOS = $(shell go env GOOS)
export GOARCH = $(shell go env GOARCH)
SOURCES=src/main.go src/server.go src/parse_request.go
.PHONY: all build/$(PROGRAM_NAME) clean
@ -18,18 +20,21 @@ build/$(PROGRAM_NAME) : $(SOURCES)
test:
$(GO) test -v ./...
info-file :
echo PACKAGE_NAME=\"$(PROGRAM_NAME)\" "\n"\
PACKAGE_DESCRIPTION=\"HAproxy healthcheck program for EOSIO API.\" "\n"\
PACKAGE_VERSION=\"1.2.2\" "\n"\
PACKAGE_PREFIX=\"$(PREFIX:/%=%)\" "\n"\
PACKAGE_PROGRAM=\"build/$(PROGRAM_NAME)\" > scripts/pkg_info
install: build
PREFIX=$(PREFIX) DESTDIR=$(DESTDIR) scripts/install.sh $(GOOS)
package_deb: info-file
./scripts/build.sh deb $(realpath build)
package:
PKGROOT=$(DESTDIR) BUILDDIR=$(realpath build) scripts/package.sh $(PKGTYPE)
package_freebsd: info-file
./scripts/build.sh freebsd $(realpath build)
package_debian: PKGTYPE = debian
package_debian: GOOS = linux
package_debian: DESTDIR = build/debroot
package_debian: install package
package_freebsd: PKGTYPE = freebsd
package_freebsd: GOOS = freebsd
package_freebsd: DESTDIR = build/freebsdroot
package_freebsd: install package
clean:
$(GO) clean