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