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