#!/usr/bin/make -f

# DH_VERBOSE := 1

DEBPKGNAME := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
BUILD_DIR := obj-$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)

%:
	dh $@ --buildsystem=cmake

override_dh_install:
	dh_install
	# install binary
	cp -a $(BUILD_DIR)/bin/*/plast debian/$(DEBPKGNAME)/usr/lib/$(DEBPKGNAME)/bin
	# no need for the includes
	rm -rf debian/*/usr/include

override_dh_auto_test:
	scripts/test-plast.sh