#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all include /usr/share/dpkg/default.mk include /usr/share/rustc/architecture.mk export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE export CARGO=/usr/share/cargo/bin/cargo export CARGO_HOME=$(CURDIR)/debian/cargo_home export CARGO_REGISTRY=$(CURDIR)/debian/cargo_registry export DEB_CARGO_CRATE=$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM) export INSTALL_DIR=$(CURDIR)/debian/phrog %: dh $@ # The custom build.rs works under $HOME to ensure the glib schemas # compile cleanly, so let's ensure there's a valid/writable $HOME # during build and delete it afterwards override_dh_auto_build: HOME=$(CURDIR)/debian/tmp_home $(CARGO) build rm -rf $(CURDIR)/debian/tmp_home override_dh_auto_install: install -D -m0755 target/$(DEB_HOST_RUST_TYPE)/debug/phrog \ $(INSTALL_DIR)/usr/libexec/phrog install -D -m0644 resources/mobi.phosh.phrog.gschema.xml \ $(INSTALL_DIR)/usr/share/glib-2.0/schemas/mobi.phosh.phrog.gschema.xml # Disable tests for now as they rely on downstream libphosh-rs features override_dh_auto_test: execute_after_dh_auto_clean: $(CARGO) clean rm -rf $(CARGO_HOME) rm -rf $(CARGO_REGISTRY) execute_before_dh_auto_configure: $(CARGO) prepare-debian $(CARGO_REGISTRY) --link-from-system rm -f .cargo/config Cargo.lock