[svn-inject] Applying Debian modifications (1:0.9.4+r4100.20090929-0.1) to trunk
[debian/madwifi.git] / debian / rules.modules
1 #!/usr/bin/make -f
2
3 PACKAGE := madwifi-modules
4 MA_DIR ?= /usr/share/modass
5 -include $(MA_DIR)/include/generic.make
6 -include $(MA_DIR)/include/common-rules.make
7
8 .PHONY: kdist_config
9 kdist_config: prep-deb-files
10
11 .PHONY: binary-modules
12 binary-modules: kdist_config
13         dh_testdir
14         dh_testroot
15         dh_clean -k
16         
17         # Build modules
18         $(MAKE) -C $(CURDIR) modules \
19         KERNELPATH=$(KSRC) KERNELRELEASE=$(KVERS) KERNELCONF=$(KSRC)/.config
20         
21         # Install modules
22         $(MAKE) -C $(CURDIR) install-modules \
23         KERNELPATH=$(KSRC) KERNELRELEASE=$(KVERS) KERNELCONF=$(KSRC)/.config \
24         DESTDIR=$(CURDIR)/debian/$(PKGNAME) KMODPATH=/lib/modules/$(KVERS)/kernel/drivers/net
25
26         dh_installdocs
27         dh_installchangelogs
28         dh_compress
29         dh_fixperms
30         dh_installmodules
31         dh_installdeb
32         dh_gencontrol -- -v$(VERSION)
33         dh_md5sums
34         dh_builddeb --destdir=$(DEB_DESTDIR)
35
36 .PHONY: kdist_clean
37 kdist_clean:
38         dh_testdir
39         dh_testroot
40         dh_clean
41         $(MAKE) -C $(CURDIR) clean \
42         KERNELPATH=$(KSRC) KERNELRELEASE=$(KVERS) KERNELCONF=$(KSRC)/.config