#!/usr/bin/make -f DEB_AUTO_UPDATE_AUTOCONF = 2.50 include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk ATHENA_MAJOR_VERSION = 10 ATHENA_MINOR_VERSION = 0 DEBIAN_VERSION = $(shell dpkg-query --showformat='$${Version}' --show base-files) SYS_COMPAT= ifneq ($(shell dpkg --compare-versions $(DEBIAN_VERSION) '>=' '3.1' && echo y),y) $(error Debian version $(DEBIAN_VERSION) is too old) endif ifeq ($(shell dpkg --compare-versions $(DEBIAN_VERSION) '>=' '4.0.4' && echo y),y) ifeq ($(DEB_BUILD_ARCH),amd64) SYS_COMPAT += amd64_deb50 i386_deb50 else ifeq ($(DEB_BUILD_ARCH),i386) SYS_COMPAT += i386_deb50 else $(error Unrecognized architecture $(DEB_BUILD_ARCH)) endif endif endif ifeq ($(shell dpkg --compare-versions $(DEBIAN_VERSION) '>=' '4' && echo y),y) ifeq ($(DEB_BUILD_ARCH),amd64) SYS_COMPAT += amd64_deb40 i386_deb40 i386_rhel4 else ifeq ($(DEB_BUILD_ARCH),i386) SYS_COMPAT += i386_deb40 i386_rhel4 else $(error Unrecognized architecture $(DEB_BUILD_ARCH)) endif endif endif ifeq ($(shell dpkg --compare-versions $(DEBIAN_VERSION) '>=' '3.1' && echo y),y) ifeq ($(DEB_BUILD_ARCH),amd64) SYS_COMPAT += amd64_deb31 i386_deb31 else ifeq ($(DEB_BUILD_ARCH),i386) SYS_COMPAT += i386_deb31 else $(error Unrecognized architecture $(DEB_BUILD_ARCH)) endif endif endif SYS_COMPAT += i386_rhel3 i386_rh9 i386_linux24 i386_linux22 i386_linux3 i386_linux2 i386_linux1 ATHENA_SYS = $(word 1, $(SYS_COMPAT)) ATHENA_SYS_COMPAT = $(patsubst %:,%,$(subst : ,:,$(patsubst %,%:,$(wordlist 2, $(words $(SYS_COMPAT)), $(SYS_COMPAT))))) DEB_CONFIGURE_EXTRA_FLAGS += lbindir=/bin \ ATHENA_SYS=$(ATHENA_SYS) \ ATHENA_SYS_COMPAT=$(ATHENA_SYS_COMPAT) \ ATHENA_MAJOR_VERSION=$(ATHENA_MAJOR_VERSION) \ ATHENA_MINOR_VERSION=$(ATHENA_MINOR_VERSION) clean:: rm -f configure