25
25
XSERVER_VERSION = 17
26
26
INSTALL_XORGCONFD = new
29
ifeq ($(DIST_RELEASE),Debian/squeeze)
33
ifeq ($(DIST_RELEASE),Ubuntu/maverick)
29
37
ifeq ($(DIST_RELEASE),Ubuntu/lucid)
30
38
INSTALL_XORGCONFD = old
35
ifeq ($(XORG_PKG_ABI),new)
36
# Some defines needed for X
37
VIDEODEP = $(shell cat /usr/share/xserver-xorg/videodrvdep 2>/dev/null)
38
INPUTDEP = $(shell cat /usr/share/xserver-xorg/xinputdep 2>/dev/null)
39
# these two can be removed post-squeeze
43
ifeq ($(XORG_PKG_ABI),3)
44
INPUTDEP = $(shell cat /usr/share/xserver-xorg/xinputdep 2>/dev/null)
45
VIDEODEP = $(shell cat /usr/share/xserver-xorg/videodrvdep 2>/dev/null)
47
SERVER_DEPENDS = $(INPUTDEP), $(VIDEODEP)
48
VIDDRIVER_PROVIDES = xorg-driver-video
49
INPDRIVER_PROVIDES = xorg-driver-input
51
ifeq ($(strip $(INPUTDEP)),)
52
XORG_PKG_ABI_ERROR = INPUTDEP is empty
54
ifeq ($(strip $(VIDEODEP)),)
55
XORG_PKG_ABI_ERROR = VIDEODEP is empty
58
ifeq ($(XORG_PKG_ABI),2)
59
VIDEODEP = $(shell cat /usr/share/xserver-xorg/videodrvdep 2>/dev/null)
60
INPUTDEP = $(shell cat /usr/share/xserver-xorg/xinputdep 2>/dev/null)
40
61
VIDEOABI = $(shell cat /usr/share/xserver-xorg/videoabiver 2>/dev/null)
41
62
INPUTABI = $(shell cat /usr/share/xserver-xorg/inputabiver 2>/dev/null)
64
SERVER_DEPENDS = $(INPUTDEP), $(VIDEODEP)
42
65
VIDDRIVER_PROVIDES = xserver-xorg-video-$(VIDEOABI)
43
66
INPDRIVER_PROVIDES = xserver-xorg-input-$(INPUTABI)
45
# Some defines needed for X
68
ifeq ($(strip $(INPUTDEP)),)
69
XORG_PKG_ABI_ERROR = INPUTDEP is empty
71
ifeq ($(strip $(VIDEODEP)),)
72
XORG_PKG_ABI_ERROR = VIDEODEP is empty
74
ifeq ($(strip $(VIDEOABI)),)
75
XORG_PKG_ABI_ERROR = VIDEOABI is empty
77
ifeq ($(strip $(INPUTABI)),)
78
XORG_PKG_ABI_ERROR = INPUTABI is empty
81
ifeq ($(XORG_PKG_ABI),1)
46
82
SERVERMINVERS = $(shell cat /usr/share/xserver-xorg/serverminver 2>/dev/null)
47
83
VIDEOABI = $(shell cat /usr/share/xserver-xorg/videoabiver 2>/dev/null)
48
84
INPUTABI = $(shell cat /usr/share/xserver-xorg/inputabiver 2>/dev/null)
49
86
SERVER_DEPENDS = xserver-xorg-core (>= $(SERVERMINVERS))
50
87
VIDDRIVER_PROVIDES = xserver-xorg-video-$(VIDEOABI)
51
88
INPDRIVER_PROVIDES = xserver-xorg-input-$(INPUTABI)
90
ifeq ($(strip $(SERVERMINVERS)),)
91
XORG_PKG_ABI_ERROR = SERVERMINVERS is empty
93
ifeq ($(strip $(VIDEOABI)),)
94
XORG_PKG_ABI_ERROR = VIDEOABI is empty
96
ifeq ($(strip $(INPUTABI)),)
97
XORG_PKG_ABI_ERROR = INPUTABI is empty
57
dh $@ --with python_central,dkms,modaliases
104
dh $@ --with python_central,dkms
59
106
override_dh_auto_configure:
60
107
@echo Building for $(DIST_RELEASE)
109
ifdef XORG_PKG_ABI_ERROR
110
@echo 'error: $(XORG_PKG_ABI_ERROR)'
111
163
sed -e 's/CVERSION/$(upstreamversion)/g' < debian/$(pdkms).install.in > debian/$(pdkms).install
112
164
sed -e 's/CVERSION/$(upstreamversion)/g' < debian/$(gdkms).install.in > debian/$(gdkms).install
114
ifeq ($(XORG_PKG_ABI),new)
117
@echo 'error: xserver-xorg-dev >= 1.7.6.901 needs to be installed'
120
echo "xviddriver:Depends=$(VIDEODEP)" >> debian/$(uxname).substvars
121
echo "xinpdriver:Depends=$(INPUTDEP)" >> debian/$(uxname).substvars
122
# the following is there for compatibility...
123
echo "xviddriver:Provides=$(VIDDRIVER_PROVIDES)" >> debian/$(uxname).substvars
124
echo "xinpdriver:Provides=$(INPDRIVER_PROVIDES)" >> debian/$(uxname).substvars
125
echo "xserver:Depends=$(VIDEODEP), $(INPUTDEP)" >> debian/$(uxname).substvars
128
else # ifeq ($(XORG_PKG_ABI),new)
130
ifeq ($(SERVERMINVERS),)
131
@echo error: xserver-xorg-dev needs to be installed
134
166
echo "xserver:Depends=$(SERVER_DEPENDS)" >> debian/$(uxname).substvars
135
167
echo "xviddriver:Provides=$(VIDDRIVER_PROVIDES)" >> debian/$(uxname).substvars
136
168
echo "xinpdriver:Provides=$(INPDRIVER_PROVIDES)" >> debian/$(uxname).substvars
139
endif # ifeq ($(XORG_PKG_ABI),new)
142
170
override_dh_install: