#!/usr/bin/make -f

export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/pkg-info.mk
export DEB_VERSION
export FLAM3_VERSION = $(shell dpkg-query -W libflam3-dev | awk '{print $$2}' )

execute_before_dh_auto_build:
# lrelease does not work on some ports
ifneq ($(DEB_HOST_ARCH), m68k)
ifneq ($(DEB_HOST_ARCH), sh4)
ifneq ($(DEB_HOST_ARCH), sparc64)
	# Build translation files from source
	lrelease qosmic.pro
endif
endif
endif

execute_before_dh_auto_clean:
ifneq ($(DEB_HOST_ARCH), m68k)
ifneq ($(DEB_HOST_ARCH), sh4)
ifneq ($(DEB_HOST_ARCH), sparc64)
	rm -f ts/*.qm
endif
endif
endif


%:
	dh $@
