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