]> git.saurik.com Git - wxWidgets.git/blame - debian/rules
[GTK] Do not define *_DEPRECATED macros for the gtk+ stack in preparation of a stable...
[wxWidgets.git] / debian / rules
CommitLineData
e4c4c1c6 1#!/usr/bin/make -f
e1293dcf 2# debian/rules file to build packages from wx CVS source
e4c4c1c6
RL
3#
4# Sculpted 13/2/2000 by Ron Lee <ron@debian.org> from new and
5# variously stolen code :-)
f6bcfd97
BP
6# It makes copious use of the debhelper utilities written by
7# Joey Hess and others.
e4c4c1c6
RL
8
9#export DH_VERBOSE=1
f6bcfd97 10export DH_OPTIONS
e4c4c1c6 11
6de5430b 12ifdef CONCURRENCY_LEVEL
6181913e 13
6de5430b
RD
14 # A user who knows what they want, that's like gold...
15 # respect their precious opinion of how much blue smoke to use.
16 JOB_COUNT := $(CONCURRENCY_LEVEL)
17
18else ifdef DISTCC_HOSTS
19
20 # Otherwise, if they have a cluster, try to put it to good use.
6181913e 21 JOB_COUNT := $(shell set $${DISTCC_HOSTS} > /dev/null 2>&1 ; echo $$\#)
6181913e 22
6de5430b
RD
23 # Not much faster, but it might keep you warm in winter...
24 #JOB_COUNT := $(shell set $${DISTCC_HOSTS} > /dev/null 2>&1 ; echo $$(($$\# + $$\#)))
6181913e 25
6de5430b 26endif
6181913e 27
6de5430b
RD
28ifdef JOB_COUNT
29 FAST_MAKE = $(MAKE) -j $(JOB_COUNT)
30else
31 FAST_MAKE = $(MAKE)
6181913e
RL
32endif
33
34-include debian/python-version
35
ceec2216 36
6de5430b
RD
37# If another source package is to supply the common binary packages
38# for a particular Debian release, then define this variable to indicate
39# the $(release) that is expected to provide it. Do not define it at
40# all if this is to be the default (or only) wx source package for the
41# target release.
42#
43# for etch:
44#DEBIAN_WX_DEFAULT_VERSION = 2.6
45
46
ceec2216
RL
47# This will extract a flavour out of the name of the source directory
48# and flavour the packages and binaries with it. 'Official' builds
49# should use a source dir of the form wxwidgets$RELEASE-$VERSION.
50# Flavoured builds may use wxwidgets$RELEASE-$FLAVOUR-$VERSION, where
51# any descriptive alphanumeric name will do for FLAVOUR. This will
52# allow a custom build to be installed alongside the mainline ones
53# without conflict. You will also need to make a corresponding
54# changelog entry for your flavour source package using:
55# wxwidget$RELEASE-$FLAVOUR ($VERSION) to satify dpkg-source and
56# to correctly set the release below.
57DEBIAN_WXFLAVOUR := $(shell pwd | sed -e 's@.*/wxwidgets[0-9.]\+-\?\(.*\)-[0-9.]\+-\?.*@\1@')
58
63044ee7 59
6a7d17a2
VZ
60wx_major_version_number := $(shell sed -n 's/^wx_major_version_number=//p' configure.in)
61wx_minor_version_number := $(shell sed -n 's/^wx_minor_version_number=//p' configure.in)
62wx_release_number := $(shell sed -n 's/^wx_release_number=//p' configure.in)
63wx_subrelease_number := $(shell sed -n 's/^wx_subrelease_number=//p' configure.in)
63044ee7
RD
64
65##release := $(shell dpkg-parsechangelog | sed -n 's/^Source: wxwidgets//p' | sed 's/-ansi//')
66release := $(wx_major_version_number).$(wx_minor_version_number)
ceec2216 67
6de5430b
RD
68# This is broken completely now by bakefiles changes. Until we add
69# some hocus pocus to the main tree, to export these values from it
70# again, we approximate its behaviour (fairly precisely fwiw) to
71# specify $soversion below. Re-automate if incompatible changes
72# result in it actually changing.
73#soversion := $(shell grep '^WX_CURRENT=' configure.in | sed 's/WX_CURRENT=\([0-9]\+\).*/\1/')
97e716f8
RD
74soversion := 0
75sorelease := $(release:%-$(DEBIAN_WXFLAVOUR)=%)-$(soversion)$(addprefix -,$(DEBIAN_WXFLAVOUR))
6de5430b 76
24cdcc88
VZ
77# In some places we use the full version number, including the micro version,
78# for the development releases (which can be incompatible for the same major
79# and minor version) but just the major.minor for the stable releases (which
80# are supposed to be compatible), this variable contains the appropriate value
81ifeq ($(shell echo `echo $(release) | sed 's/.\+\.\(.\+\)/\1/'`%2 | bc),1)
82 # development release
63044ee7 83 compatible_release := $(release).$(wx_release_number)
24cdcc88
VZ
84else
85 compatible_release := $(release)
86endif
87
6de5430b
RD
88# Base value for alternative priorities.
89alt_prio := $(subst .,,$(release))
90
91pytoolkit := gtk2
e653e181 92pydir := usr/lib/$(python_ver)/site-packages
24cdcc88 93wxpydir := $(pydir)/wx-$(compatible_release)-$(pytoolkit)
e653e181 94
6de5430b
RD
95cross_host := i586-mingw32msvc
96cross_build := $(shell ./config.guess)
3a922bb4 97
e1293dcf
RL
98config_cache = ../config_deb.cache
99config_cache_cross = ../config_deb_cross.cache
a0b03701 100
6de5430b 101
b945df00
VZ
102# build options
103COMMON_CONFIGURE_OPTIONS = \
104 --prefix=/usr \
105 --cache-file=$(config_cache) \
106 --with-flavour=$(DEBIAN_WXFLAVOUR) \
b945df00
VZ
107 --with-zlib=sys \
108 --disable-reserved_virtual \
109
110BASE_CONFIGURE_OPTIONS = $(COMMON_CONFIGURE_OPTIONS) \
111 --disable-gui \
112
113GTK_CONFIGURE_OPTIONS = $(COMMON_CONFIGURE_OPTIONS) \
114 --with-gtk \
115 --with-gnomeprint \
8e051259
RD
116 --enable-mediactrl \
117 --enable-sound \
118 --with-sdl \
119 --enable-display \
bdf784d9
RD
120 --enable-geometry \
121 --enable-graphics_ctx \
b945df00
VZ
122 --with-libjpeg=sys \
123 --with-libpng=sys \
124 --with-libtiff=sys \
125
126
127PY_WX_CONFIG_OPTIONS = --version=$(release) --toolkit=$(pytoolkit) --static=no
128
129WX_UNICODE := 1
130WX_OPENGL := 1
131
132ifeq ($(WX_UNICODE),1)
133 COMMON_CONFIGURE_OPTIONS += --enable-unicode
134 PY_WX_CONFIG_OPTIONS += --unicode
135 PY_UNICODE="UNICODE=1"
24cdcc88 136 wxpydir := $(pydir)/wx-$(compatible_release)-$(pytoolkit)-unicode
6b2c5736
VZ
137
138 # for compatibility with the existing 2.6 packages, we don't use "u" in
139 # the Unicode (default) package names
140 unicode_suffix :=
141else
142 # but we do need to use something for non-Unicode packages to distinguish
143 # them
144 unicode_suffix := -ansi
b945df00
VZ
145endif
146
147ifeq ($(WX_OPENGL),1)
148 GTK_CONFIGURE_OPTIONS += --with-opengl
149else
150 GTK_CONFIGURE_OPTIONS += --without-opengl
151endif
152
e0a4aa8a 153# Packages to build:
63044ee7 154package_wxbase_lib := libwxbase$(release)$(unicode_suffix)
6b2c5736
VZ
155package_wxbase_dev := libwxbase$(release)$(unicode_suffix)-dev
156package_wxbase_dbg := libwxbase$(release)$(unicode_suffix)-dbg
6de5430b 157
63044ee7 158package_gtk_lib := libwxgtk$(release)$(unicode_suffix)
6b2c5736
VZ
159package_gtk_dev := libwxgtk$(release)$(unicode_suffix)-dev
160package_gtk_dbg := libwxgtk$(release)$(unicode_suffix)-dbg
6de5430b
RD
161
162
163
164
9998504e 165package_gtk_py_lib := python-wxgtk$(release)$(unicode_suffix)
6de5430b
RD
166package_gtk_py_ver = python-wxversion
167package_gtk_py_tools = python-wxtools
bdf784d9 168package_gtk_py_addons = python-wxaddons
6de5430b
RD
169
170package_headers := wx$(release)-headers
171package_i18n := wx$(release)-i18n
172package_doc := wx$(release)-doc
173package_examples := wx$(release)-examples
174package_common = wx-common
175
176# The packages listed here are common to all wx versions, and may be provided
177# by another source package if more than one is in the release simultaneously.
bdf784d9 178common_packages := $(package_common) $(package_gtk_py_ver) $(package_gtk_py_tools) $(package_gtk_py_addons)
6de5430b
RD
179
180
9998504e 181package_gtk_dbg_py := python-wxgtk$(release)$(unicode_suffix)-dbg
6de5430b
RD
182
183
184
9998504e
VZ
185package_msw_dev := libwxmsw$(release)$(unicode_suffix)-dev
186package_msw_dbg := libwxmsw$(release)$(unicode_suffix)-dbg
6de5430b
RD
187package_headers_msw := wx$(release)-headers-msw
188
189# The packages listed here will not be built by default.
190extra_packages := $(package_gtk_dbg_py) \
191 $(package_msw_dev) $(package_msw_dbg) $(package_headers_msw)
192
193ifdef DEBIAN_WX_DEFAULT_VERSION
194
195 extra_packages += $(common_packages)
196
197endif
198
3a922bb4 199
e0a4aa8a 200# Build directories:
6de5430b
RD
201objdir_wxbase_shared = objs_wxbase_sh
202objdir_wxbase_debug = objs_wxbase_d
e1293dcf 203objdir_gtk_shared = objs_gtk_sh
e1293dcf
RL
204objdir_gtk_debug = objs_gtk_d
205objdir_gtk_install = objs_gtk_install
e1293dcf
RL
206objdir_doc_cruft = objs_doc_con
207objdir_doc = docs/wx-manual.html
208objdir_examples = docs/examples
209objdir_i18n = locale
210
211objdir_msw_shared = objs_msw_sh
212objdir_msw_static = objs_msw_st
213objdir_msw_dbg = objs_msw_d
148e141b 214objdir_msw_install = objs_msw_install
e1293dcf 215
6de5430b
RD
216objdirs := $(objdir_wxbase_shared) $(objdir_wxbase_debug) \
217 $(objdir_gtk_shared) $(objdir_gtk_debug) $(objdir_gtk_install) \
218 $(objdir_doc_cruft) $(objdir_doc) $(objdir_examples) \
219 $(objdir_msw_shared) $(objdir_msw_static) $(objdir_msw_dbg) \
220 $(objdir_msw_install)
e4c4c1c6 221
afa3e1ed
RL
222# note that the i18n package is actually arch indep (once built)
223# but must be built (and installed) during the arch any phase as
e1293dcf 224# it's pulled out of the wxGTK shared lib package.
6de5430b
RD
225#
226# similarly some of the wxpython packages are arch indep too, but
227# all files for it are installed during the arch any phase.
e1293dcf 228
afa3e1ed 229
050207ec 230# Build stamps:
6de5430b
RD
231build_arch_stamps = build-wxbase-shared-stamp build-wxbase-debug-stamp \
232 build-gtk-shared-stamp build-gtk-shared-contrib-stamp \
ceec2216 233 build-gtk-debug-stamp build-gtk-debug-contrib-stamp \
e1293dcf 234 build-i18n-stamp build-gtk-py-stamp
e4c4c1c6 235
6de5430b 236build_indep_stamps = build-examples-stamp build-doc-stamp
0ecfbbea 237
6de5430b 238build_cross_stamps = build-msw-shared-stamp build-msw-static-stamp build-msw-dbg-stamp
3a922bb4 239
6de5430b 240build_stamps_native := $(build_arch_stamps) $(build_indep_stamps)
3a922bb4 241
6de5430b 242build_stamps := $(build_stamps_native) $(build_cross_stamps)
050207ec 243
050207ec 244
e1293dcf 245# Install targets:
6de5430b
RD
246install_all_arch = install-wxbase-lib install-wxbase-dev install-wxbase-dbg \
247 install-gtk-lib install-gtk-dev install-gtk-dbg \
248 install-headers install-i18n \
148e141b 249 install-gtk-py
0ecfbbea 250
6de5430b
RD
251ifndef DEBIAN_WX_DEFAULT_VERSION
252
253 install_all_arch += install-common
254
255endif
256
257install_all_indep = install-examples install-doc
050207ec 258
6de5430b 259install_all_cross = install-msw-dev install-msw-dbg install-headers-msw
3a922bb4 260
6de5430b 261install_all_native := $(install_all_arch) $(install_all_indep)
3a922bb4 262
6de5430b 263install_all := $(install_all_native) $(install_all_cross)
e4c4c1c6
RL
264
265
6de5430b 266# wxPython uses this to build in-tree
3b57de8b
RL
267wxconfig := $(shell pwd)/$(objdir_gtk_shared)/wx-config --no_rpath
268wxconfig-dbg := $(shell pwd)/$(objdir_gtk_debug)/wx-config --no_rpath
afa3e1ed 269
6de5430b 270# and this after it is installed.
b945df00
VZ
271py_wxconfig := wx-config $(PY_WX_CONFIG_OPTIONS) --debug=no
272pyd_wxconfig := wx-config $(PY_WX_CONFIG_OPTIONS) --debug
6de5430b
RD
273
274
ceec2216 275#contrib_libs := $(subst CVS,,$(notdir $(wildcard contrib/include/wx/*)))
b63b07a8 276
afa3e1ed 277
e0a4aa8a
RL
278# The Rules:
279
6181913e
RL
280debian/python-version:
281 echo python_ver := python$(shell python -c "import sys;print sys.version[:3]") > $@
282
283debian/control: $(addprefix debian/,control.in python-version)
97e716f8 284 sed -e 's/=V/$(release)/g;s/=SOV/$(sorelease)/g;s/=PY/$(python_ver)/g;s/=U/$(unicode_suffix)/g'\
148e141b 285 < debian/control.in > debian/control
e4c4c1c6 286
3a922bb4 287control-files-stamp: debian/control
f6bcfd97 288 dh_testdir
6de5430b
RD
289 @for f in postinst prerm; do \
290 echo "generating control file $(package_wxbase_dev).$$f"; \
291 sed -e 's/=V/$(release)/g; '\
292' s/=PRIO/$(alt_prio)/g' \
293 < debian/libwxbase-dev.$$f \
294 > debian/$(package_wxbase_dev).$$f; \
295 done;
296 @for f in postinst prerm; do \
297 echo "generating control file $(package_wxbase_dbg).$$f"; \
298 sed -e 's/=V/$(release)/g; '\
299' s/=PRIO/$(alt_prio)/g' \
300 < debian/libwxbase-dbg.$$f \
301 > debian/$(package_wxbase_dbg).$$f; \
302 done;
ceec2216 303 @for f in postinst prerm; do \
e1293dcf 304 echo "generating control file $(package_gtk_dev).$$f"; \
6de5430b
RD
305 sed -e 's/=V/$(release)/g; '\
306' s/=PRIO/$(alt_prio)/g' \
307 < debian/libwxgtk-dev.$$f \
e1293dcf 308 > debian/$(package_gtk_dev).$$f; \
f6bcfd97 309 done;
ceec2216 310 @for f in postinst prerm; do \
e1293dcf 311 echo "generating control file $(package_gtk_dbg).$$f"; \
6de5430b
RD
312 sed -e 's/=V/$(release)/g; '\
313' s/=PRIO/$(alt_prio)/g' \
314 < debian/libwxgtk-dbg.$$f \
e1293dcf 315 > debian/$(package_gtk_dbg).$$f; \
f6bcfd97 316 done;
fdefae19
RL
317 @for f in docs postinst prerm; do \
318 echo "generating control file $(package_gtk_py_lib).$$f"; \
6de5430b
RD
319 sed -e 's/=PY/$(python_ver)/g; '\
320' s|=WXPYDIR|$(wxpydir)|g; '\
321' s/=V/$(release)/g; '\
322' s/=PRIO/$(alt_prio)/g' \
9372855d 323 < debian/python-wxgtk.$$f \
fdefae19 324 > debian/$(package_gtk_py_lib).$$f; \
f6bcfd97 325 done;
6de5430b 326 @for f in postinst prerm; do \
fdefae19 327 echo "generating control file $(package_gtk_dbg_py).$$f"; \
6de5430b
RD
328 sed -e 's/=PY/$(python_ver)/g; '\
329' s/=V/$(release)/g; '\
330' s/=PRIO/$(alt_prio)/g' \
331 < debian/python-wxgtk-dbg.$$f \
fdefae19
RL
332 > debian/$(package_gtk_dbg_py).$$f; \
333 done;
6de5430b
RD
334 @echo "generating control file $(package_gtk_dbg_py).docs";
335 @cp debian/python-wxgtk.docs debian/$(package_gtk_dbg_py).docs;
e1293dcf
RL
336 @for f in docs doc-base; do \
337 echo "generating control file $(package_doc).$$f"; \
b63b07a8 338 sed -e 's/=V/$(release)/g' < debian/wx-doc.$$f \
e1293dcf 339 > debian/$(package_doc).$$f; \
f6bcfd97 340 done;
e1293dcf
RL
341 @for f in examples; do \
342 echo "generating control file $(package_examples).$$f"; \
b63b07a8 343 cp debian/wx-examples.$$f debian/$(package_examples).$$f; \
f6bcfd97 344 done;
ceec2216 345 @for f in postinst prerm; do \
e1293dcf 346 echo "generating control file $(package_msw_dev).$$f"; \
6de5430b
RD
347 sed -e 's/=V/$(release)/g; '\
348' s/=H/$(cross_host)/g; '\
349' s/=PRIO/$(alt_prio)/g' \
350 < debian/libwxmsw-dev.$$f \
e1293dcf 351 > debian/$(package_msw_dev).$$f; \
3a922bb4 352 done;
ceec2216 353 @for f in postinst prerm; do \
e1293dcf 354 echo "generating control file $(package_msw_dbg).$$f"; \
6de5430b
RD
355 sed -e 's/=V/$(release)/g; '\
356' s/=H/$(cross_host)/g; '\
357' s/=PRIO/$(alt_prio)/g' \
358 < debian/libwxmsw-dbg.$$f \
e1293dcf 359 > debian/$(package_msw_dbg).$$f; \
4fb788e4 360 done;
148e141b
RL
361# @echo "generating control file $(package_common).menu"; \
362# sed -e 's/=V/$(release)/g' < debian/wx-common.menu \
363# > debian/$(package_common).menu;
ceec2216 364 @echo "generating control file lintian-override"; \
6de5430b 365 sed -e 's/=V/$(release)/g; '\
97e716f8 366' s/=SOV/$(sorelease)/g' \
6de5430b 367 < debian/lintian-override.in \
ceec2216 368 > debian/lintian-override; \
f6bcfd97
BP
369 touch $@
370
050207ec 371build_arch: control-files-stamp $(build_arch_stamps)
3a922bb4 372build_all: control-files-stamp $(build_stamps_native)
3abb92ce 373
3a922bb4
RL
374# Really we should probably do nothing here until we know which
375# binary target is being called, but alpha builds were exploding
376# (compiler segfaults) in random places when building under fakeroot
377# from the binary-arch target. Build all -arch files here then, and
378# let the -indep stuff fend for itself later.
379
380build: build_arch
050207ec 381
e4c4c1c6 382
6de5430b
RD
383# The wx2.6 build system makes us run around in circles to get a separate
384# libwxbase. We need to configure it here in order to get the correct
385# config files to use it alone, but there is no point building it as the
386# wxgtk build is going to do that again anyway. We'll move the relevant
387# files out when that is done.
388
389configure-wxbase-shared-stamp:
390 dh_testdir
391 mkdir -p $(objdir_wxbase_shared)
b945df00
VZ
392 cd $(objdir_wxbase_shared) \
393 && ../configure $(BASE_CONFIGURE_OPTIONS)
6de5430b
RD
394 touch $@
395
396build-wxbase-shared-stamp: configure-wxbase-shared-stamp
397 dh_testdir
398 # Nothing to build here, move along...
399 #cd $(objdir_wxbase_shared) && $(FAST_MAKE)
400 touch $@
401
402configure-wxbase-debug-stamp:
403 dh_testdir
404 mkdir -p $(objdir_wxbase_debug)
405 cd $(objdir_wxbase_debug) \
b945df00 406 && ../configure $(BASE_CONFIGURE_OPTIONS) --enable-debug
6de5430b
RD
407 touch $@
408
409build-wxbase-debug-stamp: configure-wxbase-debug-stamp
410 dh_testdir
411 # Nothing to build here, move along...
412 #cd $(objdir_wxbase_debug) && $(FAST_MAKE)
413 touch $@
414
8ddf18dd 415configure-gtk-shared-stamp:
e4c4c1c6 416 dh_testdir
3a922bb4 417 mkdir -p $(objdir_gtk_shared)
e4c4c1c6 418 cd $(objdir_gtk_shared) \
b945df00 419 && ../configure $(GTK_CONFIGURE_OPTIONS)
8ddf18dd
RL
420 touch $@
421
422build-gtk-shared-stamp: configure-gtk-shared-stamp
423 dh_testdir
6181913e 424 cd $(objdir_gtk_shared) && $(FAST_MAKE)
e4c4c1c6
RL
425 touch $@
426
8ddf18dd
RL
427
428configure-gtk-debug-stamp:
f6bcfd97 429 dh_testdir
3a922bb4 430 mkdir -p $(objdir_gtk_debug)
f6bcfd97 431 cd $(objdir_gtk_debug) \
b945df00 432 && ../configure $(GTK_CONFIGURE_OPTIONS) --enable-debug
f6bcfd97
BP
433 touch $@
434
8ddf18dd
RL
435build-gtk-debug-stamp: configure-gtk-debug-stamp
436 dh_testdir
6181913e 437 cd $(objdir_gtk_debug) && $(FAST_MAKE)
8ddf18dd
RL
438 touch $@
439
7b7a7637 440
ceec2216 441build-gtk-shared-contrib-stamp: build-gtk-shared-stamp
f6bcfd97 442 dh_testdir
6181913e 443 cd $(objdir_gtk_shared)/contrib/src && $(FAST_MAKE)
a13a7f89 444 cd $(objdir_gtk_shared)/utils/wxrc && $(FAST_MAKE)
f6bcfd97
BP
445 touch $@
446
f6bcfd97 447
ceec2216
RL
448build-gtk-debug-contrib-stamp: build-gtk-debug-stamp
449 dh_testdir
450 cd $(objdir_gtk_debug)/contrib/src && $(FAST_MAKE)
451 touch $@
452
453
6181913e
RL
454purge-dbg-py:
455 @if [ ! -e build-gtk-py-stamp ]; then \
456 $(MAKE) -f debian/rules clean-py; \
457 fi
458 $(RM) build-gtk-dbg-py-stamp
459
460build-gtk-py-stamp: build-gtk-shared-stamp purge-dbg-py
e0a4aa8a 461 dh_testdir
050207ec
RL
462 touch docs/lgpl.txt
463 cd wxPython \
b63b07a8
RL
464 && $(python_ver) ./setup.py build \
465 WX_CONFIG='$(wxconfig)' \
6de5430b 466 WXPORT=$(pytoolkit) \
b945df00 467 $(PY_UNICODE) \
fdefae19 468 FLAVOUR=$(DEBIAN_WXFLAVOUR)
e0a4aa8a
RL
469 touch $@
470
f538864d
RL
471build-doc-stamp: build-gtk-shared-stamp
472 dh_testdir
71064d38
RD
473 mkdir $(objdir_doc);
474 # the tarball may already have the generated docs in it
475 if [ ! -e docs/html/wx/index.html ]; then \
476 cd $(objdir_gtk_shared)/utils/tex2rtf/src && $(FAST_MAKE); \
477 rm -rf $(objdir_doc); \
478 rm -rf $(objdir_doc_cruft); \
479 mkdir $(objdir_doc_cruft); \
480 cd $(objdir_doc_cruft); \
481 LD_LIBRARY_PATH=../$(objdir_gtk_shared)/lib:$(LD_LIBRARY_PATH) \
482 ../$(objdir_gtk_shared)/utils/tex2rtf/src/tex2rtf \
483 ../docs/latex/wx/manual.tex \
484 ../$(objdir_doc)/wx$(release)-manual.html \
485 -twice -html; \
486 cp docs/latex/wx/*.gif $(objdir_doc); \
487 rm -rf $(objdir_doc_cruft); \
488 rm -f $(objdir_doc)/wx$(release)-manual.{con,hh*,htx,ref}; \
489 else \
490 cp docs/html/wx/* $(objdir_doc); \
491 mv $(objdir_doc)/index.html $(objdir_doc)/wx-$(release)-manual_contents.html; \
492 fi
f538864d
RL
493 touch $@
494
3a922bb4 495build-examples-stamp: build-gtk-shared-stamp
5c0e67b2 496 dh_testdir
3a922bb4
RL
497 mkdir -p $(objdir_examples)
498
499 # copy all samples and the Makefile generated for libwxgtk.
5c0e67b2 500 cp -a samples $(objdir_examples)
3a922bb4
RL
501 rm -f $(objdir_examples)/samples/Makefile
502 cp -a $(objdir_gtk_shared)/samples/Makefile $(objdir_examples)/samples
503
5259a417
RL
504 cd $(objdir_examples)/samples \
505 && find -name 'Makefile.in' -exec rm -f '{}' ';' \
506 && for d in $$(find -type d); do \
507 if [ -f $$d/makefile.unx ]; then \
508 mv $$d/makefile.unx $$d/Makefile; \
509 fi; \
510 done \
511
f6bcfd97 512 cp -a wxPython/demo $(objdir_examples)/wxPython
5259a417 513
6de5430b
RD
514 echo "generating install_examples.sh script";
515 sed -e 's/=V/$(release)/g' < debian/unpack_examples.sh.in \
516 > debian/unpack_examples.sh
517 chmod 755 debian/unpack_examples.sh
518
5c0e67b2
RL
519 touch $@
520
3ca6a5f0
BP
521build-i18n-stamp: build-gtk-shared-stamp
522 dh_testdir
54abcc91
RL
523
524 # touch .po files first, since if they are not already up
525 # to date then _now_ is not the time to fix it.
526 # That should have been been done before cvs was tagged.
3ca6a5f0 527 cd $(objdir_i18n) \
54abcc91 528 && touch *.po \
3ca6a5f0
BP
529 && $(MAKE) allmo
530 touch $@
531
6181913e
RL
532purge-release-py:
533 @if [ ! -e build-gtk-dbg-py-stamp ]; then \
534 $(MAKE) -f debian/rules clean-py; \
535 fi
536 $(RM) build-gtk-py-stamp
537
538build-gtk-dbg-py-stamp: build-gtk-debug-stamp purge-release-py
539 dh_testdir
540 touch docs/lgpl.txt
ceec2216 541 cd wxPython \
148e141b
RL
542 && $(python_ver) ./setup.py build \
543 WX_CONFIG='$(wxconfig-dbg)' \
6de5430b 544 WXPORT=$(pytoolkit) \
b945df00 545 $(PY_UNICODE) \
fdefae19 546 FLAVOUR=$(addsuffix -,$(DEBIAN_WXFLAVOUR))dbg
6181913e
RL
547 touch $@
548
8ddf18dd
RL
549
550configure-msw-shared-stamp:
3a922bb4 551 dh_testdir
978f1259 552 mkdir -p $(objdir_msw_shared)
ceec2216
RL
553 cd $(objdir_msw_shared) \
554 && ../configure --prefix=/usr/$(cross_host) \
555 --cache-file=$(config_cache_cross) \
556 --host=$(cross_host) \
557 --build=$(cross_build) \
558 --with-flavour=$(DEBIAN_WXFLAVOUR)
4fb788e4
RL
559 touch $@
560
8ddf18dd
RL
561build-msw-shared-stamp: configure-msw-shared-stamp
562 dh_testdir
6181913e 563 cd $(objdir_msw_shared) && $(FAST_MAKE)
8ddf18dd
RL
564 touch $@
565
566configure-msw-static-stamp:
978f1259
RL
567 dh_testdir
568 mkdir -p $(objdir_msw_static)
ceec2216
RL
569 cd $(objdir_msw_static) \
570 && ../configure --prefix=/usr/$(cross_host) \
571 --cache-file=$(config_cache_cross) \
572 --host=$(cross_host) \
573 --build=$(cross_build) \
574 --with-flavour=$(DEBIAN_WXFLAVOUR) \
8ddf18dd 575 --disable-shared
978f1259
RL
576 touch $@
577
8ddf18dd
RL
578build-msw-static-stamp: configure-msw-static-stamp
579 dh_testdir
6181913e 580 cd $(objdir_msw_static) && $(FAST_MAKE)
8ddf18dd
RL
581 touch $@
582
583configure-msw-dbg-stamp:
4fb788e4
RL
584 dh_testdir
585 mkdir -p $(objdir_msw_dbg)
ceec2216
RL
586 cd $(objdir_msw_dbg) \
587 && ../configure --prefix=/usr/$(cross_host) \
588 --cache-file=$(config_cache_cross) \
589 --host=$(cross_host) \
590 --build=$(cross_build) \
591 --with-flavour=$(DEBIAN_WXFLAVOUR) \
8ddf18dd
RL
592 --enable-debug
593 touch $@
594
595build-msw-dbg-stamp: configure-msw-dbg-stamp
596 dh_testdir
6181913e 597 cd $(objdir_msw_dbg) && $(FAST_MAKE)
3a922bb4
RL
598 touch $@
599
600
6181913e 601clean-py:
148e141b 602 cd wxPython && rm -rf licence build* docs/xml-raw wx/*.py
6181913e
RL
603
604 # What to do about src/__version__.py ???
54abcc91 605
5259a417 606
0ecfbbea
RL
607# We do the equivalent of this above by removing build, unfortunately
608# its not enough by itself to get the tree properly clean again.
609# && ./setup.py clean
610
6181913e
RL
611clean: debian/control clean-py
612 dh_testdir
613 dh_testroot
614
615 rm -rf config_deb.cache config_deb_cross.cache *-stamp $(objdirs)
616 rm -f docs/lgpl.txt
617 rm -f $(objdir_i18n)/*.mo
618
e4c4c1c6 619 dh_clean
6de5430b
RD
620 rm -f debian/$(package_wxbase_lib).*
621 rm -f debian/$(package_wxbase_dev).*
622 rm -f debian/$(package_wxbase_dbg).*
f538864d
RL
623 rm -f debian/$(package_gtk_lib).*
624 rm -f debian/$(package_gtk_dev).*
f6bcfd97 625 rm -f debian/$(package_gtk_dbg).*
fdefae19 626 rm -f debian/$(package_gtk_py_lib).*
f6bcfd97 627 rm -f debian/$(package_headers).*
3ca6a5f0 628 rm -f debian/$(package_i18n).*
f538864d 629 rm -f debian/$(package_doc).*
5c0e67b2 630 rm -f debian/$(package_examples).*
6181913e 631 rm -f debian/$(package_gtk_dbg_py).*
3a922bb4 632 rm -f debian/$(package_msw_dev).*
4fb788e4 633 rm -f debian/$(package_msw_dbg).*
ceec2216 634 rm -f debian/lintian-override
6de5430b 635 rm -f debian/unpack_examples.sh
e4c4c1c6 636
050207ec
RL
637install_arch: build_arch $(install_all_arch)
638
3a922bb4 639install: build_all $(install_all_native)
f6bcfd97 640
6de5430b
RD
641
642install-wxbase-lib: DH_OPTIONS=-p$(package_wxbase_lib)
643install-wxbase-lib: build-wxbase-shared-stamp install-gtk-shared-stamp
644 dh_testdir
645 dh_testroot
646 dh_clean -k
647 @# No, this is not a typo, we steal these libs from the gtk build.
648 dh_install $(objdir_gtk_install)/lib/libwx_base*.so.* usr/lib
649 dh_installdirs usr/share/lintian/overrides
650 cp debian/lintian-override debian/$(package_wxbase_lib)/usr/share/lintian/overrides/$(package_wxbase_lib)
651
652install-wxbase-dev: DH_OPTIONS=-p$(package_wxbase_dev)
653install-wxbase-dev: build-wxbase-shared-stamp install-gtk-shared-stamp
654 dh_testdir
655 dh_testroot
656 dh_clean -k
657 @# No, this is not a typo, we steal these libs from the gtk build.
658 dh_install $(objdir_gtk_install)/lib/libwx_base*.so usr/lib
659 dh_install $(objdir_wxbase_shared)/lib/wx/include usr/lib/wx
660 dh_install $(objdir_wxbase_shared)/lib/wx/config/base* usr/lib/wx/config
661
662install-wxbase-dbg: DH_OPTIONS=-p$(package_wxbase_dbg)
663install-wxbase-dbg: build-wxbase-debug-stamp
664 dh_testdir
665 dh_testroot
666 dh_clean -k
667 @# No, this is not a typo, we steal these libs from the gtk debug build.
668 dh_install $(objdir_gtk_debug)/lib/libwx_base* usr/lib
669 dh_install $(objdir_wxbase_debug)/lib/wx/include usr/lib/wx
670 dh_install $(objdir_wxbase_debug)/lib/wx/config/base* usr/lib/wx/config
671 dh_installdirs usr/share/lintian/overrides
672 cp debian/lintian-override debian/$(package_wxbase_dbg)/usr/share/lintian/overrides/$(package_wxbase_dbg)
673
ceec2216 674install-gtk-shared-stamp: build-gtk-shared-stamp build-gtk-shared-contrib-stamp
8ddf18dd
RL
675 dh_testdir
676 mkdir -p $(objdir_gtk_install)
677 cd $(objdir_gtk_shared) \
678 && $(MAKE) install prefix=`pwd`/../$(objdir_gtk_install)
ceec2216
RL
679 cd $(objdir_gtk_shared)/contrib/src \
680 && $(MAKE) install prefix=`pwd`/../../../$(objdir_gtk_install)
8ddf18dd
RL
681 touch $@
682
f6bcfd97 683install-gtk-lib: DH_OPTIONS=-p$(package_gtk_lib)
ceec2216 684install-gtk-lib: install-gtk-shared-stamp
f6bcfd97
BP
685 dh_testdir
686 dh_testroot
687 dh_clean -k
6de5430b
RD
688 dh_install $(objdir_gtk_install)/lib/libwx_gtk*.so.* usr/lib
689 dh_installdirs usr/share/lintian/overrides
690 cp debian/lintian-override debian/$(package_gtk_lib)/usr/share/lintian/overrides/$(package_gtk_lib)
e4c4c1c6 691
f6bcfd97 692install-gtk-dev: DH_OPTIONS=-p$(package_gtk_dev)
eedbe999 693install-gtk-dev: install-gtk-shared-stamp
f6bcfd97
BP
694 dh_testdir
695 dh_testroot
696 dh_clean -k
6de5430b 697 dh_install $(objdir_gtk_install)/lib/libwx_gtk*.so usr/lib
ceec2216
RL
698 dh_install $(objdir_gtk_install)/lib/wx/include usr/lib/wx
699 dh_install $(objdir_gtk_install)/lib/wx/config/gtk* usr/lib/wx/config
ceec2216 700
f6bcfd97 701install-gtk-dbg: DH_OPTIONS=-p$(package_gtk_dbg)
ceec2216 702install-gtk-dbg: build-gtk-debug-stamp build-gtk-debug-contrib-stamp
f6bcfd97
BP
703 dh_testdir
704 dh_testroot
705 dh_clean -k
6de5430b 706 dh_install $(objdir_gtk_debug)/lib/libwx_gtk* usr/lib
ceec2216
RL
707 dh_install $(objdir_gtk_debug)/lib/wx/include usr/lib/wx
708 dh_install $(objdir_gtk_debug)/lib/wx/config/gtk* usr/lib/wx/config
6de5430b 709 dh_installdirs usr/share/lintian/overrides
050207ec 710 cp debian/lintian-override debian/$(package_gtk_dbg)/usr/share/lintian/overrides/$(package_gtk_dbg)
e4c4c1c6 711
7b7a7637 712
fdefae19
RL
713install-gtk-py-lib: DH_OPTIONS=-p$(package_gtk_py_lib)
714install-gtk-py-lib: build-gtk-py-stamp
f6bcfd97
BP
715 dh_testdir
716 dh_testroot
717 dh_clean -k
6de5430b 718 dh_installdirs usr/lib/wx/python
e1293dcf
RL
719 cd wxPython \
720 && $(python_ver) ./setup.py install \
fdefae19 721 --prefix=`pwd`/../debian/$(package_gtk_py_lib)/usr \
b63b07a8 722 WX_CONFIG='$(wxconfig)' \
6de5430b
RD
723 SYS_WX_CONFIG='$(py_wxconfig)' \
724 WXPORT=$(pytoolkit) \
b945df00 725 $(PY_UNICODE) \
fdefae19 726 FLAVOUR=$(DEBIAN_WXFLAVOUR)
e1293dcf 727
6de5430b
RD
728 mv debian/$(package_gtk_py_lib)/$(pydir)/wx.pth \
729 debian/$(package_gtk_py_lib)/usr/lib/wx/python/wx$(release).pth
730
e653e181 731 find debian/$(package_gtk_py_lib)/$(pydir) -name '*.py?' -exec rm '{}' ';'
f6bcfd97 732
fdefae19 733 # This is rather bogus, its included in the main copyright file now though.
e653e181 734 rm -f debian/$(package_gtk_py_lib)/$(wxpydir)/wx/tools/XRCed/license.txt
fdefae19 735
6de5430b
RD
736install-gtk-py-ver: DH_OPTIONS=-p$(package_gtk_py_ver)
737install-gtk-py-ver: install-gtk-py-lib
fdefae19
RL
738 dh_testdir
739 dh_testroot
740 dh_clean -k
fdefae19 741
6de5430b
RD
742ifndef DEBIAN_WX_DEFAULT_VERSION
743
744 dh_movefiles --sourcedir=debian/$(package_gtk_py_lib) $(pydir)/wxversion.py
745else
746 rm debian/$(package_gtk_py_lib)/$(pydir)/wxversion.py
747endif
748
bdf784d9
RD
749
750
6de5430b
RD
751install-gtk-py-tools: DH_OPTIONS=-p$(package_gtk_py_tools)
752install-gtk-py-tools: install-gtk-py-ver
753 dh_testdir
754 dh_testroot
755 dh_clean -k
756
757ifndef DEBIAN_WX_DEFAULT_VERSION
758
759 dh_movefiles --sourcedir=debian/$(package_gtk_py_lib) usr/bin
fdefae19 760
0ecfbbea 761 dh_installman debian/wxPython-tools.1
e1293dcf
RL
762 dh_link usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2py.1 \
763 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2xpm.1 \
764 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2png.1 \
765 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pycrust.1 \
766 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyshell.1 \
767 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/xrced.1 \
768 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/helpviewer.1 \
769 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyalacarte.1 \
770 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyalamode.1 \
46ec284e
RL
771 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pywrap.1 \
772 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pywxrc.1
e1293dcf 773
6de5430b
RD
774 dh_installdirs usr/share/lintian/overrides
775 cp debian/lintian-override debian/$(package_gtk_py_tools)/usr/share/lintian/overrides/$(package_gtk_py_tools)
776endif
777 mkdir -p debian/$(package_gtk_py_tools)/usr/share/pixmaps
778 mkdir -p debian/$(package_gtk_py_tools)/usr/share/applications
779
780 cp wxPython/wx/py/PyCrust_32.png debian/$(package_gtk_py_tools)/usr/share/pixmaps/pycrust.png
781 cp wxPython/wx/py/PyCrust_32.png debian/$(package_gtk_py_tools)/usr/share/pixmaps/pyshell.png
782 cp wxPython/wx/tools/XRCed/XRCed_32.png debian/$(package_gtk_py_tools)/usr/share/pixmaps/xrced.png
783 cp debian/pycrust.desktop debian/$(package_gtk_py_tools)/usr/share/applications
784 cp debian/pyshell.desktop debian/$(package_gtk_py_tools)/usr/share/applications
785 cp debian/xrced.desktop debian/$(package_gtk_py_tools)/usr/share/applications
786
787 rm -r debian/$(package_gtk_py_lib)/usr/bin
788
bdf784d9
RD
789install-gtk-py-addons: DH_OPTIONS=-p$(package_gtk_py_addons)
790install-gtk-py-addons: install-gtk-py-tools
791 dh_testdir
792 dh_testroot
793 dh_clean -k
794ifndef DEBIAN_WX_DEFAULT_VERSION
795
796 dh_movefiles --sourcedir=debian/$(package_gtk_py_lib) $(pydir)/wxaddons
797else
798 rm -r debian/$(package_gtk_py_lib)/$(pydir)/wxaddons
799endif
800
801
802install-gtk-py: install-gtk-py-addons
6de5430b 803
0ecfbbea 804
148e141b
RL
805install-common: DH_OPTIONS=-p$(package_common)
806install-common: install-gtk-shared-stamp
807 dh_testdir
808 dh_testroot
809 dh_clean -k
148e141b 810
0ee8fbac
VZ
811 dh_install $(objdir_gtk_install)/share/bakefile/presets usr/share/bakefile
812 dh_install $(objdir_gtk_install)/share/bakefile/presets/wx*.bkl usr/share/bakefile/presets
813
814 dh_install $(objdir_gtk_install)/share/aclocal usr/share
148e141b
RL
815 dh_installman debian/wx-config.1
816
0ee8fbac 817 dh_install $(objdir_gtk_shared)/utils/wxrc/wxrc usr/bin
148e141b
RL
818 dh_installman debian/wxrc-tools.1
819 dh_link usr/share/man/man1/wxrc-tools.1 usr/share/man/man1/wxrc.1
148e141b
RL
820
821
f6bcfd97 822install-headers: DH_OPTIONS=-p$(package_headers)
8ddf18dd 823install-headers: install-gtk-shared-stamp
f6bcfd97
BP
824 dh_testdir
825 dh_testroot
826 dh_clean -k
8155b640
RL
827
828# The only way to be really sure we get the univ headers correct is to install
829# them. Do that in a scratch dirs, and move the gtk ones last, so at least
830# they win in the result of any uncaught conflict.
831
0ecfbbea
RL
832# cd $(objdir_gtk_univ) \
833# && $(MAKE) install prefix=`pwd`/../$(objdir_univ_install)/usr
8155b640 834
0ecfbbea 835# dh_movefiles --sourcedir=$(objdir_univ_install)
8ddf18dd 836 dh_install $(objdir_gtk_install)/include usr
ceec2216 837
3ca6a5f0 838install-i18n: DH_OPTIONS=-p$(package_i18n)
8ddf18dd 839install-i18n: build-i18n-stamp install-gtk-shared-stamp
3ca6a5f0
BP
840 dh_testdir
841 dh_testroot
842 dh_clean -k
8ddf18dd 843 dh_install $(objdir_gtk_install)/share/locale usr/share
3ca6a5f0 844
f6bcfd97
BP
845install-doc: DH_OPTIONS=-p$(package_doc)
846install-doc: build-doc-stamp
847 dh_testdir
848 dh_testroot
849 dh_clean -k
6de5430b
RD
850
851 @# Link this monstrosity with an overly obfuscated name
852 @# to something that both people and browsers can expect to find.
853 dh_link usr/share/doc/$(package_doc)/wx-manual.html/wx-$(release)-manual_contents.html \
854 usr/share/doc/$(package_doc)/wx-manual.html/index.html
f6bcfd97
BP
855
856install-examples: DH_OPTIONS=-p$(package_examples)
857install-examples: build-examples-stamp
858 dh_testdir
859 dh_testroot
860 dh_clean -k
f6bcfd97 861
6181913e
RL
862install-gtk-dbg-py: DH_OPTIONS=-p$(package_gtk_dbg_py)
863install-gtk-dbg-py: build-gtk-dbg-py-stamp
864 dh_testdir
865 dh_testroot
866 dh_clean -k
6de5430b 867 dh_installdirs usr/lib/wx/python
6181913e
RL
868 cd wxPython \
869 && $(python_ver) ./setup.py install \
870 --prefix=`pwd`/../debian/$(package_gtk_dbg_py)/usr \
871 WX_CONFIG='$(wxconfig-dbg)' \
6de5430b
RD
872 SYS_WX_CONFIG='$(pyd_wxconfig)' \
873 WXPORT=$(pytoolkit) \
b945df00 874 $(PY_UNICODE) \
fdefae19 875 FLAVOUR=$(addsuffix -,$(DEBIAN_WXFLAVOUR))dbg
6181913e 876
6de5430b
RD
877 mv debian/$(package_gtk_py_lib)/$(pydir)/wx.pth \
878 debian/$(package_gtk_py_lib)/usr/lib/wx/python/wx$(release)-dbg.pth
879
e653e181
RL
880 find debian/$(package_gtk_dbg_py)/$(pydir) -name '*.py?' -exec rm '{}' ';'
881 rm -rf usr/bin $(pydir)/{wxversion.py,wx.pth}
6181913e
RL
882
883 # This is rather bogus, its included in the main copyright file now though.
e653e181 884 rm -f debian/$(package_gtk_dbg_py)/$(wxpydir)/wx/tools/XRCed/license.txt
6181913e 885
4fb788e4 886
3a922bb4 887install-msw-dev: DH_OPTIONS=-p$(package_msw_dev)
978f1259 888install-msw-dev: build-msw-shared-stamp build-msw-static-stamp
3a922bb4
RL
889 dh_testdir
890 dh_testroot
891 dh_clean -k
ceec2216
RL
892 dh_install $(objdir_msw_shared)/lib/*.dll* usr/$(cross_host)/lib
893 dh_install $(objdir_msw_shared)/lib/wx/include usr/$(cross_host)/lib/wx
9103d280 894 dh_install $(objdir_msw_shared)/lib/wx/config/$(cross_host)* usr/$(cross_host)/lib/wx/config
ceec2216
RL
895 dh_install $(objdir_msw_static)/lib/*.a usr/$(cross_host)/lib
896 dh_install $(objdir_msw_static)/lib/wx/include usr/$(cross_host)/lib/wx
9103d280 897 dh_install $(objdir_msw_static)/lib/wx/config/$(cross_host)* usr/$(cross_host)/lib/wx/config
3a922bb4
RL
898 $(cross_host)-strip --strip-debug debian/$(package_msw_dev)/usr/$(cross_host)/lib/*.a
899
9103d280
RL
900 @# As a special case for the cross packages, we link their config
901 @# under /usr as well as under the normal cross prefix. This way
902 @# --prefix=/usr/$(cross_host) and --prefix=/usr --host=$(cross_host)
903 @# will have a congruent effect on wx-config.
904 @( for f in `ls -1 debian/$(package_msw_dev)/usr/$(cross_host)/lib/wx/config`; do \
905 all_cfg="$${all_cfg} usr/$(cross_host)/lib/wx/config/$$f usr/lib/wx/config/$$f"; \
906 echo "linking cross config /usr/$(cross_host)/lib/wx/config/$$f"; \
907 done; \
908 dh_link $${all_cfg}; \
909 )
910
4fb788e4
RL
911install-msw-dbg: DH_OPTIONS=-p$(package_msw_dbg)
912install-msw-dbg: build-msw-dbg-stamp
913 dh_testdir
914 dh_testroot
915 dh_clean -k
ceec2216
RL
916 dh_install $(objdir_msw_dbg)/lib/*.dll* usr/$(cross_host)/lib
917 dh_install $(objdir_msw_dbg)/lib/wx/include usr/$(cross_host)/lib/wx
9103d280 918 dh_install $(objdir_msw_dbg)/lib/wx/config/$(cross_host)* usr/$(cross_host)/lib/wx/config
978f1259
RL
919 # No static lib, they're freakin' huge!
920 #$(cross_host)-strip --strip-debug debian/$(package_msw_dbg)/usr/$(cross_host)/lib/*.a
4fb788e4 921
9103d280
RL
922 @( for f in `ls -1 debian/$(package_msw_dbg)/usr/$(cross_host)/lib/wx/config`; do \
923 all_cfg="$${all_cfg} usr/$(cross_host)/lib/wx/config/$$f usr/lib/wx/config/$$f"; \
924 echo "linking cross config /usr/$(cross_host)/lib/wx/config/$$f"; \
925 done; \
926 dh_link $${all_cfg}; \
927 )
928
3a922bb4
RL
929install-headers-msw: DH_OPTIONS=-p$(package_headers_msw)
930install-headers-msw:
931 dh_testdir
932 dh_testroot
933 dh_clean -k
ceec2216 934
148e141b
RL
935 cd $(objdir_msw_shared) \
936 && $(MAKE) install prefix=`pwd`/../$(objdir_msw_install)
ceec2216 937
148e141b
RL
938# Symlink all the headers that will be installed by the main -headers
939# package to where the cross compiler will expect them.
940 @( for f in `ls -1 $(objdir_msw_install)/include/wx-$(release)/wx`; do \
9103d280 941 all_h="$${all_h} usr/include/wx-$(release)/wx/$$f usr/$(cross_host)/include/wx-$(release)/wx/$$f"; \
ceec2216
RL
942 echo "linking header /usr/include/wx-$(release)/wx/$$f"; \
943 done; \
944 dh_link $${all_h}; \
945 )
946
148e141b 947# But install this lot for real.
ceec2216 948 rm -f debian/$(package_headers_msw)/usr/$(cross_host)/include/wx-$(release)/wx/msw
148e141b 949 dh_install $(objdir_msw_install)/include/wx-$(release)/wx/msw usr/$(cross_host)/include/wx-$(release)/wx
3a922bb4
RL
950
951
f6bcfd97 952binary-common:
f6bcfd97
BP
953 dh_testdir
954 dh_testroot
955 dh_installdocs
5c0e67b2
RL
956 dh_installchangelogs
957 dh_installexamples
8155b640 958 dh_installmenu
5c0e67b2 959 dh_link
3a922bb4
RL
960
961 @# Don't strip debug libs at all, and strip cross libs elsewhere
962 @# with the cross host tools until dh_strip gets smarter.
6de5430b
RD
963 dh_strip -N$(package_gtk_dbg) -N$(package_wxbase_dbg) \
964 -N$(package_msw_dev) -N$(package_msw_dbg)
3a922bb4 965
e4c4c1c6
RL
966 dh_compress
967 dh_fixperms
6181913e
RL
968
969 @# Don't do this for the dbg-py special build because dh_makeshlibs
970 @# will crap out if it is called with no packages to act on.
971 @if [ "x$(DH_OPTIONS)" != "-p$(package_gtk_dbg_py)" ]; then \
6de5430b
RD
972 echo "dh_makeshlibs -N$(package_gtk_py_lib) -V"; \
973 dh_makeshlibs -N$(package_gtk_py_lib) -V; \
6181913e
RL
974 fi
975
e4c4c1c6 976 dh_installdeb
f2b5c157 977 dh_shlibdeps -ldebian/$(package_wxbase_lib)/usr/lib:debian/$(package_wxbase_dbg)/usr/lib:debian/$(package_gtk_lib)/usr/lib:debian/$(package_gtk_dbg)/usr/lib
e4c4c1c6
RL
978 dh_gencontrol
979 dh_md5sums
980 dh_builddeb
981
f6bcfd97 982# Build architecture-independent files here.
050207ec
RL
983# Note that you currently can't build the indep packages without first
984# building the arch specific package files needed to create them.
3abb92ce 985binary-indep: build_all install
3a922bb4 986 $(MAKE) -f debian/rules \
6de5430b 987 DH_OPTIONS="-i $(addprefix -N,$(extra_packages))" \
a0b03701 988 binary-common
f6bcfd97 989
050207ec
RL
990# Build just the architecture-dependent files here.
991binary-arch: build_arch install_arch
3a922bb4 992 $(MAKE) -f debian/rules \
6de5430b 993 DH_OPTIONS="-a $(addprefix -N,$(extra_packages))" \
a0b03701 994 binary-common
f6bcfd97
BP
995
996# Build all packages target.
997binary: binary-arch binary-indep
998
6de5430b 999
3a922bb4
RL
1000# This is a special target for building the wxMSW-cross packages.
1001# It's not currently called during the official package build run
1002# but may be run separately to build the extra packages.
1003# There is an implied build dep on the mingw32 cross compiler
1004# that is not in the control file.
1005binary-cross: control-files-stamp $(install_all_cross)
1006 $(MAKE) -f debian/rules \
e1293dcf 1007 DH_OPTIONS="-p$(package_msw_dev) -p$(package_msw_dbg) -p$(package_headers_msw)" \
a0b03701 1008 binary-common
3a922bb4 1009
f6bcfd97 1010
6181913e
RL
1011# Build wxPython against libwxgtk-dbg. This package will conflict
1012# with the release build one, but may be useful to some people.
1013binary-dbg-py: control-files-stamp install-gtk-dbg-py
1014 $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_dbg_py)" binary-common
1015
1016
f6bcfd97
BP
1017############################################################################
1018#
1019# Some rules to build a subset of the complete list of packages that can be
1020# built from CVS. Beware that packages produced with these rules may *NOT*
1021# be compatible with packages built using the 'binary' target or even with
1022# Debian policy. Do not distribute packages built with these rules, they
1023# are currently useful for rapid in-house testing by developers only.
1024
9c65b7a5
VZ
1025DH_OPTIONS_GTK := -p$(package_wxbase_lib) -p$(package_gtk_lib) -p$(package_headers)
1026
f6bcfd97 1027# libwxgtk shared lib package
9c65b7a5
VZ
1028binary-gtk: control-files-stamp install-gtk-lib install-wxbase-lib install-headers
1029 $(MAKE) -f debian/rules DH_OPTIONS="$(DH_OPTIONS_GTK)" binary-common
f6bcfd97 1030
9c65b7a5 1031binary-gtk-dev: control-files-stamp install-gtk-dev install-wxbase-dev install-headers
f6bcfd97 1032 $(MAKE) -f debian/rules \
9c65b7a5
VZ
1033 DH_OPTIONS="-p$(package_wxbase_dev) -p$(package_gtk_dev) $(DH_OPTIONS_GTK)" \
1034 binary-common
f6bcfd97 1035
9c65b7a5
VZ
1036binary-gtk-dbg: control-files-stamp install-gtk-dbg install-wxbase-dbg install-headers
1037 $(MAKE) -f debian/rules \
1038 DH_OPTIONS="-p$(package_wxbase_dbg) -p$(package_gtk_dbg) -p$(package_headers)" \
1039 binary-common
f6bcfd97 1040
7b7a7637 1041
f6bcfd97
BP
1042# docs package
1043binary-doc: control-files-stamp install-doc
1044 $(MAKE) -f debian/rules DH_OPTIONS=-p$(package_doc) binary-common
1045
76314141
RL
1046binary-fast:control-files-stamp install-gtk-dbg install-msw-dev install-headers install-headers-msw
1047 $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_dbg) -p$(package_msw_dev) -p$(package_headers) -p$(package_headers_msw)" binary-common
1048
f6bcfd97 1049
6181913e
RL
1050.PHONY: build build_all build_arch \
1051 clean clean-py purge-release-py purge-dbg-py \
1052 binary-indep binary-arch binary binary-common \
6de5430b
RD
1053 binary-gtk binary-gtk-dev binary-gtk-dbg \
1054 binary-wxbase binary-wxbase-dev binary-wxbase-dbg \
1055 binary-doc binary-cross binary-dbg-py \
6181913e 1056 install install_arch install-gtk-lib install-gtk-dev \
ceec2216 1057 install-gtk-dbg \
6de5430b
RD
1058 install-gtk-py install-gtk-py-tools install-gtk-py-ver \
1059 install-gtk-py-lib install-gtk-dbg-py \
148e141b
RL
1060 install-common install-headers install-i18n install-doc \
1061 install-examples install-msw-dev install-msw-dbg install-headers-msw
f6bcfd97 1062