1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
|
#
# This Makefile executes the unpack/build/binary targets for a single
# subarch, which is passed in the subarch variable. Empty subarch
# variable means that we are building for an arch without the subarch.
# Additionally, variables version, abiname and ltver are
# expected to be available (need to be exported from the parent process).
#
SHELL := bash -e
DEB_HOST_ARCH := $(shell dpkg-architecture -a'$(ARCH)' -qDEB_HOST_ARCH)
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -a'$(ARCH)' -qDEB_HOST_GNU_TYPE)
DEB_BUILD_ARCH := $(shell dpkg-architecture -a'$(ARCH)' -qDEB_BUILD_ARCH)
export PYTHONPATH = $(CURDIR)/debian/lib/python
export DH_OPTIONS
export DEB_HOST_ARCH
#
# Build the list of common config files to be included
#
ifeq ($(SUBARCH),none)
basedir := debian/arch/$(ARCH)
else
basedir := debian/arch/$(ARCH)/$(SUBARCH)
endif
-include $(basedir)/Makefile.inc
include debian/rules.defs
#
# Here we construct the command lines for different make-kpkg
# calls (build, linux-image, linux-headers) based on the values
# of variables defined so far and provided by the arch/subarch
# in Makefile.inc. @flavour@ in the expressions is going to be
# replaced by the flavour for which the command is run.
#
kpkg_image := make-kpkg --append-to-version '$(ABINAME)$(LOCALVERSION)'
kpkg_image += --arch '$(ARCH)'
kpkg_image += --stem linux
ifneq ($(INITRAMFS),False)
kpkg_image += --initrd
endif
ifdef KPKG_SUBARCH
kpkg_image += --subarch '$(KPKG_SUBARCH)'
endif
setup_env := env -u ABINAME -u ARCH -u SUBARCH -u FLAVOUR -u VERSION -u LOCALVERSION
setup_makeflags =
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
setup_makeflags += CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)-
ifdef COMPILER
setup_makeflags += CC=$(DEB_HOST_GNU_TYPE)-$(COMPILER)
endif
kpkg_image += --cross-compile='$(DEB_HOST_GNU_TYPE)'
else
ifdef COMPILER
setup_makeflags += CC=$(COMPILER)
endif
endif
setup_env += MAKEFLAGS='$(setup_makeflags)'
ifdef DEBIAN_KERNEL_JOBS
setup_env_kpkg_jobs = CONCURRENCY_LEVEL=$(DEBIAN_KERNEL_JOBS)
JOBS_ARG = -j$(DEBIAN_KERNEL_JOBS)
endif
#
# Targets
#
binary-arch-arch: install-headers-all install-headers-$(ARCH)
binary-arch-subarch: install-header-$(ARCH)-$(SUBARCH)
binary-arch-flavour: install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE)
ifeq ($(MODULES),True)
binary-arch-flavour: install-header-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
endif
binary-indep: install-doc install-patch install-source install-tree
build: $(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE)
setup-flavour: $(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE)
source-arch: $(STAMPS_DIR)/source
source-subarch: $(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH)
#
# Generates the kernel config file for a subarch by merging
# the arch-independent config file (arch/config),
# arch-specific config file (arch/$(karch)/config),
# and subarch specific one (arch/$(karch)/$(subarch)/config).
#
config_common = debian/arch/config debian/arch/$(ARCH)/config
ifneq ($(SUBARCH),none)
config_common += debian/arch/$(ARCH)/$(SUBARCH)/config
endif
$(BUILD_DIR)/config.$(ARCH)-$(SUBARCH)-$(FLAVOUR): $(basedir)/config.$(FLAVOUR) $(config_common)
@echo "Generating configuration file $@:"
ocaml debian/bin/kconfig.ml -b "debian/arch" -a "$(ARCH)" -s "$(SUBARCH)" -f "$(FLAVOUR)" > '$@'
$(BUILD_DIR)/linux-source-$(UPSTREAMVERSION).tar.bz2: SOURCE_DIR=$(BUILD_DIR)/source
$(BUILD_DIR)/linux-source-$(UPSTREAMVERSION).tar.bz2: DIR = $(BUILD_DIR)/linux-source-$(UPSTREAMVERSION)
$(BUILD_DIR)/linux-source-$(UPSTREAMVERSION).tar.bz2: $(STAMPS_DIR)/source
rm -rf '$@' '$(DIR)'
cp -al '$(SOURCE_DIR)' '$(DIR)'
chmod -R u+rw,go=rX '$(DIR)'
cd '$(BUILD_DIR)'; tar -cjf 'linux-source-$(UPSTREAMVERSION).tar.bz2' 'linux-source-$(UPSTREAMVERSION)'
rm -rf '$(DIR)'
define patch_cmd
cd '$(DIR)'; python2.4 '$(CURDIR)/debian/bin/apply.py' --overwrite-home='$(CURDIR)/debian/patches' --overwrite-source='$(SOURCEVERSION)' --overwrite-revisions='$(REVISIONS)'
endef
srcfiles := $(filter-out debian, $(wildcard * .[^.]*))
$(STAMPS_DIR)/source: DIR=$(BUILD_DIR)/source
$(STAMPS_DIR)/source: debian/bin/apply.py
rm -rf '$(DIR)'
mkdir -p '$(DIR)'
cp -al $(srcfiles) '$(DIR)'
$(patch_cmd)
touch '$@'
$(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH): SOURCE_DIR=$(BUILD_DIR)/source
$(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH): DIR=$(BUILD_DIR)/source-$(ARCH)-$(SUBARCH)
$(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH): $(STAMPS_DIR)/source
rm -rf '$(DIR)'
cp -al '$(SOURCE_DIR)' '$(DIR)'
mkdir -p '$(DIR)/debian'
cp debian/changelog '$(DIR)/debian'
cp debian/copyright '$(DIR)/debian'
cp debian/control '$(DIR)/debian/control'
touch '$(DIR)/debian/official'
$(patch_cmd) -a $(ARCH) -s $(SUBARCH)
touch '$@'
$(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): CONFIG=$(BUILD_DIR)/config.$(ARCH)-$(SUBARCH)-$(FLAVOUR)
$(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): SOURCE_DIR=$(BUILD_DIR)/source-$(ARCH)-$(SUBARCH)
$(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): DIR=$(BUILD_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
$(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): $(BUILD_DIR)/config.$(ARCH)-$(SUBARCH)-$(FLAVOUR) $(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH)
$(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-kernel-package:
rm -rf '$(DIR)'
cp -al '$(SOURCE_DIR)' '$(DIR)'
cp '$(CONFIG)' '$(DIR)/.config'
cd '$(DIR)'; $(setup_env) $(kpkg_image) configure
touch '$@'
$(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-s390-tape:
rm -rf '$(DIR)'
cp -al '$(SOURCE_DIR)' '$(DIR)'
cp '$(CONFIG)' '$(DIR)/.config'
echo '$(ABINAME)$(subst -tape,,$(LOCALVERSION))' > '$(DIR)/localversion'
cd '$(DIR)'; $(setup_env) make prepare ARCH=$(KERNEL_ARCH) $(JOBS_ARG)
touch '$@'
$(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-xen:
rm -rf '$(DIR)'
cp -al '$(SOURCE_DIR)' '$(DIR)'
cp '$(CONFIG)' '$(DIR)/.config'
echo '$(ABINAME)$(LOCALVERSION)' > '$(DIR)/localversion'
cd '$(DIR)'; $(setup_env) make prepare ARCH=$(KERNEL_ARCH) $(JOBS_ARG)
touch '$@'
$(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): DIR=$(BUILD_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
$(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): $(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE)
$(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-kernel-package:
cd '$(DIR)'; $(setup_env) $(setup_env_kpkg_jobs) PATH='$(CURDIR)/build:$(CURDIR)/bin:$(PATH)' $(kpkg_image) build
touch '$@'
$(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-s390-tape:
cd '$(DIR)'; $(setup_env) make ARCH=$(KERNEL_ARCH) $(JOBS_ARG) image
touch '$@'
$(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-xen:
cd '$(DIR)'; $(setup_env) make ARCH=$(KERNEL_ARCH) $(JOBS_ARG)
touch '$@'
install-base:
dh_installchangelogs
dh_installdocs
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol -- $(GENCONTROL_ARGS)
dh_md5sums
dh_builddeb
install-doc: SOURCE_DIR=$(BUILD_DIR)/source
install-doc: DIR=$(BUILD_DIR)/$@
install-doc: $(STAMPS_DIR)/source
rm -rf '$(DIR)'
cp -al '$(SOURCE_DIR)' '$(DIR)'
mkdir -p '$(DIR)/debian'
cp debian/changelog '$(DIR)/debian'
cp debian/copyright '$(DIR)/debian'
cp debian/control '$(DIR)/debian/control'
touch '$(DIR)/debian/official'
rm '$(DIR)/Makefile'
sed -e 's,^EXTRAVERSION.*$$,EXTRAVERSION =,' < '$(SOURCE_DIR)/Makefile' > '$(DIR)/Makefile'
cd '$(DIR)' && $(setup_env) make-kpkg --stem linux \
--config defconfig kernel-manual
cat '$(DIR)/debian/files' >> debian/files
@for i in $$(awk '{ print $$1; }' '$(DIR)/debian/files'); do \
echo "mv \"$(BUILD_DIR)/$$i\" .."; \
mv "$(BUILD_DIR)/$$i" ..; \
done
rm -rf '$(DIR)'
install-dummy:
dh_testdir
dh_testroot
dh_clean -d -k
$(MAKE) -f debian/rules.real install-base
install-headers-$(ARCH): PACKAGE_NAMES = linux-headers-$(UPSTREAMVERSION)$(ABINAME)-all linux-headers-$(UPSTREAMVERSION)$(ABINAME)-all-$(ARCH)
install-headers-$(ARCH): DH_OPTIONS = $(foreach p, $(PACKAGE_NAMES), -p$(p))
install-headers-$(ARCH):
dh_testdir
dh_testroot
$(MAKE) -f debian/rules.real install-base GENCONTROL_ARGS='-Vkernel:Arch=$(ARCH)'
install-header-$(ARCH)-$(SUBARCH): PACKAGE_NAME = linux-headers-$(UPSTREAMVERSION)$(ABINAME)$(LOCALVERSION_HEADERS)
install-header-$(ARCH)-$(SUBARCH): DH_OPTIONS = -p$(PACKAGE_NAME)
install-header-$(ARCH)-$(SUBARCH): BASE_DIR = /usr/src/$(PACKAGE_NAME)
install-header-$(ARCH)-$(SUBARCH): SOURCE_DIR = $(BUILD_DIR)/source-$(ARCH)-$(SUBARCH)
install-header-$(ARCH)-$(SUBARCH): DIR = $(CURDIR)/debian/$(PACKAGE_NAME)/$(BASE_DIR)
install-header-$(ARCH)-$(SUBARCH): $(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH)
dh_testdir
dh_testroot
dh_clean -k -d
cd $(SOURCE_DIR); \
( \
find . \
-path './Documentation/*' -prune -o \
-path './arch/*' -prune -o \
-path './include/asm*' -prune -o \
-path './scripts/*' -prune -o \
-path './include/*' -print -o \
\( -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Rules.make' \) -print; \
find include/asm-generic -print; \
for i in $(KERNEL_HEADER_DIRS); do \
find arch/$$i \
\( -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Rules.make' \) -print; \
find include/asm-$$i -print; \
done; \
) \
| \
cpio -pd --preserve-modification-time $(DIR)
$(MAKE) -f debian/rules.real install-base
install-header-$(ARCH)-$(SUBARCH)-$(FLAVOUR): REAL_VERSION = $(UPSTREAMVERSION)$(ABINAME)$(LOCALVERSION)
install-header-$(ARCH)-$(SUBARCH)-$(FLAVOUR): PACKAGE_NAME = linux-headers-$(REAL_VERSION)
install-header-$(ARCH)-$(SUBARCH)-$(FLAVOUR): PACKAGE_NAME_HEADERS = linux-headers-$(UPSTREAMVERSION)$(ABINAME)$(LOCALVERSION_HEADERS)
install-header-$(ARCH)-$(SUBARCH)-$(FLAVOUR): PACKAGE_NAME_KBUILD = linux-kbuild-$(VERSION)
install-header-$(ARCH)-$(SUBARCH)-$(FLAVOUR): DH_OPTIONS = -p$(PACKAGE_NAME)
install-header-$(ARCH)-$(SUBARCH)-$(FLAVOUR): BASE_DIR = /usr/src/$(PACKAGE_NAME)
install-header-$(ARCH)-$(SUBARCH)-$(FLAVOUR): SOURCE_DIR = $(BUILD_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
install-header-$(ARCH)-$(SUBARCH)-$(FLAVOUR): REF_DIR = $(BUILD_DIR)/source-$(ARCH)-$(SUBARCH)
install-header-$(ARCH)-$(SUBARCH)-$(FLAVOUR): PACKAGE_DIR = $(CURDIR)/debian/$(PACKAGE_NAME)
install-header-$(ARCH)-$(SUBARCH)-$(FLAVOUR): DIR = $(PACKAGE_DIR)/$(BASE_DIR)
install-header-$(ARCH)-$(SUBARCH)-$(FLAVOUR): $(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE)
dh_testdir
dh_testroot
dh_clean -k -d
mkdir -p "${DIR}/arch/${KERNEL_ARCH}/kernel"
mkdir -p "${DIR}/include"
cp -a ${SOURCE_DIR}/{.config,.kernelrelease,Module.symvers} "${DIR}"
cd ${SOURCE_DIR}; \
find . -mindepth 1 -maxdepth 1 \
! -name debian -a ! -name Documentation -a ! -name include -a \
! -name DEBIAN -a ! -name scripts -a ! -name arch -a ! -name '.*' -a \( \
-name Makefile -o -type d \) \
-printf "../${PACKAGE_NAME_HEADERS}/%f\n" | \
xargs ln -s --target-directory="${DIR}"
cd ${SOURCE_DIR}; \
find "arch/${KERNEL_ARCH}" -mindepth 1 -maxdepth 1 \( \
-type d -a ! -name include -a ! -name kernel -o \
-type f -a \( -name 'Makefile*' -o -name 'Kconfig*' \) \) \
-printf "../../../${PACKAGE_NAME_HEADERS}/%p\n" | \
xargs ln -s --target-directory="${DIR}/arch/${KERNEL_ARCH}"
[ -d "${SOURCE_DIR}/arch/${KERNEL_ARCH}/include" ] && \
cp -a "${SOURCE_DIR}/arch/${KERNEL_ARCH}/include" "${DIR}/arch/${KERNEL_ARCH}/include" || :
[ -f "${SOURCE_DIR}/arch/${KERNEL_ARCH}/kernel/asm-offsets.s" ] && \
ln -f "${SOURCE_DIR}/arch/${KERNEL_ARCH}/kernel/asm-offsets.s" "${DIR}/arch/${KERNEL_ARCH}/kernel" || :
ln -s "../../../../${PACKAGE_NAME_HEADERS}/arch/${KERNEL_ARCH}/kernel/Makefile" "${DIR}/arch/${KERNEL_ARCH}/kernel"
cd ${SOURCE_DIR}; \
find include -mindepth 1 -maxdepth 1 \
! -name config -a ! -name linux -a ! -name 'asm*' \
-printf "../../${PACKAGE_NAME_HEADERS}/%p\n" | \
xargs ln -s --target-directory="${DIR}/include"
cp -a ${SOURCE_DIR}/include/config "${DIR}/include"
ln -sf "asm-${KERNEL_ARCH}" "${DIR}/include/asm"
cd ${SOURCE_DIR}; \
for dir in linux asm-generic $(foreach t, $(KERNEL_HEADER_DIRS), asm-$(t)); do \
mkdir "${DIR}/include/$$dir"; \
for file in $$(find "include/$$dir" -mindepth 1 -maxdepth 1); do \
if [ -e ${CURDIR}/${REF_DIR}/$$file ]; then \
ln -s --target-directory="${DIR}/include/$$dir" "../../../${PACKAGE_NAME_HEADERS}/$$file"; \
elif [ -d ${CURDIR}/${SOURCE_DIR}/$$file ]; then \
cp -a "${CURDIR}/${SOURCE_DIR}/$$file" "${DIR}/include/$$dir"; \
else \
ln -f --target-directory="${DIR}/include/$$dir" "${CURDIR}/${SOURCE_DIR}/$$file"; \
fi \
done \
done
mkdir -p "${PACKAGE_DIR}/lib/modules/${REAL_VERSION}"
ln -s "/usr/src/${PACKAGE_NAME}" "${PACKAGE_DIR}/lib/modules/${REAL_VERSION}/build"
ln -s "../${PACKAGE_NAME_KBUILD}/scripts" "${DIR}"
$(MAKE) -f debian/rules.real install-base
install-headers-all: PACKAGE_NAME = linux-headers-$(VERSION)
install-headers-all: DH_OPTIONS = -p$(PACKAGE_NAME)
install-headers-all:
dh_testdir
dh_testroot
chmod a+x debian/modules/gencontrol.py
dh_install debian/arch debian/lib debian/modules '/usr/src/linux-headers-$(VERSION)'
dh_python -V 2.4 /usr/src/linux-headers-$(VERSION)/lib/python
$(MAKE) -f debian/rules.real install-base
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): REAL_VERSION = $(UPSTREAMVERSION)$(ABINAME)$(LOCALVERSION)
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): PACKAGE_NAME = linux-image-$(REAL_VERSION)
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): PACKAGE_DIR = $(CURDIR)/debian/$(PACKAGE_NAME)
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): DIR=$(BUILD_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): $(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE)
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-kernel-package:
ifdef IMAGE_POSTPROC
# Install the postproc script into the hook directory
install -d '$(DIR)/debian/image.d'
install 'debian/bin/$(IMAGE_POSTPROC)' '$(DIR)/debian/image.d'
endif
cd '$(DIR)'; $(setup_env) $(kpkg_image) kernel-image
cat '$(DIR)/debian/files' >> debian/files
@for i in $$(awk '{ print $$1; }' '$(DIR)/debian/files'); do \
echo "mv \"$(BUILD_DIR)/$$i\" .."; \
mv "$(BUILD_DIR)/$$i" ..; \
done
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-s390-tape: DH_OPTIONS = -p$(PACKAGE_NAME)
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-s390-tape:
dh_testdir
dh_testroot
dh_clean -d -k
dh_installdirs 'boot'
cp '$(DIR)/arch/s390/boot/image' $(PACKAGE_DIR)/boot/vmlinuz-$(REAL_VERSION)
$(MAKE) -f debian/rules.real install-base
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-xen: MODULES_PACKAGE_NAME = linux-modules-$(REAL_VERSION)
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-xen: MODULES_PACKAGE_DIR = $(CURDIR)/debian/$(MODULES_PACKAGE_NAME)
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-xen: DH_OPTIONS = -p$(PACKAGE_NAME) -p$(MODULES_PACKAGE_NAME)
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-xen:
dh_testdir
dh_testroot
dh_clean -d -k
dh_installdirs 'boot'
cp '$(DIR)/vmlinuz' $(PACKAGE_DIR)/boot/vmlinuz-$(REAL_VERSION)
cd '$(DIR)'; $(setup_env) make modules_install ARCH=$(KERNEL_ARCH) INSTALL_MOD_PATH=$(MODULES_PACKAGE_DIR)
rm $(MODULES_PACKAGE_DIR)/lib/modules/$(REAL_VERSION)/{build,source}
$(MAKE) -f debian/rules.real install-base DH_OPTIONS='$(DH_OPTIONS)'
install-patch: PACKAGE = linux-patch-debian-$(VERSION)
install-patch: pbase := /usr/src/kernel-patches/all/$(SOURCE_UPSTREAM)
install-patch: pfull := debian/$(PACKAGE)$(pbase)
install-patch: ptchs := $(notdir $(wildcard debian/patches-arch/*))
install-patch: DH_OPTIONS = -p$(PACKAGE)
install-patch:
dh_testdir
dh_testroot
dh_clean -d -k $(DH_OPTIONS)
dh_installdirs $(DH_OPTIONS) '$(pbase)/apply' '$(pbase)/debian' '$(pbase)/unpatch'
dh_install $(DH_OPTIONS) debian/patches/* '$(pbase)/debian'
sed \
-e 's,@home@,$(pbase)/debian,' \
-e 's,@revisions@,$(REVISIONS),' \
-e 's,@source@,$(SOURCEVERSION),' \
debian/bin/apply.py > '$(pfull)/apply/debian'
sed -e 's/@upstream@/$(SOURCE_UPSTREAM)/g' debian/bin/unpatch > '$(pfull)/unpatch/debian'
chmod 755 '$(pfull)/apply/debian' '$(pfull)/unpatch/debian'
chmod 644 '$(pfull)/debian/'*.patch
bzip2 -9 '$(pfull)/debian/'*.patch
$(MAKE) -f debian/rules.real install-base DH_OPTIONS='$(DH_OPTIONS)'
install-source: DH_OPTIONS = -plinux-source-$(VERSION)
install-source: $(BUILD_DIR)/linux-source-$(UPSTREAMVERSION).tar.bz2
dh_testdir
dh_testroot
dh_install $(DH_OPTIONS) '$<' /usr/src
$(MAKE) -f debian/rules.real install-base DH_OPTIONS='$(DH_OPTIONS)'
install-tree: DH_OPTIONS = -plinux-tree-$(VERSION)
install-tree:
$(MAKE) -f debian/rules.real install-dummy DH_OPTIONS='$(DH_OPTIONS)'
|