#!/usr/bin/make -f PACKAGE_NAME := g3proxy BUILD_PROFILE := release-lto DEB_VERSION ?= $(shell dpkg-parsechangelog -SVersion) LUA_FEATURE ?= $(shell scripts/package/detect_lua_feature.sh) SSL_FEATURE ?= $(shell scripts/package/detect_openssl_feature.sh) CARES_FEATURE ?= $(shell scripts/package/detect_c-ares_feature.sh) %: dh $@ override_dh_auto_clean: cargo clean --frozen --offline override_dh_auto_build: G3_PACKAGE_VERSION=$(DEB_VERSION) \ cargo build --frozen --offline --profile $(BUILD_PROFILE) \ --no-default-features --features $(LUA_FEATURE),$(SSL_FEATURE),quic,$(CARES_FEATURE),hickory,geoip \ --package g3proxy --package g3proxy-ctl --package g3proxy-ftp --package g3proxy-lua --package g3proxy-geoip sh $(PACKAGE_NAME)/service/generate_systemd.sh override_dh_auto_install: dh_auto_install install -m 755 -D target/$(BUILD_PROFILE)/g3proxy debian/tmp/usr/bin/g3proxy install -m 755 -D target/$(BUILD_PROFILE)/g3proxy-ctl debian/tmp/usr/bin/g3proxy-ctl install -m 755 -D target/$(BUILD_PROFILE)/g3proxy-ftp debian/tmp/usr/bin/g3proxy-ftp install -m 755 -D target/$(BUILD_PROFILE)/g3proxy-lua debian/tmp/usr/bin/g3proxy-lua install -m 755 -D target/$(BUILD_PROFILE)/g3proxy-geoip debian/tmp/usr/bin/g3proxy-geoip install -m 644 -D $(PACKAGE_NAME)/service/g3proxy@.service debian/tmp/lib/systemd/system/g3proxy@.service override_dh_installchangelogs: dh_installchangelogs $(PACKAGE_NAME)/CHANGELOG