File: rules

package info (click to toggle)
vdk2 2.4.0-5.5
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 4,528 kB
  • sloc: cpp: 26,950; sh: 10,974; ansic: 9,220; makefile: 605; perl: 113
file content (218 lines) | stat: -rwxr-xr-x 6,366 bytes parent folder | download | duplicates (2)
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
216
217
218
#!/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

#include /usr/share/dpatch/dpatch.make

export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)


build-arch: build
build-indep: build
build: build-stamp 
build-stamp:
	dh_testdir
	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
		--prefix=/usr --enable-debug=no \
		--enable-testvdk=no --mandir=/usr/share/man \
		--enable-gnome=yes
	$(MAKE)
	$(MAKE) docs
	touch build-stamp

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

clean: clean1 
clean1:
	dh_testdir
	dh_testroot
	rm -f build-stamp build-dbg-stamp install-stamp install-dbg-stamp
	# autotools-dev stuff
	-test -r /usr/share/misc/config.sub && \
	  cp -f /usr/share/misc/config.sub config.sub
	-test -r /usr/share/misc/config.guess && \
	  cp -f /usr/share/misc/config.guess config.guess

	# 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

install: install-stamp
install-stamp: build
	dh_testdir
	dh_testroot
	$(MAKE) DESTDIR=`pwd`/debian/libvdk2-2c2 install
	rm -f $(CURDIR)/debian/libvdk2-2c2/usr/lib/*.la
	chrpath -d $(CURDIR)/debian/libvdk2-2c2/usr/lib/*.so*
	touch install-stamp

install-dbg: install-dbg-stamp
install-dbg-stamp: build-dbg
	dh_testdir
	dh_testroot
	$(MAKE) DESTDIR=`pwd`/debian/libvdk2-dbg install
	touch install-dbg-stamp

# Build architecture-independent files here.
binary-indep: build install libvdk2-doc 
libvdk2-doc: build
	dh_testdir -plibvdk2-doc
	dh_testroot -plibvdk2-doc

	dh_installdirs -plibvdk2-doc

	# Add here commands to install the files from debian/libvdk2-2c2
	dh_movefiles -plibvdk2-doc --sourcedir=debian/libvdk2-2c2

	# 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 ChangeLog
	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


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

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

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

	dh_installchangelogs -plibvdk2-2c2 ChangeLog
	dh_strip -plibvdk2-2c2
	dh_compress -plibvdk2-2c2
	dh_fixperms -plibvdk2-2c2
	dh_installdeb -plibvdk2-2c2
	dh_shlibdeps -plibvdk2-2c2
	dh_gencontrol -plibvdk2-2c2
	dh_makeshlibs -plibvdk2-2c2 -V 'libvdk2-2c2 (>= 2.0.3-3)'
	dh_md5sums -plibvdk2-2c2
	dh_builddeb -plibvdk2-2c2


libvdk2-dev: build
	dh_testdir -plibvdk2-dev
	dh_testroot -plibvdk2-dev

	dh_installdirs -plibvdk2-dev

	# Add here commands to install the files from debian/libvdk2-2c2
	dh_movefiles -plibvdk2-dev --sourcedir=debian/libvdk2-2c2
	cp vdk-config-2 debian/libvdk2-dev/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 ChangeLog
	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: 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 \
		debian/libvdk2-dbg/usr/lib/*.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 ChangeLog
	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 build-arch build-indep clean binary-indep binary-arch binary patch unpatch