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