#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 -Wl,--as-needed

%:
	dh $@ --with gnome --buildsystem=meson

override_dh_auto_configure:
	dh_auto_configure -- \
	                  --libexecdir=/usr/lib \
                          -Dgvfs_pkgs=gvfs-backends,python-gi,gir1.2-glib-2.0 \
                          -Dboto_pkgs=python-boto \
                          -Dcloudfiles_pkgs=python-cloudfiles \
                          -Dswiftclient_pkgs=python-swiftclient

override_dh_strip:
	dh_strip --dbgsym-migration='deja-dup-dbg (<< 34.2-1~)'

# duplicity still depends on Python2 which is unwanted in the default install
# but Deja Dup can install duplicity dynamically
override_dh_gencontrol:
ifneq ($(shell dpkg-vendor --query vendor),Ubuntu)
	dh_gencontrol -- -Vduplicity:Depends='duplicity (>= 0.7.14)'
else
	dh_gencontrol -- -Vduplicity:Suggests='duplicity (>= 0.7.14)'
endif

