+# Transform a full path into the path it should be diverted to if it's
+# removed
+remove_files_name = /usr/share/$(cdbs_curpkg)/$(shell $(DEB_DIVERT_ENCODER) $(1))
+
+dh_compat_5 := $(shell if [ '$(DH_COMPAT)' -ge 5 ]; then echo y; fi)
+
+reverse = $(foreach n,$(shell seq $(words $(1)) -1 1),$(word $(n),$(1)))
+reverse_dh_compat_5 = $(if $(dh_compat_5),$(call reverse,$(1)),$(1))
+