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:
parent
3fce1f558b
commit
f4a39783b1
13 changed files with 252 additions and 197 deletions
29
Makefile
29
Makefile
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue