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