#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/buildcore.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/debhelper.mk

#DEB_CONFIGURE_EXTRA_FLAGS := --with-python=/usr/bin/python

# xcircuit doesn't use AM_MAINTAINER_MODE.  Touch files to not cause
# things to be autogenerated.
post-patches::
	touch --time=mtime -r configure.in Makefile.am
	touch --time=mtime -r configure.in Makefile.in
	touch --time=mtime -r configure.in configure
	touch --time=mtime -r configure.in aclocal.m4
	touch --time=mtime -r configure.in Xw/Makefile.am
	touch --time=mtime -r Xw/Makefile.am Xw/Makefile.in

# Use some extra 'make' flags.
DEB_MAKE_INVOKE += librarydir=/usr/share/xcircuit \
	appdefaultsdir=/etc/X11/app-defaults
DEB_MAKE_INSTALL_TARGET += librarydir=/usr/share/xcircuit \
	appdefaultdir=/etc/X11/app-defaults

# A couple of things don't get cleaned by 'make distclean'.
clean::
	rm -f xcircuit.1 menudep.h

# The upstream changelog is named funny.
DEB_INSTALL_CHANGELOGS_ALL := CHANGES
