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