File: rules

package info (click to toggle)
ccspatch 1.6.3-20080715-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,848 kB
  • ctags: 1,051
  • sloc: ansic: 12,055; sh: 1,731; makefile: 62
file content (88 lines) | stat: -rwxr-xr-x 1,952 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode. 
#export DH_VERBOSE=1

PATCHDIFF=$(CURDIR)/debian/patchdiff
kernelversionlist=2.4.34 2.4.35 2.6.18 2.6.22 2.6.23 2.6.24 2.6.25 2.6.26

configure: configure-stamp 
configure-stamp: patch
	dh_testdir
	touch configure-stamp


build-arch: configure-stamp build-arch-stamp
build-arch-stamp:
	dh_testdir
	touch $@

build-indep: configure-stamp build-indep-stamp 

	mkdir -p $(PATCHDIFF)/ccspatch-skel && \
	mkdir -p $(PATCHDIFF)/ccspatch && \
	ln -s $(CURDIR)/fs $(PATCHDIFF)/ccspatch/ && \
	ln -s $(CURDIR)/include $(PATCHDIFF)/ccspatch/

	cd $(PATCHDIFF) && \
	diff -urN ccspatch-skel ccspatch | sed -e "s/debian\/patchdiff\///g" \
	> $(PATCHDIFF)/kernel.diff

	for ver in $(kernelversionlist) ; \
	do \
	  cp $(CURDIR)/patches/ccs-patch-$$ver.diff \
	    $(CURDIR)/debian/patches/ccs-patch-$$ver.diff ;\
	  cat $(PATCHDIFF)/kernel.diff >> \
	    $(CURDIR)/debian/patches/ccs-patch-$$ver.diff ;\
	done
	-rm -rf $(PATCHDIFF)

build-indep-stamp:
	dh_testdir

	touch $@

build: build-arch build-indep

clean: unpatch
	dh_testdir
	dh_testroot
	rm -f build-arch-stamp build-indep-stamp configure-stamp
	rm -f $(CURDIR)/debian/patches/ccs-patch-*.diff
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installkpatches

# Build architecture-independent files here.
# Pass -i to all debhelper commands in this target to reduce clutter.
binary-indep: build install
	dh_testdir 
	dh_testroot 
	dh_installchangelogs 
	dh_installdocs
	dh_compress 
	dh_fixperms 
	dh_gencontrol -plinux-patch-tomoyo
	dh_md5sums 
	dh_builddeb -plinux-patch-tomoyo

# Build architecture-dependent files here.
binary-arch: binary-indep

binary: binary-indep binary-arch

patch: patch-stamp
patch-stamp:
	dpatch apply-all
	dpatch cat-all >patch-stamp
	touch patch-stamp

unpatch:
	dpatch deapply-all
	rm -rf patch-stamp debian/patched


.PHONY: build clean binary-indep binary-arch binary install patch unpatch