#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DH_VERBOSE=1
export QT_SELECT=qt5

BUILDDIR=$(CURDIR)/debian/build

%:
	dh $@ --no-parallel --buildsystem=qmake --builddirectory=$(BUILDDIR)

override_dh_auto_configure:
	mkdir -p $(BUILDDIR) && \
		cp -rpf c2bscripts  c2btools  cb2bib.pro  cb2bib.rc data src testPDFImport xpdf $(BUILDDIR) && \
		dh_auto_configure

debian/cb2bib.xpm: src/icons/cb2bib.png
	convert src/icons/cb2bib.png -resize 32x32 debian/cb2bib.xpm

override_dh_auto_build: debian/cb2bib.xpm
	dh_auto_build
