proxmox-firewall/debian/rules
Fabian Grünbichler aa9b2e2395 build: properly set dh-cargo env variable
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2024-06-20 12:32:32 +02:00

32 lines
946 B
Makefile
Executable File

#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
include /usr/share/dpkg/pkg-info.mk
include /usr/share/rustc/architecture.mk
export BUILD_MODE=release
export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
export CARGO=/usr/share/cargo/bin/cargo
export CARGO_HOME = $(CURDIR)/debian/cargo_home
export DEB_CARGO_CRATE=proxmox-firewall_$(DEB_VERSION_UPSTREAM)
export DEB_CARGO_PACKAGE=proxmox-firewall
%:
dh $@
override_dh_auto_configure:
@perl -ne 'if (/^version\s*=\s*"(\d+(?:\.\d+)+)"/) { my $$v_cargo = $$1; my $$v_deb = "$(DEB_VERSION_UPSTREAM)"; \
die "ERROR: d/changelog <-> Cargo.toml version mismatch: $$v_cargo != $$v_deb\n" if $$v_cargo ne $$v_deb; exit(0); }' proxmox-firewall/Cargo.toml
$(CARGO) prepare-debian $(CURDIR)/debian/cargo_registry --link-from-system
dh_auto_configure
override_dh_installsystemd:
dh_installsystemd proxmox-firewall.service