Browse Source

Updated release build logic, so it works better with packaging.

pull/272/head
Simon Eisenmann 9 years ago
parent
commit
acae8e73a2
  1. 13
      Makefile.am

13
Makefile.am

@ -29,6 +29,7 @@ CONFIG_FILE ?= spreed-webrtc-server.conf
CONFIG_PATH ?= /etc CONFIG_PATH ?= /etc
GOBUILDFLAGS ?= GOBUILDFLAGS ?=
GOTESTFLAGS ?= GOTESTFLAGS ?=
SYSTEM_GOPATH = /usr/share/gocode/src/
BIN ?= @prefix@/sbin BIN ?= @prefix@/sbin
SHARE ?= @prefix@/share/spreed-webrtc-server SHARE ?= @prefix@/share/spreed-webrtc-server
@ -84,6 +85,11 @@ fmt: gofmt
test: test:
GOPATH=$(GOPATH) $(GO) test -v $(GOTESTFLAGS) app/... ./go/... GOPATH=$(GOPATH) $(GO) test -v $(GOTESTFLAGS) app/... ./go/...
dist_gopath: $(DIST_SRC)
find $(SYSTEM_GOPATH) -mindepth 1 -maxdepth 1 -type d \
-exec ln -sf {} $(DIST_SRC) \;
assets: javascript fonts assets: javascript fonts
release-assets: RJSFLAGS = generateSourceMaps=false preserveLicenseComments=true release-assets: RJSFLAGS = generateSourceMaps=false preserveLicenseComments=true
@ -125,9 +131,10 @@ extract-i18n:
update-i18n: update-i18n:
cd $(CURDIR)/src/i18n && $(MAKE) update cd $(CURDIR)/src/i18n && $(MAKE) update
release-binary: GOPATH = "$(DIST):$(CURDIR)/vendor:$(CURDIR)"
release-binary: INTERNALLDFLAGS = -X main.version $(PACKAGE_VERSION) -X main.defaultConfig $(CONFIG_PATH)/$(CONFIG_FILE) release-binary: INTERNALLDFLAGS = -X main.version $(PACKAGE_VERSION) -X main.defaultConfig $(CONFIG_PATH)/$(CONFIG_FILE)
release-binary: OUTPUT = $(DIST_BIN) release-binary: OUTPUT = $(DIST_BIN)
release-binary: $(DIST_BIN) binary release-binary: dist_gopath $(DIST_BIN) binary
release: release-binary release-assets release: release-binary release-assets
@ -178,7 +185,7 @@ govendorclean:
pristine: distclean govendorclean pristine: distclean govendorclean
rm -f server.conf rm -f server.conf
$(DIST): $(DIST_SRC):
$(MKDIR_P) $@ $(MKDIR_P) $@
$(DIST_BIN): $(DIST_BIN):
@ -193,4 +200,4 @@ tarball: distclean release install
cp server.conf.in $(TARPATH)/loader cp server.conf.in $(TARPATH)/loader
tar czf $(DIST)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)_$(BUILD_OS)_$(BUILD_ARCH).tar.gz -C $(DIST) $(PACKAGE_NAME)-$(PACKAGE_VERSION) tar czf $(DIST)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)_$(BUILD_OS)_$(BUILD_ARCH).tar.gz -C $(DIST) $(PACKAGE_NAME)-$(PACKAGE_VERSION)
.PHONY: clean distclean govendorclean pristine goget gogetupdate build javascript fonts styles release releasetest dist_gopath install install-binary install-assets gopath binary binaryrace binaryall tarball assets dependencies.tsv .PHONY: clean distclean govendorclean pristine goget gogetupdate build javascript fonts styles release release-binary dist_gopath install install-binary install-assets gopath binary binaryrace binaryall tarball assets dependencies.tsv

Loading…
Cancel
Save