2020-11-07 22:10:13 -05:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
|
|
|
include /usr/share/dpkg/default.mk
|
|
|
|
|
|
|
|
BUILDDIR=_build
|
|
|
|
|
|
|
|
%:
|
|
|
|
dh $@ --builddirectory=$(BUILDDIR) --buildsystem=golang --with=golang
|
|
|
|
|
|
|
|
execute_after_dh_auto_configure:
|
|
|
|
go mod vendor
|
|
|
|
cp -r vendor/* _build/src
|
|
|
|
|
|
|
|
override_dh_auto_clean:
|
|
|
|
dh_auto_clean
|
|
|
|
rm -rf vendor
|
|
|
|
|
|
|
|
override_dh_auto_build:
|
2021-01-04 09:15:22 -05:00
|
|
|
DH_GOPKG="v2ray.com/core/main" dh_auto_build -- -ldflags "-s -w"
|
2020-11-07 22:10:13 -05:00
|
|
|
cd $(BUILDDIR); mv bin/main bin/v2ray
|
2021-01-04 09:15:22 -05:00
|
|
|
DH_GOPKG="v2ray.com/core/infra/control/main" dh_auto_build -- -ldflags "-s -w" -tags confonly
|
2020-11-07 22:10:13 -05:00
|
|
|
cd $(BUILDDIR); mv bin/main bin/v2ctl
|
|
|
|
|
|
|
|
override_dh_auto_install:
|
|
|
|
dh_auto_install -- --no-source
|
|
|
|
|
|
|
|
override_dh_auto_test:
|