#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1


# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

DRV_API_MAJOR := 0
DRV_API_MINOR := 10
DRV_API_FUNC := 2
DRV_API_DEPEND := bio-drv-api-$(DRV_API_MAJOR).$(DRV_API_MINOR)

export EXTRA_LIBS_DIR := /usr/lib/biometric-authentication/drivers/extra/wechat
export DRIVER_DIR := /usr/lib/biometric-authentication/drivers
export DISCOVER_TOOL_DIR := /usr/lib/biometric-authentication/discover-tools
export LOCALEDIR := /usr/share/locale/


%:
	dh $@

override_dh_install:

	mkdir wechat_po_zh_CN
	mkdir wechat_po_bo_CN
	mkdir wechat_po_mn
	mkdir wechat_po_zh_HK

	cp	src/po/zh_CN.mo	wechat_po_zh_CN/biometric-driver-wechat.mo
	cp	src/po/bo_CN.mo	wechat_po_bo_CN/biometric-driver-wechat.mo
	cp	src/po/mn.mo	wechat_po_mn/biometric-driver-wechat.mo
	cp	src/po/zh_HK.mo	wechat_po_zh_HK/biometric-driver-wechat.mo

	dh_install

	rm -rf wechat_po_zh_CN/
	rm -rf wechat_po_bo_CN/
	rm -rf wechat_po_mn/
	rm -rf wechat_po_zh_HK/

override_dh_gencontrol:
	dh_gencontrol -- -V"bio-drv-api:Depends=$(DRV_API_DEPEND)"

override_dh_strip:
	@echo "Skip dh_strip stage to keep the symbol table."

override_dh_shlibdeps:
	#dh_shlibdeps -XlibFPScanAPI.so
