#!/usr/bin/make -f

DPKG_EXPORT_BUILDFLAGS=1
include /usr/share/dpkg/buildflags.mk

%:
	dh $@ --with autoreconf \
		--sourcedir=$(CURDIR)/texk/xdvik \
		--builddir=$(CURDIR)/Work

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_auto_configure:
		dh_auto_configure -- \
		--with-kpathsea-libdir=/usr/lib \
		--with-kpathsea-includes=/usr/include/kpathsea \
		--with-xdvi-x-toolkit=xaw \
		--disable-t1lib \
		--disable-t1utils \
		--enable-freetype \
		--enable-pxdvik

override_dh_auto_install:
	dh_auto_install -- DESTDIR=$(CURDIR)/debian/tmp
	mv $(CURDIR)/debian/tmp/usr/share/man/man1/pxdvi.1 \
		$(CURDIR)/debian/tmp/usr/share/man/man1/pxdvi-xaw.1

override_dh_installchangelogs:
	dh_installchangelogs $(CURDIR)/texk/xdvik/CHANGES.xdvik-jp

override_dh_auto_clean:
	dh_auto_clean
#	rm -fr $(CURDIR)/Work
