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