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