source: trunk/athena/bin/machtype/debian/rules @ 23223

Revision 23223, 2.0 KB checked in by andersk, 16 years ago (diff)
In machtype: * Bump `machtype -A` to 10.0. * Add i386_deb50 and amd64_deb50 sysnames, starting with Lenny and Intrepid.
  • Property svn:executable set to *
Line 
1#!/usr/bin/make -f
2
3DEB_AUTO_UPDATE_DEBIAN_CONTROL = 1
4DEB_AUTO_UPDATE_AUTOCONF = 1
5include /usr/share/cdbs/1/rules/debhelper.mk
6include /usr/share/cdbs/1/class/autotools.mk
7
8ATHENA_MAJOR_VERSION = 10
9ATHENA_MINOR_VERSION = 0
10
11DEBIAN_VERSION = $(shell dpkg-query --showformat='$${Version}' --show base-files)
12
13SYS_COMPAT=
14
15ifneq ($(shell dpkg --compare-versions $(DEBIAN_VERSION) '>=' '3.1' && echo y),y)
16    $(error Debian version $(DEBIAN_VERSION) is too old)
17endif
18
19ifeq ($(shell dpkg --compare-versions $(DEBIAN_VERSION) '>=' '4.0.4' && echo y),y)
20    ifeq ($(DEB_BUILD_ARCH),amd64)
21        SYS_COMPAT += amd64_deb50 i386_deb50
22    else
23        ifeq ($(DEB_BUILD_ARCH),i386)
24            SYS_COMPAT += i386_deb50
25        else
26            $(error Unrecognized architecture $(DEB_BUILD_ARCH))
27        endif
28    endif
29endif
30
31ifeq ($(shell dpkg --compare-versions $(DEBIAN_VERSION) '>=' '4' && echo y),y)
32    ifeq ($(DEB_BUILD_ARCH),amd64)
33        SYS_COMPAT += amd64_deb40 i386_deb40 i386_rhel4
34    else
35        ifeq ($(DEB_BUILD_ARCH),i386)
36            SYS_COMPAT += i386_deb40 i386_rhel4
37        else
38            $(error Unrecognized architecture $(DEB_BUILD_ARCH))
39        endif
40    endif
41endif
42
43ifeq ($(shell dpkg --compare-versions $(DEBIAN_VERSION) '>=' '3.1' && echo y),y)
44    ifeq ($(DEB_BUILD_ARCH),amd64)
45        SYS_COMPAT += amd64_deb31 i386_deb31
46    else
47        ifeq ($(DEB_BUILD_ARCH),i386)
48            SYS_COMPAT += i386_deb31
49        else
50            $(error Unrecognized architecture $(DEB_BUILD_ARCH))
51        endif
52    endif
53endif
54
55SYS_COMPAT += i386_rhel3 i386_rh9 i386_linux24 i386_linux22 i386_linux3 i386_linux2 i386_linux1
56
57ATHENA_SYS = $(word 1, $(SYS_COMPAT))
58ATHENA_SYS_COMPAT = $(patsubst %:,%,$(subst : ,:,$(patsubst %,%:,$(wordlist 2, $(words $(SYS_COMPAT)), $(SYS_COMPAT)))))
59
60DEB_CONFIGURE_EXTRA_FLAGS += lbindir=/bin \
61        ATHENA_SYS=$(ATHENA_SYS) \
62        ATHENA_SYS_COMPAT=$(ATHENA_SYS_COMPAT) \
63        ATHENA_MAJOR_VERSION=$(ATHENA_MAJOR_VERSION) \
64        ATHENA_MINOR_VERSION=$(ATHENA_MINOR_VERSION)
65
66clean::
67        rm -f configure
Note: See TracBrowser for help on using the repository browser.