#!/usr/bin/make -f
# export DH_VERBOSE = 1

export LC_ALL=C.UTF-8
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh ${@} --buildsystem cmake

override_dh_missing:
	dh_missing --fail-missing

override_dh_auto_configure:
	sed -i 's/|arch= !armel )/|optional=meh)/' debian/libfm-qt*.symbols
	sed -i 's/|arch= !armel !riscv64 )/|optional=meh2)/' debian/libfm-qt*.symbols
	sed -i 's/|arch= !armel !riscv64)/|optional=meh3)/' debian/libfm-qt*.symbols
	dh_auto_configure -- \
		-DUPDATE_TRANSLATIONS=OFF \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo

override_dh_auto_clean:
	dh_auto_clean
	sed -i 's/|optional=meh)/|arch= !armel )/' debian/libfm-qt*.symbols
	sed -i 's/|optional=meh2)/|arch= !armel !riscv64 )/' debian/libfm-qt*.symbols
	sed -i 's/|optional=meh3)/|arch= !armel !riscv64)/' debian/libfm-qt*.symbols
