1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
#!/usr/bin/make -f
export GOCACHE = /tmp/gocache
export GOPATH = ${CURDIR}/_build:/usr/share/gocode
export GO111MODULE := off
BUILD_DIR := ${CURDIR}/_build/src/github.com/strukturag/nextcloud-spreed-signaling
VERSION := $(shell $(CURDIR)/scripts/get-version.sh)
export INTERNALLDFLAGS := -ldflags "-X main.version=$(VERSION)"
%:
dh $@ --builddirectory=_build --buildsystem=golang --with=golang
override_dh_auto_build:
cd ${BUILD_DIR} && \
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative *.proto && \
easyjson -all grpc_backend.pb.go && \
easyjson -all grpc_internal.pb.go && \
easyjson -all grpc_mcu.pb.go && \
easyjson -all grpc_sessions.pb.go && \
easyjson -all api_signaling.go && \
easyjson -all api_async.go && \
easyjson -all api_backend.go && \
easyjson -all api_grpc.go && \
easyjson -all api_proxy.go && \
easyjson -all natsclient.go && \
easyjson -all room.go
dh_auto_build -- $(INTERNALLDFLAGS)
override_dh_auto_install:
dh_auto_install -- --no-source
cd debian/tmp/usr/bin; for f in client proxy server; do \
mv $$f nextcloud-spreed-signaling-$$f; \
done
override_dh_auto_test:
|