#!/usr/bin/make -f

export DH_GOLANG_INSTALL_EXTRA := \
  common/buf/data \
  release/config/geoip.dat \
  release/config/geosite.dat

include /usr/share/dpkg/pkg-info.mk

override_dh_auto_install:
	cd obj-$(DEB_TARGET_GNU_TYPE); \
		rm bin/errorgen bin/vprotogen; \
		mv bin/main bin/v2ctl
	dh_auto_install

override_dh_auto_build:
	dh_auto_build -- -ldflags "-s -w -X v2ray.com/core.codename=user -X v2ray.com/core.version=$(DEB_VERSION)"

%:
	dh $@ --buildsystem=golang --with=golang

override_dh_auto_test:
