File: rules

package info (click to toggle)
kernel-image-2.2.19-netwinder 20040303
  • links: PTS
  • area: main
  • in suites: woody
  • size: 112 kB
  • ctags: 16
  • sloc: ansic: 1,415; makefile: 45; sh: 5
file content (72 lines) | stat: -rwxr-xr-x 2,087 bytes parent folder | download
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
#!/usr/bin/make -f
#
# debian/rules for kernel-image-*-compact
#
# GNU copyright 1997 to 1999 by Joey Hess.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export PATCH_THE_KERNEL=YES

# This is the debhelper compatability version to use.
SUBARCH=netwinder
Version:=$(shell head -1 debian/changelog | sed 's/^kernel-image-\(.*\)-$(SUBARCH).*$$/\1/')#'

PACKAGE=kernel-image-$(Version)-$(SUBARCH)
DESTDIR:=$(shell pwd)/debian/tmp
PATH:=$(PWD)/debian:$(PATH)

gcccheck:
	echo $(PATH)
	gcc -v

unpack: unpack-stamp
unpack-stamp:
	tar --bzip2 -xf /usr/src/kernel-source-$(Version).tar.bz2
	#cp debian/linux_logo_debian_swirl.h kernel-source-$(Version)/include/linux/linux_logo.h
	#sed -e 's/^\(KERNELRELEASE=.*\)$$/\1-$$(SUBARCH)/' kernel-source-$(Version)/Makefile > Makefile.tmp
	#mv -f Makefile.tmp kernel-source-$(Version)/Makefile
	touch unpack-stamp

build: build-stamp
build-stamp: unpack-stamp
	dh_testroot
	dh_testdir
	mkdir -p kernel-source-$(Version)/debian
	cp debian/changelog kernel-source-$(Version)/debian
	cp debian/control kernel-source-$(Version)/debian
	echo official > kernel-source-$(Version)/debian/official
	cp config kernel-source-$(Version)/.config
	cd kernel-source-$(Version); make-kpkg --subarch $(SUBARCH) --arch_in_name --added_patches arm-2_2_19 build

	touch build-stamp

clean:
	rm -f build-stamp install-stamp unpack-stamp
	-rm -rf kernel-source-$(Version)
	dh_clean

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	touch install-stamp

# Build architecture-independent files here.
binary-indep: build install
#	dh_testversion

# Build architecture-dependent files here.
binary-arch: build install
#	dh_testversion
	dh_testdir
	dh_testroot
	cd kernel-source-$(Version); make-kpkg --subarch $(SUBARCH) --arch_in_name kernel-image
	cd kernel-source-$(Version); make-kpkg --subarch $(SUBARCH) --arch_in_name kernel_headers
	cp kernel-source-$(Version)/debian/files debian
	mv *.deb ..

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install unpack