rules 588 B

1234567891011121314151617181920212223
  1. #!/usr/bin/make -f
  2. include /usr/share/dpkg/default.mk
  3. BUILDDIR=_build
  4. %:
  5. dh $@ --builddirectory=$(BUILDDIR) --buildsystem=golang
  6. execute_after_dh_auto_configure:
  7. go mod vendor
  8. cp -r vendor/* _build/src
  9. override_dh_auto_build:
  10. DH_GOPKG="github.com/v2fly/v2ray-core/v5/main" dh_auto_build -- -ldflags "-s -w"
  11. cd $(BUILDDIR); mv bin/main bin/v2ray
  12. DH_GOPKG="github.com/v2fly/v2ray-core/v5/infra/control/main" dh_auto_build -- -ldflags "-s -w" -tags confonly
  13. cd $(BUILDDIR); mv bin/main bin/v2ctl
  14. override_dh_auto_install:
  15. dh_auto_install -- --no-source
  16. override_dh_auto_test: