#!/usr/bin/make -f

DESTDIR=debian/libccid

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_autoreconf:
	rm configure.ac Makefile.am

override_dh_auto_configure:
	# add support of the GemPC Twin in serial mode
	dh_auto_configure -- -Dserial=true

override_dh_auto_install:
	dh_auto_install

	# move the configuration file in /etc and create a symbolic link
	mv $(DESTDIR)/usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist $(DESTDIR)/etc/libccid_Info.plist
	ln -s /etc/libccid_Info.plist $(DESTDIR)/usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist

override_dh_installudev:
	dh_installudev --priority=92
