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