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