#!/usr/bin/make -f

include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/autoreconf.mk
include /usr/share/cdbs/1/rules/debhelper.mk

DEB_CONFIGURE_EXTRA_FLAGS = --enable-pcsc --with-udev=/lib/udev \
	--with-bundle=/usr/lib/pcsc/drivers

ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
     DEB_CONFIGURE_EXTRA_FLAGS += --enable-usb
endif

DEB_INSTALL_DOCS_ALL := NEWS TODO

install/openct::
	cp -f etc/init-script debian/openct.init
	cp -f etc/openct.udev debian/60-openct.rules

binary-post-install/openct::
# Rename some stuff 
	mv -f $(CURDIR)/debian/openct/etc/reader.conf.d/openct.reader.conf \
		$(CURDIR)/debian/openct/etc/reader.conf.d/openct

clean::
	rm -f debian/openct.init debian/60-openct.rules
