~ubuntu-branches/ubuntu/precise/virtualbox/precise-updates

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-07-04 13:02:31 UTC
  • mfrom: (3.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20110704130231-l843es6wqhx614n7
Tags: 4.0.10-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Add the Modaliases control field manually for maximum backportability.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
XSERVER_VERSION = 17
26
26
INSTALL_XORGCONFD = new
27
 
XORG_PKG_ABI = new
 
27
XORG_PKG_ABI = 3
 
28
 
 
29
ifeq ($(DIST_RELEASE),Debian/squeeze)
 
30
        XORG_PKG_ABI = 2
 
31
endif
 
32
 
 
33
ifeq ($(DIST_RELEASE),Ubuntu/maverick)
 
34
        XORG_PKG_ABI = 2
 
35
endif
28
36
 
29
37
ifeq ($(DIST_RELEASE),Ubuntu/lucid)
30
38
        INSTALL_XORGCONFD = old
31
 
        XORG_PKG_ABI = old
32
 
endif
33
 
 
34
 
 
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
 
39
        XORG_PKG_ABI = 1
 
40
endif
 
41
 
 
42
 
 
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)
 
46
 
 
47
        SERVER_DEPENDS = $(INPUTDEP), $(VIDEODEP)
 
48
        VIDDRIVER_PROVIDES = xorg-driver-video
 
49
        INPDRIVER_PROVIDES = xorg-driver-input
 
50
 
 
51
        ifeq ($(strip $(INPUTDEP)),)
 
52
                XORG_PKG_ABI_ERROR = INPUTDEP is empty
 
53
        endif
 
54
        ifeq ($(strip $(VIDEODEP)),)
 
55
                XORG_PKG_ABI_ERROR = VIDEODEP is empty
 
56
        endif
 
57
endif
 
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)
 
63
 
 
64
        SERVER_DEPENDS = $(INPUTDEP), $(VIDEODEP)
42
65
        VIDDRIVER_PROVIDES = xserver-xorg-video-$(VIDEOABI)
43
66
        INPDRIVER_PROVIDES = xserver-xorg-input-$(INPUTABI)
44
 
else
45
 
        # Some defines needed for X
 
67
 
 
68
        ifeq ($(strip $(INPUTDEP)),)
 
69
                XORG_PKG_ABI_ERROR = INPUTDEP is empty
 
70
        endif
 
71
        ifeq ($(strip $(VIDEODEP)),)
 
72
                XORG_PKG_ABI_ERROR = VIDEODEP is empty
 
73
        endif
 
74
        ifeq ($(strip $(VIDEOABI)),)
 
75
                XORG_PKG_ABI_ERROR = VIDEOABI is empty
 
76
        endif
 
77
        ifeq ($(strip $(INPUTABI)),)
 
78
                XORG_PKG_ABI_ERROR = INPUTABI is empty
 
79
        endif
 
80
endif
 
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)
 
85
 
49
86
        SERVER_DEPENDS = xserver-xorg-core (>= $(SERVERMINVERS))
50
87
        VIDDRIVER_PROVIDES = xserver-xorg-video-$(VIDEOABI)
51
88
        INPDRIVER_PROVIDES = xserver-xorg-input-$(INPUTABI)
 
89
 
 
90
        ifeq ($(strip $(SERVERMINVERS)),)
 
91
                XORG_PKG_ABI_ERROR = SERVERMINVERS is empty
 
92
        endif
 
93
        ifeq ($(strip $(VIDEOABI)),)
 
94
                XORG_PKG_ABI_ERROR = VIDEOABI is empty
 
95
        endif
 
96
        ifeq ($(strip $(INPUTABI)),)
 
97
                XORG_PKG_ABI_ERROR = INPUTABI is empty
 
98
        endif
52
99
endif
53
100
 
54
101
 
55
102
 
56
103
%:
57
 
        dh $@ --with python_central,dkms,modaliases
 
104
        dh $@ --with python_central,dkms
58
105
 
59
106
override_dh_auto_configure:
60
107
        @echo Building for $(DIST_RELEASE)
61
108
 
 
109
ifdef XORG_PKG_ABI_ERROR
 
110
        @echo 'error: $(XORG_PKG_ABI_ERROR)'
 
111
        @exit 1
 
112
endif
 
113
 
62
114
        mkdir -p out
63
115
        ./configure \
64
116
            --ose \
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
113
165
 
114
 
ifeq ($(XORG_PKG_ABI),new)
115
 
 
116
 
ifeq ($(VIDEODEP),)
117
 
        @echo 'error: xserver-xorg-dev >= 1.7.6.901 needs to be installed'
118
 
        @exit 1
119
 
else
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
126
 
endif
127
 
 
128
 
else # ifeq ($(XORG_PKG_ABI),new)
129
 
 
130
 
ifeq ($(SERVERMINVERS),)
131
 
        @echo error: xserver-xorg-dev needs to be installed
132
 
        @exit 1
133
 
else
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
137
 
endif
138
 
 
139
 
endif # ifeq ($(XORG_PKG_ABI),new)
140
 
 
141
169
 
142
170
override_dh_install:
143
171
        dh_install