#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@ --with autotools-dev

override_dh_auto_configure:
	dh_auto_configure -- --enable-graphics --with-x --with-fb

override_dh_auto_install:
	dh_auto_install
	#rename links.1 and links to links2.1 and links2
	mv $(CURDIR)/debian/tmp/usr/bin/links \
           $(CURDIR)/debian/tmp/usr/bin/links2
	mv $(CURDIR)/debian/tmp/usr/share/man/man1/links.1 \
           $(CURDIR)/debian/tmp/usr/share/man/man1/links2.1

#	build the textmode only version
	dh_auto_configure -- --without-svgalib --without-x --without-fb --without-directfb --without-libjpeg --without-libtiff
	dh_auto_install
