File: rules

package info (click to toggle)
vdk2 2.0.1-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,616 kB
  • ctags: 4,174
  • sloc: cpp: 25,357; sh: 8,955; ansic: 5,275; makefile: 577; perl: 113
file content (215 lines) | stat: -rwxr-xr-x 6,076 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
#!/usr/bin/make -f

# debian/rules file for gtk+ Debian package
# written Feb 1999 by Ionutz Borcoman <borco@borco-ei.eng.hokudai.ac.jp>
# used the script written  April 1998 by Ben Gertzfield <che@debian.org> for glib

build: build-stamp
build-stamp:
	dh_testdir
	./configure --prefix=/usr --enable-debug=no \
		--enable-testvdk=no --mandir=/usr/share/man \
		--enable-sigc=yes  --enable-testsigc=no --enable-gnome=yes
	$(MAKE)
	$(MAKE) docs
	touch build-stamp

build-dbg: build-dbg-stamp
build-dbg-stamp:
	dh_testdir
	./configure --prefix=/usr --enable-debug=yes \
		--enable-testvdk=no --mandir=/usr/share/man \
		--enable-sigc=yes  --enable-testsigc=no --enable-gnome=yes
	$(MAKE)
	touch build-dbg-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp build-dbg-stamp install-stamp install-dbg-stamp
	# Add here commands to clean up after the build process.
	-$(MAKE) distclean
	find . -name '*.o' -o -name '_libs' -o -name '*.lo' -o -name '*.a' -o -name '.deps' | xargs rm -rf
	dh_clean

clean-dbg:
	dh_testdir
	dh_testroot
	rm -f build-stamp build-dbg-stamp install-stamp install-dbg-stamp
	# Add here commands to clean up after the build process.
	-$(MAKE) distclean
	find . -name '*.o' -o -name '_libs' -o -name '*.lo' -o -name '*.a' -o -name '.deps' | xargs rm -rf
	dh_clean -k

install: install-stamp
install-stamp: build
	dh_testdir
	dh_testroot
	dh_clean
	$(MAKE) prefix=`pwd`/debian/tmp/usr mandir=`pwd`/debian/tmp/usr/share/man install
	touch install-stamp

install-dbg: install-dbg-stamp
install-dbg-stamp: build-dbg
	dh_testdir
	dh_testroot
	dh_clean -k
	$(MAKE) prefix=`pwd`/debian/libvdk2-dbg/usr mandir=`pwd`/debian/tmp/usr/share/man install
	touch install-dbg-stamp

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

# Build architecture-dependent files here.
binary-arch: build install libvdk2-doc libvdk2-dev libvdk2 libvdk2-dbg

