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