#!/usr/bin/make -f

DEB_AUTO_UPDATE_AUTOCONF = 2.50
DEB_AUTO_UPDATE_ACLOCAL = 1.9

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

debian/stamp-autotools-files: aclocal.m4 config.guess config.sub install-sh missing
aclocal.m4:
	touch $@
config.guess config.sub:
	cp /usr/share/misc/$@ $@
install-sh missing:
	-automake-1.9 --foreign --add-missing

DEB_CONFIGURE_EXTRA_FLAGS += --with-afs=/usr --disable-nfs --with-krb5 --with-hesiod
DEB_DH_INSTALL_SOURCEDIR = $(DEB_DESTDIR)
DEB_UPDATE_RCD_PARAMS = "start 65 S ."

ifeq ($(DEB_BUILD_ARCH),amd64)
    CFLAGS += -fPIC
endif

common-install-indep::
	dh_install -pdebathena-liblocker debian/attach.conf etc/athena/

clean::
	rm -f configure aclocal.m4 install-sh missing config.guess config.sub