libvdk2: build
	dh_testdir -plibvdk2
	dh_testroot -plibvdk2
	dh_installdirs -plibvdk2

	# Add here commands to install the files into debian/tmp
	rm -rf debian/tmp/usr/bin \
		debian/tmp/usr/include \
		debian/tmp/usr/share/aclocal \
		debian/tmp/usr/share/man \
		debian/tmp/usr/lib/*.la
	dh_installdocs -plibvdk2

	# rename the ChangeLog
	cd debian/tmp/usr/share/doc/libvdk2/; \
	    mv ChangeLog changelog 

	dh_installchangelogs -plibvdk2
	dh_strip -plibvdk2
	dh_compress -plibvdk2
	dh_fixperms -plibvdk2
	dh_installdeb -plibvdk2
	dh_shlibdeps -plibvdk2
	dh_gencontrol -plibvdk2
	dh_makeshlibs -plibvdk2 -V
	dh_md5sums -plibvdk2
	dh_builddeb -plibvdk2

libvdk2-doc: build
	dh_testdir -plibvdk2-doc
	dh_testroot -plibvdk2-doc
	dh_clean -v -plibvdk2-doc -k

	dh_installdirs -plibvdk2-doc

	# Add here commands to install the files into debian/tmp
	dh_movefiles -plibvdk2-doc

	# copy documentation
	files="\
		html" ; \
        working_dir=`pwd`; \
    	cd doc/doxy; \
	for file in $$files; do \
	    echo $$file; \
	    install -d $$working_dir/debian/libvdk2-doc/usr/share/doc/libvdk2-doc/$$file; \
	    install -m 644 $$file/* \
		$$working_dir/debian/libvdk2-doc/usr/share/doc/libvdk2-doc/$$file/; \
	done

	dh_installdocs -plibvdk2-doc
	dh_installchangelogs -plibvdk2-doc
	dh_strip -plibvdk2-doc
	dh_compress -plibvdk2-doc
	dh_fixperms -plibvdk2-doc

	dh_installdeb -plibvdk2-doc
	dh_shlibdeps -plibvdk2-doc
	dh_gencontrol -plibvdk2-doc
	dh_md5sums -plibvdk2-doc
	dh_builddeb -plibvdk2-doc
	
libvdk2-dev: build
	dh_testdir -plibvdk2-dev
	dh_testroot -plibvdk2-dev
	dh_clean -v -plibvdk2-dev -k

	dh_installdirs -plibvdk2-dev

	# Add here commands to install the files into debian/tmp
	dh_movefiles -plibvdk2-dev
	cp vdk-config-2 debian/tmp/usr/bin

	# start copying the examples 
	# here we do something not very clean, but it is working
	# aka, we sometimes try to "install -m 644" some directories
	# the final thing works anyhow
	files="\
		childtask \
		iotut \
		hello \
		template" ; \
    working_dir=`pwd`; \
	for file in example/$$files; do \
	    install -d debian/libvdk2-dev/usr/share/doc/libvdk2-dev/examples/$$file; \
	    cd $$working_dir; \
	    install -m 644 example/$$file/* \
		debian/libvdk2-dev/usr/share/doc/libvdk2-dev/examples/$$file/; \
	done

	files="\
		testvdk \
		doc \
		sigcvdktest " ; \
    working_dir=`pwd`; \
	for file in $$files; do \
	    install -d debian/libvdk2-dev/usr/share/doc/libvdk2-dev/$$file; \
	    cd $$working_dir; \
	    install -m 644 $$file/* \
		debian/libvdk2-dev/usr/share/doc/libvdk2-dev/$$file/; \
	done
	echo finished docs

	# remove unwanted stuff from debian/libvdk2-dev/usr/share/doc/libvdk2-dev/doc
	rm -f debian/libvdk2-dev/usr/share/doc/libvdk2-dev/doc/Makefile*  \
	    debian/libvdk2-dev/usr/share/doc/libvdk2-dev/doc/vdk-config-2.1 \
	    debian/libvdk2-dev/usr/share/doc/libvdk2-dev/doc/vdk-config-2.1.in
	dh_installdocs -plibvdk2-dev 
	dh_installchangelogs -plibvdk2-dev
	dh_strip -plibvdk2-dev
	dh_compress -plibvdk2-dev
	dh_fixperms -plibvdk2-dev

	dh_installdeb -plibvdk2-dev
	dh_shlibdeps -plibvdk2-dev
	dh_gencontrol -plibvdk2-dev
	dh_md5sums -plibvdk2-dev
	dh_builddeb -plibvdk2-dev

libvdk2-dbg: clean-dbg install-dbg
	dh_testdir -plibvdk2-dbg
	dh_testroot -plibvdk2-dbg
	dh_installdirs -plibvdk2-dbg

	# Add here commands to install the files into debian/libvdk2-dbg
	rm -rf debian/libvdk2-dbg/usr/bin \
		debian/libvdk2-dbg/usr/include \
		debian/libvdk2-dbg/usr/share/man \
		debian/libvdk2-dbg/usr/share \
		debian/libvdk2-dbg/usr/lib/*.{la,so*}
	for file in `find debian/libvdk2-dbg/usr/lib -name '*.a'` ; do \
	  mv $$file debian/libvdk2-dbg/usr/lib/`basename $$file .a`_g.a; \
    done

	dh_installdocs -plibvdk2-dbg
	dh_installchangelogs -plibvdk2-dbg
	dh_compress -plibvdk2-dbg
	dh_fixperms -plibvdk2-dbg
	dh_installdeb -plibvdk2-dbg
	dh_shlibdeps -plibvdk2-dbg
	dh_gencontrol -plibvdk2-dbg
	dh_md5sums -plibvdk2-dbg
	dh_builddeb -plibvdk2-dbg

source diff:                                                                  
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

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