#!/usr/bin/make -f

export CFLAGS = -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2)
export REG_BIN = /lib/crda/regulatory.bin
export USE_OPENSSL = 1
export RUNTIME_PUBKEY_DIR = /lib/crda/pubkeys
export RUNTIME_PUBKEY_ONLY = 1
export V = 1
#export DH_VERBOSE = 1

%:
	dh ${@}

override_dh_auto_build:
	dh_auto_build -- all_noverify

override_dh_install:
	dh_install
	install -D -o 0 -g 0 -m 755 debian/setregdomain \
		debian/crda/lib/crda/setregdomain
	mkdir -m 755 debian/crda/$(RUNTIME_PUBKEY_DIR)
	install -m 644 pubkeys/*.pem debian/pubkeys/*.pem \
		debian/crda/$(RUNTIME_PUBKEY_DIR)/
