#!/usr/bin/make -f # -*- makefile -*- include /usr/share/rustc/architecture.mk %: dh $@ --buildsystem=cargo # generate cargo-checksum file _mkchecksum = printf '{"package":"%s","files":{}}\n' \ $$(sha256sum $(or $2,$(dir $1)Cargo.toml) | grep -Po '^\S+') > $1; execute_before_dh_auto_configure: $(call _mkchecksum,debian/cargo-checksum.json,Cargo.toml) override_dh_auto_build: # actually does the build DEB_BUILD_OPTIONS= dh_auto_test -- --release make -C man all # we ship the build result, skipping dh-cargo's test build override_dh_auto_test: override_dh_auto_install: dh_install target/$(DEB_HOST_RUST_TYPE)/release/greetd /usr/sbin/ dh_install target/$(DEB_HOST_RUST_TYPE)/release/agreety /usr/sbin/ override_dh_installpam: dh_installpam --name=greetd dh_installpam --name=greetd-greeter override_dh_installsystemd: dh_installsystemd --no-stop-on-upgrade --no-start execute_after_dh_fixperms: chmod a-x debian/greetd/lib/systemd/system/greetd.service # similarly to https://bugzilla.redhat.com/show_bug.cgi?id=1564880 # and other cases (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1016563) # I got: # dwz: debian/greetd/usr/sbin/agreety: Couldn't find DIE at [2c8a] referenced by DW_AT_abstract_origin from DIE at [1ba4d] # dwz: debian/greetd/usr/sbin/greetd: Couldn't find DIE at [1036] referenced by DW_AT_abstract_origin from DIE at [e12b] # Therefore I decide to skip it. override_dh_dwz: execute_after_dh_auto_clean: make -C man clean rm -f debian/cargo-checksum.json