root/morphix/trunk/cowloop/debian/rules

Revision 2, 2.8 kB (checked in by nextime, 2 years ago)

Initial import, branching from morphix svn

  • Property svn:executable set to
Line 
1 #!/usr/bin/make -f
2
3 PKG             = cowloop
4 PKG_VERS        = 2.11
5 SRC_NAME        = cowloop-source
6 MOD_NAME        = cowloop-module
7
8 KVERS           ?= ${uname -r}
9 ARCH            ?= ${dpkg --print-architecture}
10
11 COWLOOP_BIN     = cowlist cowrepair cowsync cowdev
12
13 gencontrol= sed 's/\#KVERS\#/$(KVERS)/g' > $(CURDIR)/debian/control
14
15 configure: configure-stamp
16 configure-stamp:
17         dh_testdir
18         cat debian/{control.head,control.src,control.utils} | $(gencontrol)
19         touch configure-stamp
20
21 build: build-stamp
22
23 build-stamp: configure-stamp
24         dh_testdir
25
26         # Add here commands to compile the package.
27         #$(MAKE)
28         #/usr/bin/docbook-to-man debian/cowloop.sgml > cowloop.1
29
30         touch build-stamp
31
32 clean: 
33         dh_testroot
34         rm -f build-stamp configure-stamp
35         rm -rf debian/cowloop-source
36         rm -rf debian/cowloop-utils
37
38         dh_clean
39
40         # Add here commands to clean up after the build process.
41         $(MAKE) clean
42
43
44 install: 
45         dh_testdir
46         dh_testroot
47         dh_clean -k
48         dh_installdirs
49
50         # Add here commands to install the package into debian/cowloop.
51         #$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
52
53         # cowloop-source
54         tar -c --exclude ".svn" --exclude "CVS" --exclude "debian" --exclude "cowcopy" --exclude "cowrepair" --exclude "cowsync" --exclude "cowlist" * | tar x -C debian/tmp/usr/src/modules/cowloop
55         cd debian; cp rules changelog copyright control* tmp/usr/src/modules/cowloop/debian
56         cd debian; cp cowloop-source.README.Debian tmp/usr/src/modules/cowloop/debian/README.Debian
57         cd debian/tmp/usr/src/ && tar c modules | bzip2 -9 > cowloop.tar.bz2 && rm -rf modules
58
59         # just build binaries
60         $(MAKE) $(COWLOOP_BIN)
61
62         dh_installdocs
63         dh_install
64
65 # Build architecture-independent files here.
66 binary-indep: install
67 # We have nothing to do by default.
68
69 # Build architecture-dependent files here.
70 binary-arch: build install
71         dh_testdir
72         dh_testroot
73         dh_installdocs
74         dh_installexamples
75         dh_installman -p cowloop-utils
76         dh_link
77         dh_strip
78         dh_compress
79         dh_fixperms
80         dh_installdeb
81         dh_gencontrol
82         dh_md5sums
83         dh_builddeb
84
85 binary: binary-indep binary-arch
86
87 # prefix of the target package name
88 PACKAGE=cowloop-module
89 # modifieable for experiments or debugging m-a
90 MA_DIR ?= /usr/share/modass
91 # load generic variable handling
92 -include $(MA_DIR)/include/generic.make
93 # load default rules
94 -include $(MA_DIR)/include/common-rules.make
95
96 # debian version
97 DVERS=1
98
99 kdist_clean: clean
100 kdist_config: kdist_configure
101 kdist_configure: prep-deb-files
102         cat debian/{control.head,control.mod} | $(gencontrol)
103
104 binary-modules:  kdist_config
105         dh_clean -k
106         dh_installdirs lib/modules/$(KVERS)/misc
107         $(MAKE) KERNDIR=$(KSRC) cowloop.ko
108         cp cowloop.ko debian/tmp/lib/modules/$(KVERS)/misc/
109         dh_compress -a
110         dh_fixperms -a
111         dh_installdeb -a
112         dh_gencontrol -a -- -v$(VERSION)
113         dh_md5sums
114         dh_builddeb -a --destdir=$(DEB_DESTDIR)
115
116 .PHONY: build clean binary-indep binary-arch binary kdist kdist_image kdist_configure kdist_clean kdist
Note: See TracBrowser for help on using the browser.