#!/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/fidoukey
export DRIVER_DIR := /usr/lib/biometric-authentication/drivers
export DISCOVER_TOOL_DIR := /usr/lib/biometric-authentication/discover-tools
export LOCALEDIR := /usr/share/locale/

DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)

%:
	dh $@

override_dh_install:

	mkdir fidoukey_libs
	mkdir fidoukey_po_zh_CN
	
	cp	src/po/zh_CN.mo	fidoukey_po_zh_CN/biometric-driver-fidoukey-detect.mo

	dh_install
	
	rm -rf fidoukey_libs/
	rm -rf fidoukey_po_zh_CN/
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
