File: rules

package info (click to toggle)
cdfs-src 2.4.20.a%2B2.6.18-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 144 kB
  • ctags: 4
  • sloc: makefile: 82; sh: 16
file content (135 lines) | stat: -rwxr-xr-x 3,264 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
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
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

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

# This is the debhelper compatability version to use.
export DH_COMPAT=5

configure: configure-stamp
configure-stamp:
	dh_testdir
	
	# add stuff for configuration

	touch configure-stamp

build: configure-stamp build-stamp
build-stamp:
	dh_testdir

	#$(MAKE)

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp

	# Add here commands to clean up after the build process.
	#-$(MAKE) clean

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	cd $(CURDIR)
	mkdir -p $(CURDIR)/debian/cdfs-src/usr/src/modules/cdfs/debian
	for x in cdfs*bz2 ; do bzcat $$x | tar x -C $(CURDIR)/debian/cdfs-src/usr/src/modules/ ; done
	cd $(CURDIR)/debian/cdfs-src/usr/src/modules && mv cdfs-2.6.* cdfs/2.6 && mv cdfs-2.4* cdfs/2.4
	cp -a debian/*modules.in* debian/rules debian/*KVERS* debian/changelog debian/copyright patch.cdfs \
		$(CURDIR)/debian/cdfs-src/usr/src/modules/cdfs/debian/
	cp patch.cdfs debian/cdfs-src/usr/src/modules/cdfs/
	dh_fixperms
	cd $(CURDIR)/debian/cdfs-src/usr/src && tar c modules | bzip2 -9 > cdfs.tar.bz2 && rm -rf modules

# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
#	dh_installdebconf	
	dh_installdocs
	dh_installexamples
#	dh_installmanpages
#	dh_undocumented
	dh_installchangelogs 
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
#	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb


# Name of package
PACKAGE         = cdfs
# modifieable for experiments or debugging m-a
MA_DIR ?= /usr/share/modass
# load generic variable handling
-include $(MA_DIR)/include/generic.mk
# load default rules
-include $(MA_DIR)/include/common-rules.mk
export CC

kdist_config: prep-deb-files

binary-modules: prep-deb-files
	cd $(CURDIR)
	mkdir -p debian/cdfs-$(KVERS)/lib/modules/$(KVERS)/kernel/fs
ifeq ($(shell echo $(KVERS) | sed -e 's/\(...\).*/\1/'),2.6)
	cd 2.6 && make KDIR=$(KSRC)
#	$(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -r -o cdfs.ko 2.6/cdfs.o
	cp 2.6/cdfs.ko debian/cdfs-$(KVERS)/lib/modules/$(KVERS)/kernel/fs/
else
	cd 2.4 && ./configure --with-kernel-dir="$(KSRC)" && make CONFIG_CDFS_KERNELDIR="$(KSRC)"
	cp 2.4/cdfs.o debian/cdfs-$(KVERS)/lib/modules/$(KVERS)/kernel/fs/
endif
#	dh_installdebconf	
	dh_installdocs 2.4/cdfs.html 2.4/cdfs.png
#	dh_installexamples
#	dh_installmanpages
#	dh_undocumented
	dh_installchangelogs 
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	# You may want to make some executables suid here.
#	dh_suidregister
#	dh_makeshlibs
	dh_installdeb
#	dh_perl
#	dh_shlibdeps
	dh_gencontrol  -- -v$(VERSION)
	dh_md5sums
	dh_builddeb --destdir=$(DEB_DESTDIR)

.PHONY: clean
kdist_clean:
	-dh_testdir
	-dh_testroot
	rm -f build-stamp configure-stamp
	-dh_clean
	-rm -f $(CURDIR)/debian/control
	-rm -rf $(CURDIR)/debian/cdfs-2.* *.o *.ko */*.o */*.ko
	-$(MAKE) clean
	-cd 2.6 && $(MAKE) clean
	-cd 2.4 && $(MAKE) clean


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