mirror of
https://github.com/cloudflare/gortr.git
synced 2024-05-19 06:50:10 +00:00
Add RTRdump to Makefile for packaging for #43
This commit is contained in:
@ -26,6 +26,10 @@ jobs:
|
||||
- GOOS=darwin make build-gortr
|
||||
- GOOS=windows EXTENSION=.exe make build-gortr
|
||||
- make package-deb-gortr package-rpm-gortr
|
||||
- GOOS=linux make build-rtrdump
|
||||
- GOOS=darwin make build-rtrdump
|
||||
- GOOS=windows EXTENSION=.exe make build-rtrdump
|
||||
- make package-deb-rtrdump package-rpm-rtrdump
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key:
|
||||
|
35
Makefile
35
Makefile
@ -15,7 +15,11 @@ DESCRIPTION := GoRTR: a RPKI-to-Router server
|
||||
BUILDINFOS := ($(shell date +%FT%T%z)$(BUILDINFOSDET))
|
||||
LDFLAGS := '-X main.version=$(GORTR_VERSION) -X main.buildinfos=$(BUILDINFOS)'
|
||||
|
||||
RTRDUMP_NAME := rtrdump
|
||||
DESCRIPTION_RTRDUMP := RTRdump: a RPKI-to-Router client to debug a feed
|
||||
|
||||
OUTPUT_GORTR := $(DIST_DIR)gortr-$(GORTR_VERSION)-$(GOOS)-$(ARCH)$(EXTENSION)
|
||||
OUTPUT_RTRDUMP := $(DIST_DIR)rtrdump-$(GORTR_VERSION)-$(GOOS)-$(ARCH)$(EXTENSION)
|
||||
|
||||
.PHONY: vet
|
||||
vet:
|
||||
@ -42,10 +46,18 @@ dist-key: prepare
|
||||
build-gortr: prepare
|
||||
go build -ldflags $(LDFLAGS) -o $(OUTPUT_GORTR) cmd/gortr/gortr.go
|
||||
|
||||
.PHONY: build-rtrdump
|
||||
build-rtrdump:
|
||||
go build -ldflags $(LDFLAGS) -o $(OUTPUT_RTRDUMP) cmd/rtrdump/rtrdump.go
|
||||
|
||||
.PHONY: docker-gortr
|
||||
docker-gortr:
|
||||
docker build -t $(DOCKER_REPO)$(GORTR_NAME):$(GORTR_VERSION) --build-arg LDFLAGS=$(LDFLAGS) -f Dockerfile.gortr .
|
||||
|
||||
.PHONY: docker-rtrdump
|
||||
docker-rtrdump:
|
||||
docker build -t $(DOCKER_REPO)$(RTRDUMP_NAME):$(GORTR_VERSION) --build-arg LDFLAGS=$(LDFLAGS) -f Dockerfile.rtrdump .
|
||||
|
||||
.PHONY: package-deb-gortr
|
||||
package-deb-gortr: prepare
|
||||
fpm -s dir -t deb -n $(GORTR_NAME) -v $(VERSION_PKG) \
|
||||
@ -71,4 +83,25 @@ package-rpm-gortr: prepare
|
||||
$(OUTPUT_GORTR)=/usr/bin/gortr \
|
||||
package/gortr.service=/lib/systemd/system/gortr.service \
|
||||
package/gortr.env=/etc/default/gortr \
|
||||
cmd/gortr/cf.pub=/usr/share/gortr/cf.pub
|
||||
cmd/gortr/cf.pub=/usr/share/gortr/cf.pub
|
||||
|
||||
.PHONY: package-deb-rtrdump
|
||||
package-deb-rtrdump:
|
||||
fpm -s dir -t deb -n $(RTRDUMP_NAME) -v $(VERSION_PKG) \
|
||||
--description "$(DESCRIPTION_RTRDUMP)" \
|
||||
--url "$(URL)" \
|
||||
--architecture $(ARCH) \
|
||||
--license "$(LICENSE)" \
|
||||
--deb-no-default-config-files \
|
||||
--package $(DIST_DIR) \
|
||||
$(OUTPUT_RTRDUMP)=/usr/bin/rtrdump
|
||||
|
||||
.PHONY: package-rpm-rtrdump
|
||||
package-rpm-rtrdump:
|
||||
fpm -s dir -t rpm -n $(RTRDUMP_NAME) -v $(VERSION_PKG) \
|
||||
--description "$(DESCRIPTION_RTRDUMP)" \
|
||||
--url "$(URL)" \
|
||||
--architecture $(ARCH) \
|
||||
--license "$(LICENSE) "\
|
||||
--package $(DIST_DIR) \
|
||||
$(OUTPUT_RTRDUMP)=/usr/bin/gortr
|
Reference in New Issue
Block a user