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