]>
Commit | Line | Data |
---|---|---|
1 | #!/usr/bin/make -f | |
2 | # debian/rules file to build packages from wxWindows CVS source | |
3 | # | |
4 | # Sculpted 13/2/2000 by Ron Lee <ron@debian.org> from new and | |
5 | # variously stolen code :-) | |
6 | # It makes copious use of the debhelper utilities written by | |
7 | # Joey Hess and others. | |
8 | ||
9 | #export DH_VERBOSE=1 | |
10 | export DH_COMPAT=2 | |
11 | export DH_OPTIONS | |
12 | ||
13 | release:=$(shell dpkg-parsechangelog | sed -n 's/^Source: wxwindows//p') | |
14 | python_dir:=python$(shell python -c "import sys;print sys.version[:3]") | |
15 | ||
16 | cross_host=i586-mingw32msvc | |
17 | cross_build=$(shell ./config.guess) | |
18 | ||
19 | config_cache=../config_deb.cache | |
20 | config_cache_cross=../config_deb_cross.cache | |
21 | ||
22 | # Packages to build: | |
23 | package_wxbase_lib=libwxbase$(release) | |
24 | package_wxbase_dev=libwxbase$(release)-dev | |
25 | package_wxbase_dbg=libwxbase$(release)-dbg | |
26 | package_gtk_lib=libwxgtk$(release) | |
27 | package_gtk_dev=libwxgtk$(release)-dev | |
28 | package_gtk_dbg=libwxgtk$(release)-dbg | |
29 | package_gtk_py=libwxgtk$(release)-python | |
30 | package_gtk_contrib=libwxgtk$(release)-contrib | |
31 | package_gtk_contrib_dev=libwxgtk$(release)-contrib-dev | |
32 | package_headers=wxwin$(release)-headers | |
33 | package_i18n=wxwin$(release)-i18n | |
34 | package_doc=wxwin$(release)-doc | |
35 | package_examples=wxwin$(release)-examples | |
36 | ||
37 | package_gtk_univ=libwxgtk$(release)-univ | |
38 | ||
39 | package_wxbase_msw_dev=libwxbase-msw$(release)-dev | |
40 | package_wxbase_msw_dbg=libwxbase-msw$(release)-dbg | |
41 | package_msw_dev=libwxmsw$(release)-dev | |
42 | package_msw_dbg=libwxmsw$(release)-dbg | |
43 | package_headers_msw=wxwin$(release)-headers-msw | |
44 | ||
45 | # Build directories: | |
46 | objdir_wxbase_shared=objs_wxbase_sh | |
47 | objdir_wxbase_static=objs_wxbase_st | |
48 | objdir_wxbase_debug=objs_wxbase_d | |
49 | objdir_gtk_shared=objs_gtk_sh | |
50 | objdir_gtk_static=objs_gtk_st | |
51 | objdir_gtk_debug=objs_gtk_d | |
52 | objdir_doc_cruft=objs_doc_con | |
53 | objdir_doc=docs/wxWindows-manual.html | |
54 | objdir_examples=docs/examples | |
55 | objdir_i18n=locale | |
56 | ||
57 | objdir_gtk_univ=objs_gtk_univ | |
58 | objdir_univ_install=objs_univ_install | |
59 | ||
60 | objdir_wxbase_msw_shared=objs_wxbase_msw_sh | |
61 | objdir_wxbase_msw_static=objs_wxbase_msw_st | |
62 | objdir_wxbase_msw_dbg=objs_wxbase_msw_d | |
63 | objdir_msw_shared=objs_msw_sh | |
64 | objdir_msw_static=objs_msw_st | |
65 | objdir_msw_dbg=objs_msw_d | |
66 | ||
67 | objdirs=$(objdir_wxbase_shared) $(objdir_wxbase_static) $(objdir_wxbase_debug) \ | |
68 | $(objdir_gtk_shared) $(objdir_gtk_static) $(objdir_gtk_debug) $(objdir_gtk_univ) \ | |
69 | $(objdir_univ_install) $(objdir_doc_cruft) $(objdir_doc) $(objdir_examples) \ | |
70 | $(objdir_wxbase_msw_shared) $(objdir_wxbase_msw_static) $(objdir_wxbase_msw_dbg) \ | |
71 | $(objdir_msw_shared) $(objdir_msw_static) $(objdir_msw_dbg) | |
72 | ||
73 | # note that the i18n package is actually arch indep (once built) | |
74 | # but must be built (and installed) during the arch any phase as | |
75 | # it's pulled out of the wxGtk shared lib package. | |
76 | ||
77 | # Build stamps: | |
78 | build_arch_stamps=build-wxbase-shared-stamp build-wxbase-static-stamp \ | |
79 | build-wxbase-debug-stamp build-gtk-shared-stamp \ | |
80 | build-gtk-static-stamp build-gtk-debug-stamp \ | |
81 | build-gtk-univ-stamp \ | |
82 | build-contrib-shared-stamp build-contrib-static-stamp \ | |
83 | build-gtk-py-stamp build-i18n-stamp | |
84 | ||
85 | build_indep_stamps=build-examples-stamp build-doc-stamp | |
86 | ||
87 | build_cross_stamps=build-wxbase-msw-shared-stamp build-wxbase-msw-static-stamp \ | |
88 | build-wxbase-msw-dbg-stamp build-msw-shared-stamp \ | |
89 | build-msw-static-stamp build-msw-dbg-stamp | |
90 | ||
91 | build_stamps_native=$(build_arch_stamps) $(build_indep_stamps) | |
92 | ||
93 | build_stamps=$(build_stamps_native) $(build_cross_stamps) | |
94 | ||
95 | # Install targets: | |
96 | install_all_arch=install-wxbase-lib install-wxbase-dev install-wxbase-dbg \ | |
97 | install-gtk-lib install-gtk-dev install-gtk-dbg \ | |
98 | install-gtk-univ \ | |
99 | install-gtk-contrib install-gtk-contrib-dev install-gtk-py \ | |
100 | install-headers install-i18n | |
101 | ||
102 | install_all_indep=install-examples install-doc | |
103 | ||
104 | install_all_cross=install-wxbase-msw-dev install-wxbase-msw-dbg install-msw-dev install-msw-dbg install-headers-msw | |
105 | ||
106 | install_all_native=$(install_all_arch) $(install_all_indep) | |
107 | ||
108 | install_all=$(install_all_native) $(install_all_cross) | |
109 | ||
110 | ||
111 | wxconfig:=$(shell pwd)/$(objdir_gtk_shared)/wx-config \ | |
112 | --prefix=$(shell pwd) \ | |
113 | --exec-prefix=$(shell pwd)/$(objdir_gtk_shared) | |
114 | ||
115 | ||
116 | # The Rules: | |
117 | ||
118 | debian/control: debian/control.in | |
119 | sed -e 's/=V/$(release)/g' < debian/control.in > debian/control | |
120 | ||
121 | control-files-stamp: debian/control | |
122 | dh_testdir | |
123 | @for f in dirs postinst; do \ | |
124 | echo "generating control file $(package_wxbase_lib).$$f"; \ | |
125 | cp debian/libwxbase.$$f debian/$(package_wxbase_lib).$$f; \ | |
126 | done; | |
127 | @for f in dirs files links postinst prerm; do \ | |
128 | echo "generating control file $(package_wxbase_dev).$$f"; \ | |
129 | sed -e 's/=V/$(release)/g' < debian/libwxbase-dev.$$f \ | |
130 | > debian/$(package_wxbase_dev).$$f; \ | |
131 | done; | |
132 | @for f in dirs links postinst prerm; do \ | |
133 | echo "generating control file $(package_wxbase_dbg).$$f"; \ | |
134 | sed -e 's/=V/$(release)/g' < debian/libwxbase-dbg.$$f \ | |
135 | > debian/$(package_wxbase_dbg).$$f; \ | |
136 | done; | |
137 | @for f in dirs postinst; do \ | |
138 | echo "generating control file $(package_gtk_lib).$$f"; \ | |
139 | cp debian/libwxgtk.$$f debian/$(package_gtk_lib).$$f; \ | |
140 | done; | |
141 | @for f in dirs files links postinst prerm; do \ | |
142 | echo "generating control file $(package_gtk_dev).$$f"; \ | |
143 | sed -e 's/=V/$(release)/g' < debian/libwxgtk-dev.$$f \ | |
144 | > debian/$(package_gtk_dev).$$f; \ | |
145 | done; | |
146 | @for f in dirs links postinst prerm; do \ | |
147 | echo "generating control file $(package_gtk_dbg).$$f"; \ | |
148 | sed -e 's/=V/$(release)/g' < debian/libwxgtk-dbg.$$f \ | |
149 | > debian/$(package_gtk_dbg).$$f; \ | |
150 | done; | |
151 | @for f in dirs links postinst prerm; do \ | |
152 | echo "generating control file $(package_gtk_univ).$$f"; \ | |
153 | sed -e 's/=V/$(release)/g' < debian/libwxgtk-univ.$$f \ | |
154 | > debian/$(package_gtk_univ).$$f; \ | |
155 | done; | |
156 | @for f in dirs docs files postinst prerm; do \ | |
157 | echo "generating control file $(package_gtk_py).$$f"; \ | |
158 | sed -e 's/=PY/$(python_dir)/g;s/=V/$(release)/g' < debian/libwxgtk-python.$$f \ | |
159 | > debian/$(package_gtk_py).$$f; \ | |
160 | done; | |
161 | @for f in dirs postinst; do \ | |
162 | echo "generating control file $(package_gtk_contrib).$$f"; \ | |
163 | cp debian/libwxgtk-contrib.$$f debian/$(package_gtk_contrib).$$f; \ | |
164 | done; | |
165 | @for f in dirs files; do \ | |
166 | echo "generating control file $(package_gtk_contrib_dev).$$f"; \ | |
167 | cp debian/libwxgtk-contrib-dev.$$f debian/$(package_gtk_contrib_dev).$$f; \ | |
168 | done; | |
169 | @for f in dirs files; do \ | |
170 | echo "generating control file $(package_headers).$$f"; \ | |
171 | cp debian/wxwin-headers.$$f debian/$(package_headers).$$f; \ | |
172 | done; | |
173 | @for f in dirs files; do \ | |
174 | echo "generating control file $(package_i18n).$$f"; \ | |
175 | cp debian/wxwin-i18n.$$f debian/$(package_i18n).$$f; \ | |
176 | done; | |
177 | @for f in dirs docs doc-base; do \ | |
178 | echo "generating control file $(package_doc).$$f"; \ | |
179 | sed -e 's/=V/$(release)/g' < debian/wxwin-doc.$$f \ | |
180 | > debian/$(package_doc).$$f; \ | |
181 | done; | |
182 | @for f in examples; do \ | |
183 | echo "generating control file $(package_examples).$$f"; \ | |
184 | cp debian/wxwin-examples.$$f debian/$(package_examples).$$f; \ | |
185 | done; | |
186 | @for f in dirs links postinst prerm; do \ | |
187 | echo "generating control file $(package_wxbase_msw_dev).$$f"; \ | |
188 | sed -e 's/=V/$(release)/g;s/=H/$(cross_host)/g' < debian/libwxbase-msw-dev.$$f \ | |
189 | > debian/$(package_wxbase_msw_dev).$$f; \ | |
190 | done; | |
191 | @for f in dirs links postinst prerm; do \ | |
192 | echo "generating control file $(package_wxbase_msw_dbg).$$f"; \ | |
193 | sed -e 's/=V/$(release)/g;s/=H/$(cross_host)/g' < debian/libwxbase-msw-dbg.$$f \ | |
194 | > debian/$(package_wxbase_msw_dbg).$$f; \ | |
195 | done; | |
196 | @for f in dirs links postinst prerm; do \ | |
197 | echo "generating control file $(package_msw_dev).$$f"; \ | |
198 | sed -e 's/=V/$(release)/g;s/=H/$(cross_host)/g' < debian/libwxmsw-dev.$$f \ | |
199 | > debian/$(package_msw_dev).$$f; \ | |
200 | done; | |
201 | @for f in dirs links postinst prerm; do \ | |
202 | echo "generating control file $(package_msw_dbg).$$f"; \ | |
203 | sed -e 's/=V/$(release)/g;s/=H/$(cross_host)/g' < debian/libwxmsw-dbg.$$f \ | |
204 | > debian/$(package_msw_dbg).$$f; \ | |
205 | done; | |
206 | @for f in dirs; do \ | |
207 | echo "generating control file $(package_headers_msw).$$f"; \ | |
208 | sed -e 's/=H/$(cross_host)/g' < debian/wxwin-headers-msw.$$f \ | |
209 | > debian/$(package_headers_msw).$$f; \ | |
210 | done; | |
211 | touch $@ | |
212 | ||
213 | build_arch: control-files-stamp $(build_arch_stamps) | |
214 | build_all: control-files-stamp $(build_stamps_native) | |
215 | ||
216 | # Really we should probably do nothing here until we know which | |
217 | # binary target is being called, but alpha builds were exploding | |
218 | # (compiler segfaults) in random places when building under fakeroot | |
219 | # from the binary-arch target. Build all -arch files here then, and | |
220 | # let the -indep stuff fend for itself later. | |
221 | ||
222 | build: build_arch | |
223 | ||
224 | ||
225 | build-wxbase-shared-stamp: | |
226 | dh_testdir | |
227 | mkdir -p $(objdir_wxbase_shared) | |
228 | cd $(objdir_wxbase_shared) \ | |
229 | && ../configure --prefix=/usr \ | |
230 | --cache-file=$(config_cache) \ | |
231 | --disable-gui \ | |
232 | --enable-soname \ | |
233 | --with-zlib=sys \ | |
234 | && $(MAKE) | |
235 | touch $@ | |
236 | ||
237 | build-wxbase-static-stamp: | |
238 | dh_testdir | |
239 | mkdir -p $(objdir_wxbase_static) | |
240 | cd $(objdir_wxbase_static) \ | |
241 | && ../configure --prefix=/usr \ | |
242 | --cache-file=$(config_cache) \ | |
243 | --disable-gui \ | |
244 | --disable-shared \ | |
245 | --with-zlib=sys \ | |
246 | && $(MAKE) | |
247 | touch $@ | |
248 | ||
249 | build-wxbase-debug-stamp: | |
250 | dh_testdir | |
251 | mkdir -p $(objdir_wxbase_debug) | |
252 | cd $(objdir_wxbase_debug) \ | |
253 | && ../configure --prefix=/usr \ | |
254 | --cache-file=$(config_cache) \ | |
255 | --disable-gui \ | |
256 | --enable-debug \ | |
257 | --enable-soname \ | |
258 | --with-zlib=sys \ | |
259 | && $(MAKE) | |
260 | touch $@ | |
261 | ||
262 | build-gtk-shared-stamp: | |
263 | dh_testdir | |
264 | mkdir -p $(objdir_gtk_shared) | |
265 | cd $(objdir_gtk_shared) \ | |
266 | && ../configure --prefix=/usr \ | |
267 | --cache-file=$(config_cache) \ | |
268 | --with-gtk \ | |
269 | --with-opengl \ | |
270 | --enable-soname \ | |
271 | --with-zlib=sys \ | |
272 | --with-libjpeg=sys \ | |
273 | --with-libpng=sys \ | |
274 | --with-libtiff=sys \ | |
275 | --enable-dynamic-loader \ | |
276 | && $(MAKE) | |
277 | touch $@ | |
278 | ||
279 | build-gtk-static-stamp: | |
280 | dh_testdir | |
281 | mkdir -p $(objdir_gtk_static) | |
282 | cd $(objdir_gtk_static) \ | |
283 | && ../configure --prefix=/usr \ | |
284 | --cache-file=$(config_cache) \ | |
285 | --with-gtk \ | |
286 | --with-opengl \ | |
287 | --disable-shared \ | |
288 | --with-zlib=sys \ | |
289 | --with-libjpeg=sys \ | |
290 | --with-libpng=sys \ | |
291 | --with-libtiff=sys \ | |
292 | --enable-dynamic-loader \ | |
293 | && $(MAKE) | |
294 | touch $@ | |
295 | ||
296 | build-gtk-debug-stamp: | |
297 | dh_testdir | |
298 | mkdir -p $(objdir_gtk_debug) | |
299 | cd $(objdir_gtk_debug) \ | |
300 | && ../configure --prefix=/usr \ | |
301 | --cache-file=$(config_cache) \ | |
302 | --with-gtk \ | |
303 | --with-opengl \ | |
304 | --enable-debug \ | |
305 | --enable-soname \ | |
306 | --with-zlib=sys \ | |
307 | --with-libjpeg=sys \ | |
308 | --with-libpng=sys \ | |
309 | --with-libtiff=sys \ | |
310 | --enable-dynamic-loader \ | |
311 | && $(MAKE) | |
312 | touch $@ | |
313 | ||
314 | build-gtk-univ-stamp: | |
315 | dh_testdir | |
316 | mkdir -p $(objdir_gtk_univ) | |
317 | cd $(objdir_gtk_univ) \ | |
318 | && ../configure --prefix=/usr \ | |
319 | --cache-file=$(config_cache) \ | |
320 | --with-gtk \ | |
321 | --with-opengl \ | |
322 | --enable-universal \ | |
323 | --enable-soname \ | |
324 | --with-zlib=sys \ | |
325 | --with-libjpeg=sys \ | |
326 | --with-libpng=sys \ | |
327 | --with-libtiff=sys \ | |
328 | --enable-dynamic-loader \ | |
329 | && $(MAKE) | |
330 | touch $@ | |
331 | ||
332 | build-contrib-shared-stamp: build-gtk-shared-stamp | |
333 | dh_testdir | |
334 | cd $(objdir_gtk_shared)/contrib/src \ | |
335 | && $(MAKE) | |
336 | touch $@ | |
337 | ||
338 | build-contrib-static-stamp: build-gtk-static-stamp | |
339 | dh_testdir | |
340 | cd $(objdir_gtk_static)/contrib/src \ | |
341 | && $(MAKE) | |
342 | touch $@ | |
343 | ||
344 | build-gtk-py-stamp: build-gtk-shared-stamp | |
345 | dh_testdir | |
346 | touch docs/lgpl.txt | |
347 | cd wxPython \ | |
348 | && ./setup.py build IN_CVS_TREE=1 WX_CONFIG='$(wxconfig)' | |
349 | touch $@ | |
350 | ||
351 | build-doc-stamp: build-gtk-shared-stamp | |
352 | dh_testdir | |
353 | cd $(objdir_gtk_shared)/utils/tex2rtf/src \ | |
354 | && $(MAKE) | |
355 | mkdir $(objdir_doc) | |
356 | mkdir $(objdir_doc_cruft) | |
357 | cd $(objdir_doc_cruft) \ | |
358 | && LD_LIBRARY_PATH=../$(objdir_gtk_shared)/lib:$(LD_LIBRARY_PATH) \ | |
359 | ../$(objdir_gtk_shared)/utils/tex2rtf/src/tex2rtf \ | |
360 | ../docs/latex/wx/manual.tex ../$(objdir_doc)/wxwin.htm -twice -html | |
361 | cp docs/latex/wx/*.gif $(objdir_doc) | |
362 | rm -rf $(objdir_doc_cruft) | |
363 | rm -f $(objdir_doc)/wxwin.con $(objdir_doc)/wxwin.hh* \ | |
364 | $(objdir_doc)/wxwin.htx $(objdir_doc)/wxwin.ref | |
365 | touch $@ | |
366 | ||
367 | build-examples-stamp: build-gtk-shared-stamp | |
368 | dh_testdir | |
369 | mkdir -p $(objdir_examples) | |
370 | ||
371 | # copy all samples and the Makefile generated for libwxgtk. | |
372 | cp -a samples $(objdir_examples) | |
373 | rm -f $(objdir_examples)/samples/Makefile | |
374 | cp -a $(objdir_gtk_shared)/samples/Makefile $(objdir_examples)/samples | |
375 | ||
376 | cp -a demos $(objdir_examples) | |
377 | cp -a wxPython/demo $(objdir_examples)/wxPython | |
378 | @for d in $(objdir_examples)/demos $(objdir_examples)/samples; do \ | |
379 | (cd $$d \ | |
380 | && mv Makefile.in Makefile \ | |
381 | && rm -f configure* \ | |
382 | && find -name 'Makefile.in' -exec rm -f '{}' ';' \ | |
383 | && for f in $$(find -type d); do \ | |
384 | if [ -f $$f/makefile.unx ]; then \ | |
385 | mv $$f/makefile.unx $$f/Makefile; \ | |
386 | fi; \ | |
387 | done) \ | |
388 | done; | |
389 | touch $@ | |
390 | ||
391 | build-i18n-stamp: build-gtk-shared-stamp | |
392 | dh_testdir | |
393 | ||
394 | # touch .po files first, since if they are not already up | |
395 | # to date then _now_ is not the time to fix it. | |
396 | # That should have been been done before cvs was tagged. | |
397 | cd $(objdir_i18n) \ | |
398 | && touch *.po \ | |
399 | && $(MAKE) allmo | |
400 | touch $@ | |
401 | ||
402 | build-wxbase-msw-shared-stamp: | |
403 | dh_testdir | |
404 | mkdir -p $(objdir_wxbase_msw_shared) | |
405 | cd $(objdir_wxbase_msw_shared) \ | |
406 | && ../configure --prefix=/usr/$(cross_host) \ | |
407 | --cache-file=$(config_cache_cross) \ | |
408 | --host=$(cross_host) \ | |
409 | --build=$(cross_build) \ | |
410 | --disable-gui \ | |
411 | && $(MAKE) | |
412 | touch $@ | |
413 | ||
414 | build-wxbase-msw-static-stamp: | |
415 | dh_testdir | |
416 | mkdir -p $(objdir_wxbase_msw_static) | |
417 | cd $(objdir_wxbase_msw_static) \ | |
418 | && ../configure --prefix=/usr/$(cross_host) \ | |
419 | --cache-file=$(config_cache_cross) \ | |
420 | --host=$(cross_host) \ | |
421 | --build=$(cross_build) \ | |
422 | --disable-gui \ | |
423 | --disable-shared \ | |
424 | && $(MAKE) | |
425 | touch $@ | |
426 | ||
427 | # Note this builds dll only, since wxmsw static debug is > 130MB ! | |
428 | build-wxbase-msw-dbg-stamp: | |
429 | dh_testdir | |
430 | mkdir -p $(objdir_wxbase_msw_dbg) | |
431 | cd $(objdir_wxbase_msw_dbg) \ | |
432 | && ../configure --prefix=/usr/$(cross_host) \ | |
433 | --cache-file=$(config_cache_cross) \ | |
434 | --host=$(cross_host) \ | |
435 | --build=$(cross_build) \ | |
436 | --disable-gui \ | |
437 | --enable-debug \ | |
438 | && $(MAKE) | |
439 | touch $@ | |
440 | ||
441 | build-msw-shared-stamp: | |
442 | dh_testdir | |
443 | mkdir -p $(objdir_msw_shared) | |
444 | cd $(objdir_msw_shared) \ | |
445 | && ../configure --prefix=/usr/$(cross_host) \ | |
446 | --cache-file=$(config_cache_cross) \ | |
447 | --host=$(cross_host) \ | |
448 | --build=$(cross_build) \ | |
449 | && $(MAKE) | |
450 | touch $@ | |
451 | ||
452 | build-msw-static-stamp: | |
453 | dh_testdir | |
454 | mkdir -p $(objdir_msw_static) | |
455 | cd $(objdir_msw_static) \ | |
456 | && ../configure --prefix=/usr/$(cross_host) \ | |
457 | --cache-file=$(config_cache_cross) \ | |
458 | --host=$(cross_host) \ | |
459 | --build=$(cross_build) \ | |
460 | --disable-shared \ | |
461 | && $(MAKE) | |
462 | touch $@ | |
463 | ||
464 | build-msw-dbg-stamp: | |
465 | dh_testdir | |
466 | mkdir -p $(objdir_msw_dbg) | |
467 | cd $(objdir_msw_dbg) \ | |
468 | && ../configure --prefix=/usr/$(cross_host) \ | |
469 | --cache-file=$(config_cache_cross) \ | |
470 | --host=$(cross_host) \ | |
471 | --build=$(cross_build) \ | |
472 | --enable-debug \ | |
473 | && $(MAKE) | |
474 | touch $@ | |
475 | ||
476 | ||
477 | clean: debian/control | |
478 | dh_testdir | |
479 | dh_testroot | |
480 | ||
481 | rm -rf config_deb.cache config_deb_cross.cache control-files-stamp $(build_stamps) $(objdirs) | |
482 | rm -f docs/lgpl.txt | |
483 | rm -f docs/latex/wx/manual.bb | |
484 | rm -f $(objdir_i18n)/*.mo | |
485 | ||
486 | cd wxPython \ | |
487 | && ./setup.py clean \ | |
488 | && rm -rf licence \ | |
489 | && rm -rf build \ | |
490 | && rm -rf contrib/gizmos/contrib \ | |
491 | && rm -rf contrib/ogl/contrib \ | |
492 | && rm -rf contrib/stc/contrib \ | |
493 | && rm -rf contrib/xrc/contrib \ | |
494 | && rm -rf *.pyc | |
495 | ||
496 | dh_clean | |
497 | rm -f debian/$(package_wxbase_lib).* | |
498 | rm -f debian/$(package_wxbase_dev).* | |
499 | rm -f debian/$(package_wxbase_dbg).* | |
500 | rm -f debian/$(package_gtk_lib).* | |
501 | rm -f debian/$(package_gtk_dev).* | |
502 | rm -f debian/$(package_gtk_dbg).* | |
503 | rm -f debian/$(package_gtk_univ).* | |
504 | rm -f debian/$(package_gtk_py).* | |
505 | rm -f debian/$(package_gtk_contrib).* | |
506 | rm -f debian/$(package_gtk_contrib_dev).* | |
507 | rm -f debian/$(package_headers).* | |
508 | rm -f debian/$(package_i18n).* | |
509 | rm -f debian/$(package_doc).* | |
510 | rm -f debian/$(package_examples).* | |
511 | rm -f debian/$(package_wxbase_msw_dev).* | |
512 | rm -f debian/$(package_wxbase_msw_dbg).* | |
513 | rm -f debian/$(package_msw_dev).* | |
514 | rm -f debian/$(package_msw_dbg).* | |
515 | rm -f debian/$(package_headers_msw).* | |
516 | ||
517 | install_arch: build_arch $(install_all_arch) | |
518 | ||
519 | install: build_all $(install_all_native) | |
520 | ||
521 | install-wxbase-lib: DH_OPTIONS=-p$(package_wxbase_lib) | |
522 | install-wxbase-lib: build-wxbase-shared-stamp | |
523 | dh_testdir | |
524 | dh_testroot | |
525 | dh_clean -k | |
526 | dh_installdirs | |
527 | cp -a $(objdir_wxbase_shared)/lib/* debian/$(package_wxbase_lib)/usr/lib | |
528 | cp $(objdir_wxbase_shared)/wxbase-$(release)-config debian/$(package_wxbase_lib)/usr/bin/ | |
529 | ||
530 | install-wxbase-dev: DH_OPTIONS=-p$(package_wxbase_dev) | |
531 | install-wxbase-dev: build-wxbase-static-stamp install-wxbase-lib | |
532 | dh_testdir | |
533 | dh_testroot | |
534 | dh_clean -k | |
535 | dh_installdirs | |
536 | dh_movefiles --sourcedir=debian/$(package_wxbase_lib) | |
537 | cp $(objdir_wxbase_static)/lib/*.a debian/$(package_wxbase_dev)/usr/lib | |
538 | ||
539 | install-wxbase-dbg: DH_OPTIONS=-p$(package_wxbase_dbg) | |
540 | install-wxbase-dbg: build-wxbase-debug-stamp | |
541 | dh_testdir | |
542 | dh_testroot | |
543 | dh_clean -k | |
544 | dh_installdirs | |
545 | cp -a $(objdir_wxbase_debug)/lib/* debian/$(package_wxbase_dbg)/usr/lib | |
546 | cp $(objdir_wxbase_debug)/wxbased-$(release)-config debian/$(package_wxbase_dbg)/usr/bin/ | |
547 | cp debian/lintian-override debian/$(package_wxbase_dbg)/usr/share/lintian/overrides/$(package_wxbase_dbg) | |
548 | ||
549 | install-gtk-lib: DH_OPTIONS=-p$(package_gtk_lib) | |
550 | install-gtk-lib: build-gtk-shared-stamp | |
551 | dh_testdir | |
552 | dh_testroot | |
553 | dh_clean -k | |
554 | dh_installdirs | |
555 | cd $(objdir_gtk_shared) \ | |
556 | && $(MAKE) install prefix=`pwd`/../debian/$(package_gtk_lib)/usr | |
557 | rm -f debian/$(package_gtk_lib)/usr/bin/wx-config | |
558 | ||
559 | install-gtk-dev: DH_OPTIONS=-p$(package_gtk_dev) | |
560 | install-gtk-dev: build-gtk-static-stamp install-gtk-lib | |
561 | dh_testdir | |
562 | dh_testroot | |
563 | dh_clean -k | |
564 | dh_installdirs | |
565 | dh_movefiles --sourcedir=debian/$(package_gtk_lib) | |
566 | cp $(objdir_gtk_static)/lib/libwx_gtk-*.a debian/$(package_gtk_dev)/usr/lib | |
567 | cp $(objdir_gtk_static)/lib/libwx_gtk_gl-*.a debian/$(package_gtk_dev)/usr/lib | |
568 | ||
569 | install-gtk-dbg: DH_OPTIONS=-p$(package_gtk_dbg) | |
570 | install-gtk-dbg: build-gtk-debug-stamp | |
571 | dh_testdir | |
572 | dh_testroot | |
573 | dh_clean -k | |
574 | dh_installdirs | |
575 | cp -a $(objdir_gtk_debug)/lib/* debian/$(package_gtk_dbg)/usr/lib | |
576 | cp $(objdir_gtk_debug)/wxgtkd-$(release)-config debian/$(package_gtk_dbg)/usr/bin/ | |
577 | cp debian/lintian-override debian/$(package_gtk_dbg)/usr/share/lintian/overrides/$(package_gtk_dbg) | |
578 | ||
579 | install-gtk-univ: DH_OPTIONS=-p$(package_gtk_univ) | |
580 | install-gtk-univ: build-gtk-univ-stamp | |
581 | dh_testdir | |
582 | dh_testroot | |
583 | dh_clean -k | |
584 | dh_installdirs | |
585 | cp -a $(objdir_gtk_univ)/lib/* debian/$(package_gtk_univ)/usr/lib | |
586 | cp $(objdir_gtk_univ)/wxgtkuniv-$(release)-config debian/$(package_gtk_univ)/usr/bin/ | |
587 | cp debian/lintian-override debian/$(package_gtk_univ)/usr/share/lintian/overrides/$(package_gtk_univ) | |
588 | ||
589 | install-gtk-contrib: DH_OPTIONS=-p$(package_gtk_contrib) | |
590 | install-gtk-contrib: build-contrib-shared-stamp | |
591 | dh_testdir | |
592 | dh_testroot | |
593 | dh_clean -k | |
594 | dh_installdirs | |
595 | cd $(objdir_gtk_shared)/contrib/src \ | |
596 | && $(MAKE) install prefix=`pwd`/../../../debian/$(package_gtk_contrib)/usr | |
597 | ||
598 | install-gtk-contrib-dev: DH_OPTIONS=-p$(package_gtk_contrib_dev) | |
599 | install-gtk-contrib-dev: build-contrib-static-stamp install-gtk-dev | |
600 | dh_testdir | |
601 | dh_testroot | |
602 | dh_clean -k | |
603 | dh_installdirs | |
604 | dh_movefiles --sourcedir=debian/$(package_gtk_contrib) | |
605 | cp $(objdir_gtk_static)/lib/*.a debian/$(package_gtk_contrib_dev)/usr/lib | |
606 | rm -f debian/$(package_gtk_contrib_dev)/usr/lib/libwx_gtk-*.a | |
607 | rm -f debian/$(package_gtk_contrib_dev)/usr/lib/libwx_gtk_gl-*.a | |
608 | ||
609 | install-gtk-py: DH_OPTIONS=-p$(package_gtk_py) | |
610 | install-gtk-py: build-gtk-py-stamp | |
611 | dh_testdir | |
612 | dh_testroot | |
613 | dh_clean -k | |
614 | dh_installdirs | |
615 | cd wxPython \ | |
616 | && ./setup.py install --prefix=`pwd`/../debian/$(package_gtk_py)/usr | |
617 | find debian/$(package_gtk_py)/usr/lib/$(python_dir)/site-packages/wxPython \ | |
618 | -name '*.py?' -exec rm '{}' ';' | |
619 | ||
620 | install-headers: DH_OPTIONS=-p$(package_headers) | |
621 | install-headers: install-gtk-lib | |
622 | dh_testdir | |
623 | dh_testroot | |
624 | dh_clean -k | |
625 | dh_installdirs | |
626 | ||
627 | # The only way to be really sure we get the univ headers correct is to install | |
628 | # them. Do that in a scratch dirs, and move the gtk ones last, so at least | |
629 | # they win in the result of any uncaught conflict. | |
630 | ||
631 | cd $(objdir_gtk_univ) \ | |
632 | && $(MAKE) install prefix=`pwd`/../$(objdir_univ_install)/usr | |
633 | ||
634 | dh_movefiles --sourcedir=$(objdir_univ_install) | |
635 | dh_movefiles --sourcedir=debian/$(package_gtk_lib) | |
636 | ||
637 | dh_installmanpages \ | |
638 | ansi2knr.1 \ | |
639 | jpegtran.1 \ | |
640 | libpng.3 \ | |
641 | libpngpf.3 \ | |
642 | zlib.3 \ | |
643 | png.5 | |
644 | ||
645 | install-i18n: DH_OPTIONS=-p$(package_i18n) | |
646 | install-i18n: build-i18n-stamp install-gtk-lib | |
647 | dh_testdir | |
648 | dh_testroot | |
649 | dh_clean -k | |
650 | dh_installdirs | |
651 | dh_movefiles --sourcedir=debian/$(package_gtk_lib) | |
652 | ||
653 | install-doc: DH_OPTIONS=-p$(package_doc) | |
654 | install-doc: build-doc-stamp | |
655 | dh_testdir | |
656 | dh_testroot | |
657 | dh_clean -k | |
658 | dh_installdirs | |
659 | ||
660 | install-examples: DH_OPTIONS=-p$(package_examples) | |
661 | install-examples: build-examples-stamp | |
662 | dh_testdir | |
663 | dh_testroot | |
664 | dh_clean -k | |
665 | dh_installdirs | |
666 | ||
667 | install-wxbase-msw-dev: DH_OPTIONS=-p$(package_wxbase_msw_dev) | |
668 | install-wxbase-msw-dev: build-wxbase-msw-shared-stamp build-wxbase-msw-static-stamp | |
669 | dh_testdir | |
670 | dh_testroot | |
671 | dh_clean -k | |
672 | dh_installdirs | |
673 | cp -a $(objdir_wxbase_msw_shared)/lib/* debian/$(package_wxbase_msw_dev)/usr/$(cross_host)/lib | |
674 | cp -a $(objdir_wxbase_msw_static)/lib/*.a debian/$(package_wxbase_msw_dev)/usr/$(cross_host)/lib | |
675 | cp $(objdir_wxbase_msw_shared)/wxbase-$(release)-$(cross_host)-config debian/$(package_wxbase_msw_dev)/usr/bin/ | |
676 | $(cross_host)-strip --strip-debug debian/$(package_wxbase_msw_dev)/usr/$(cross_host)/lib/*.a | |
677 | ||
678 | install-wxbase-msw-dbg: DH_OPTIONS=-p$(package_wxbase_msw_dbg) | |
679 | install-wxbase-msw-dbg: build-wxbase-msw-dbg-stamp | |
680 | dh_testdir | |
681 | dh_testroot | |
682 | dh_clean -k | |
683 | dh_installdirs | |
684 | cp -a $(objdir_wxbase_msw_dbg)/lib/* debian/$(package_wxbase_msw_dbg)/usr/$(cross_host)/lib | |
685 | cp $(objdir_wxbase_msw_dbg)/wxbased-$(release)-$(cross_host)-config debian/$(package_wxbase_msw_dbg)/usr/bin/ | |
686 | # No static lib, they're freakin' huge! | |
687 | #$(cross_host)-strip --strip-debug debian/$(package_wxbase_msw_dbg)/usr/$(cross_host)/lib/*.a | |
688 | ||
689 | install-msw-dev: DH_OPTIONS=-p$(package_msw_dev) | |
690 | install-msw-dev: build-msw-shared-stamp build-msw-static-stamp | |
691 | dh_testdir | |
692 | dh_testroot | |
693 | dh_clean -k | |
694 | dh_installdirs | |
695 | cp -a $(objdir_msw_shared)/lib/* debian/$(package_msw_dev)/usr/$(cross_host)/lib | |
696 | cp -a $(objdir_msw_static)/lib/*.a debian/$(package_msw_dev)/usr/$(cross_host)/lib | |
697 | cp $(objdir_msw_shared)/wxmsw-$(release)-$(cross_host)-config debian/$(package_msw_dev)/usr/bin/ | |
698 | $(cross_host)-strip --strip-debug debian/$(package_msw_dev)/usr/$(cross_host)/lib/*.a | |
699 | ||
700 | install-msw-dbg: DH_OPTIONS=-p$(package_msw_dbg) | |
701 | install-msw-dbg: build-msw-dbg-stamp | |
702 | dh_testdir | |
703 | dh_testroot | |
704 | dh_clean -k | |
705 | dh_installdirs | |
706 | cp -a $(objdir_msw_dbg)/lib/* debian/$(package_msw_dbg)/usr/$(cross_host)/lib | |
707 | cp $(objdir_msw_dbg)/wxmswd-$(release)-$(cross_host)-config debian/$(package_msw_dbg)/usr/bin/ | |
708 | # No static lib, they're freakin' huge! | |
709 | #$(cross_host)-strip --strip-debug debian/$(package_msw_dbg)/usr/$(cross_host)/lib/*.a | |
710 | ||
711 | install-headers-msw: DH_OPTIONS=-p$(package_headers_msw) | |
712 | install-headers-msw: | |
713 | dh_testdir | |
714 | dh_testroot | |
715 | dh_clean -k | |
716 | dh_installdirs | |
717 | @# Symlink all the headers that will be installed by the main -headers | |
718 | @# package to where the cross compiler will expect them. | |
719 | @for f in `ls -1 include/wx`; do \ | |
720 | ln -s /usr/include/wx/$$f debian/$(package_headers_msw)/usr/$(cross_host)/include/wx; \ | |
721 | echo "linking header /usr/include/wx/$$f"; \ | |
722 | done; | |
723 | @# But install this lot for real. | |
724 | rm -f debian/$(package_headers_msw)/usr/$(cross_host)/include/wx/msw | |
725 | cp -a include/wx/msw debian/$(package_headers_msw)/usr/$(cross_host)/include/wx | |
726 | @# and remove this cruft(?) | |
727 | rm -f debian/$(package_headers_msw)/usr/$(cross_host)/include/wx/treelay.h | |
728 | ||
729 | ||
730 | binary-common: | |
731 | dh_testdir | |
732 | dh_testroot | |
733 | dh_installdocs | |
734 | dh_installchangelogs | |
735 | dh_installexamples | |
736 | dh_installmenu | |
737 | dh_link | |
738 | ||
739 | @# Don't strip debug libs at all, and strip cross libs elsewhere | |
740 | @# with the cross host tools until dh_strip gets smarter. | |
741 | dh_strip -N$(package_gtk_dbg) -N$(package_wxbase_dbg) \ | |
742 | -N$(package_wxbase_msw_dev) -N$(package_wxbase_msw_dbg) \ | |
743 | -N$(package_msw_dev) -N$(package_msw_dbg) | |
744 | ||
745 | dh_compress | |
746 | dh_fixperms | |
747 | dh_makeshlibs -N$(package_gtk_py) -V | |
748 | dh_installdeb | |
749 | dh_shlibdeps -ldebian/$(package_gtk_lib)/usr/lib | |
750 | dh_gencontrol | |
751 | dh_md5sums | |
752 | dh_builddeb | |
753 | ||
754 | # Build architecture-independent files here. | |
755 | # Note that you currently can't build the indep packages without first | |
756 | # building the arch specific package files needed to create them. | |
757 | binary-indep: build_all install | |
758 | $(MAKE) -f debian/rules \ | |
759 | DH_OPTIONS="-i -N$(package_wxbase_msw_dev) -N$(package_wxbase_msw_dbg) -N$(package_msw_dev) -N$(package_msw_dbg) -N$(package_headers_msw)" \ | |
760 | binary-common | |
761 | ||
762 | # Build just the architecture-dependent files here. | |
763 | binary-arch: build_arch install_arch | |
764 | $(MAKE) -f debian/rules \ | |
765 | DH_OPTIONS="-a -N$(package_wxbase_msw_dev) -N$(package_wxbase_msw_dbg) -N$(package_msw_dev) -N$(package_msw_dbg) -N$(package_headers_msw)" \ | |
766 | binary-common | |
767 | ||
768 | # Build all packages target. | |
769 | binary: binary-arch binary-indep | |
770 | ||
771 | # This is a special target for building the wxMSW-cross packages. | |
772 | # It's not currently called during the official package build run | |
773 | # but may be run separately to build the extra packages. | |
774 | # There is an implied build dep on the mingw32 cross compiler | |
775 | # that is not in the control file. | |
776 | binary-cross: control-files-stamp $(install_all_cross) | |
777 | $(MAKE) -f debian/rules \ | |
778 | DH_OPTIONS="-p$(package_wxbase_msw_dev) -p$(package_wxbase_msw_dbg) -p$(package_msw_dev) -p$(package_msw_dbg) -p$(package_headers_msw)" \ | |
779 | binary-common | |
780 | ||
781 | ||
782 | ############################################################################ | |
783 | # | |
784 | # Some rules to build a subset of the complete list of packages that can be | |
785 | # built from CVS. Beware that packages produced with these rules may *NOT* | |
786 | # be compatible with packages built using the 'binary' target or even with | |
787 | # Debian policy. Do not distribute packages built with these rules, they | |
788 | # are currently useful for rapid in-house testing by developers only. | |
789 | ||
790 | # libwxgtk shared lib package | |
791 | binary-gtk: control-files-stamp install-gtk-lib install-headers | |
792 | $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_lib) -p$(package_headers)" binary-common | |
793 | ||
794 | binary-gtk-dev: control-files-stamp install-gtk-dev install-headers | |
795 | $(MAKE) -f debian/rules \ | |
796 | DH_OPTIONS="-p$(package_gtk_lib) -p$(package_gtk_dev) -p$(package_headers)" \ | |
797 | binary-common | |
798 | ||
799 | binary-gtk-dbg: control-files-stamp install-gtk-dbg install-headers | |
800 | $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_dbg) -p$(package_headers)" binary-common | |
801 | ||
802 | # libwxbase shared lib package | |
803 | binary-wxbase: control-files-stamp install-wxbase-lib install-headers | |
804 | $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_wxbase_lib) -p$(package_headers)" binary-common | |
805 | ||
806 | binary-wxbase-dev: control-files-stamp install-wxbase-dev install-headers | |
807 | $(MAKE) -f debian/rules \ | |
808 | DH_OPTIONS="-p$(package_wxbase_lib) -p$(package_wxbase_dev) -p$(package_headers)" \ | |
809 | binary-common | |
810 | ||
811 | binary-wxbase-dbg: control-files-stamp install-wxbase-dbg install-headers | |
812 | $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_wxbase_dbg) -p$(package_headers)" binary-common | |
813 | ||
814 | binary-univ: control-files-stamp install-gtk-univ | |
815 | $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_univ)" binary-common | |
816 | ||
817 | # docs package | |
818 | binary-doc: control-files-stamp install-doc | |
819 | $(MAKE) -f debian/rules DH_OPTIONS=-p$(package_doc) binary-common | |
820 | ||
821 | binary-fast:control-files-stamp install-gtk-dbg install-msw-dev install-headers install-headers-msw | |
822 | $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_dbg) -p$(package_msw_dev) -p$(package_headers) -p$(package_headers_msw)" binary-common | |
823 | ||
824 | ||
825 | .PHONY: build build_all build_arch clean binary-indep binary-arch binary binary-common \ | |
826 | binary-gtk binary-gtk-dev binary-gtk-dbg binary-wxbase binary-wxbase-dev \ | |
827 | binary-wxbase-dbg binary-doc binary-cross \ | |
828 | install install_arch install-wxbase-lib \ | |
829 | install-wxbase-dev install-wxbase-dbg install-gtk-lib install-gtk-dev \ | |
830 | install-gtk-dbg install-gtk-contrib install-gtk-contrib-dev \ | |
831 | install-gtk-py install-headers install-i18n install-doc install-examples \ | |
832 | install-wxbase-msw-dev install-msw-dev install-headers-msw \ | |
833 | install-wxbase-msw-dbg install-msw-dbg | |
834 |