]>
Commit | Line | Data |
---|---|---|
1 | #!/usr/bin/make -f | |
2 | # debian/rules file to build packages from wx CVS source | |
3 | # | |
4 | # Sculpted 13/2/2000 by Ron Lee <ron@debian.org> from new and | |
5 | # variously stolen code :-) | |
6 | # It makes copious use of the debhelper utilities written by | |
7 | # Joey Hess and others. | |
8 | ||
9 | #export DH_VERBOSE=1 | |
10 | export DH_OPTIONS | |
11 | ||
12 | ifdef DISTCC_HOSTS | |
13 | ||
14 | #JOB_COUNT := $(shell set $${DISTCC_HOSTS} > /dev/null 2>&1 ; echo $$(($$\# + $$\#))) | |
15 | # Nearly as fast, but doesn't raise the room temperature | |
16 | # or saturate the build machines quite so much. | |
17 | JOB_COUNT := $(shell set $${DISTCC_HOSTS} > /dev/null 2>&1 ; echo $$\#) | |
18 | FAST_MAKE = $(MAKE) -j $(JOB_COUNT) | |
19 | ||
20 | else | |
21 | ||
22 | FAST_MAKE = $(MAKE) | |
23 | ||
24 | endif | |
25 | ||
26 | -include debian/python-version | |
27 | ||
28 | ||
29 | # This will extract a flavour out of the name of the source directory | |
30 | # and flavour the packages and binaries with it. 'Official' builds | |
31 | # should use a source dir of the form wxwidgets$RELEASE-$VERSION. | |
32 | # Flavoured builds may use wxwidgets$RELEASE-$FLAVOUR-$VERSION, where | |
33 | # any descriptive alphanumeric name will do for FLAVOUR. This will | |
34 | # allow a custom build to be installed alongside the mainline ones | |
35 | # without conflict. You will also need to make a corresponding | |
36 | # changelog entry for your flavour source package using: | |
37 | # wxwidget$RELEASE-$FLAVOUR ($VERSION) to satify dpkg-source and | |
38 | # to correctly set the release below. | |
39 | DEBIAN_WXFLAVOUR := $(shell pwd | sed -e 's@.*/wxwidgets[0-9.]\+-\?\(.*\)-[0-9.]\+-\?.*@\1@') | |
40 | ||
41 | release := $(shell dpkg-parsechangelog | sed -n 's/^Source: wxwidgets//p') | |
42 | ||
43 | ||
44 | cross_host = i586-mingw32msvc | |
45 | cross_build = $(shell ./config.guess) | |
46 | ||
47 | config_cache = ../config_deb.cache | |
48 | config_cache_cross = ../config_deb_cross.cache | |
49 | ||
50 | # Packages to build: | |
51 | package_gtk_lib = libwxgtk$(release) | |
52 | package_gtk_dev = libwxgtk$(release)-dev | |
53 | package_gtk_dbg = libwxgtk$(release)-dbg | |
54 | package_gtk_py = libwxgtk$(release)-python | |
55 | package_headers = wx$(release)-headers | |
56 | package_i18n = wx$(release)-i18n | |
57 | package_doc = wx$(release)-doc | |
58 | package_examples = wx$(release)-examples | |
59 | ||
60 | package_gtk_dbg_py = libwxgtk$(release)-dbg-python | |
61 | package_msw_dev = libwxmsw$(release)-dev | |
62 | package_msw_dbg = libwxmsw$(release)-dbg | |
63 | package_headers_msw = wx$(release)-headers-msw | |
64 | ||
65 | # Build directories: | |
66 | objdir_gtk_shared = objs_gtk_sh | |
67 | objdir_gtk_static = objs_gtk_st | |
68 | objdir_gtk_debug = objs_gtk_d | |
69 | objdir_gtk_install = objs_gtk_install | |
70 | objdir_doc_cruft = objs_doc_con | |
71 | objdir_doc = docs/wx-manual.html | |
72 | objdir_examples = docs/examples | |
73 | objdir_i18n = locale | |
74 | ||
75 | objdir_msw_shared = objs_msw_sh | |
76 | objdir_msw_static = objs_msw_st | |
77 | objdir_msw_dbg = objs_msw_d | |
78 | ||
79 | objdirs = $(objdir_gtk_shared) $(objdir_gtk_static) $(objdir_gtk_debug) \ | |
80 | $(objdir_gtk_install) \ | |
81 | $(objdir_doc_cruft) $(objdir_doc) $(objdir_examples) \ | |
82 | $(objdir_msw_shared) $(objdir_msw_static) $(objdir_msw_dbg) | |
83 | ||
84 | # note that the i18n package is actually arch indep (once built) | |
85 | # but must be built (and installed) during the arch any phase as | |
86 | # it's pulled out of the wxGTK shared lib package. | |
87 | ||
88 | ||
89 | # Build stamps: | |
90 | build_arch_stamps = build-gtk-shared-stamp build-gtk-shared-contrib-stamp \ | |
91 | build-gtk-static-stamp build-gtk-static-contrib-stamp \ | |
92 | build-gtk-debug-stamp build-gtk-debug-contrib-stamp \ | |
93 | build-i18n-stamp build-gtk-py-stamp | |
94 | ||
95 | ||
96 | build_indep_stamps = build-examples-stamp build-doc-stamp | |
97 | ||
98 | build_cross_stamps = build-msw-shared-stamp build-msw-static-stamp build-msw-dbg-stamp | |
99 | ||
100 | build_stamps_native = $(build_arch_stamps) $(build_indep_stamps) | |
101 | ||
102 | build_stamps = $(build_stamps_native) $(build_cross_stamps) | |
103 | ||
104 | ||
105 | # Install targets: | |
106 | install_all_arch = install-gtk-lib install-gtk-dev install-gtk-dbg \ | |
107 | install-headers install-i18n install-gtk-py | |
108 | ||
109 | install_all_indep = install-examples install-doc | |
110 | ||
111 | install_all_cross = install-msw-dev install-msw-dbg install-headers-msw | |
112 | ||
113 | install_all_native = $(install_all_arch) $(install_all_indep) | |
114 | ||
115 | install_all = $(install_all_native) $(install_all_cross) | |
116 | ||
117 | ||
118 | wxconfig := $(shell pwd)/$(objdir_gtk_shared)/wx-config | |
119 | wxconfig-dbg := $(shell pwd)/$(objdir_gtk_debug)/wx-config | |
120 | ||
121 | #contrib_libs := $(subst CVS,,$(notdir $(wildcard contrib/include/wx/*))) | |
122 | ||
123 | ||
124 | # The Rules: | |
125 | ||
126 | debian/python-version: | |
127 | echo python_ver := python$(shell python -c "import sys;print sys.version[:3]") > $@ | |
128 | ||
129 | debian/control: $(addprefix debian/,control.in python-version) | |
130 | sed -e 's/=V/$(release)/g;s/=PY/$(python_ver)/g' < debian/control.in > debian/control | |
131 | ||
132 | control-files-stamp: debian/control | |
133 | dh_testdir | |
134 | # FIXME: we clipped menu out of this one, clean up the rest of that. | |
135 | @for f in postinst prerm; do \ | |
136 | echo "generating control file $(package_gtk_dev).$$f"; \ | |
137 | sed -e 's/=V/$(release)/g' < debian/libwxgtk-dev.$$f \ | |
138 | > debian/$(package_gtk_dev).$$f; \ | |
139 | done; | |
140 | @for f in postinst prerm; do \ | |
141 | echo "generating control file $(package_gtk_dbg).$$f"; \ | |
142 | sed -e 's/=V/$(release)/g' < debian/libwxgtk-dbg.$$f \ | |
143 | > debian/$(package_gtk_dbg).$$f; \ | |
144 | done; | |
145 | @for f in dirs docs menu postinst prerm; do \ | |
146 | echo "generating control file $(package_gtk_py).$$f"; \ | |
147 | sed -e 's/=PY/$(python_ver)/g;s/=V/$(release)/g' \ | |
148 | < debian/libwxgtk-python.$$f \ | |
149 | > debian/$(package_gtk_py).$$f; \ | |
150 | done; | |
151 | @for f in docs doc-base; do \ | |
152 | echo "generating control file $(package_doc).$$f"; \ | |
153 | sed -e 's/=V/$(release)/g' < debian/wx-doc.$$f \ | |
154 | > debian/$(package_doc).$$f; \ | |
155 | done; | |
156 | @for f in examples; do \ | |
157 | echo "generating control file $(package_examples).$$f"; \ | |
158 | cp debian/wx-examples.$$f debian/$(package_examples).$$f; \ | |
159 | done; | |
160 | @for f in dirs docs postinst; do \ | |
161 | echo "generating control file $(package_gtk_dbg_py).$$f"; \ | |
162 | sed -e 's/=PY/$(python_ver)/g;s/=V/$(release)/g' \ | |
163 | < debian/libwxgtk-python.$$f \ | |
164 | > debian/$(package_gtk_dbg_py).$$f; \ | |
165 | done; | |
166 | @for f in menu prerm; do \ | |
167 | echo "generating control file $(package_gtk_dbg_py).$$f"; \ | |
168 | sed -e 's/=PY/$(python_ver)/g;s/=V/$(release)/g' \ | |
169 | < debian/libwxgtk-dbg-python.$$f \ | |
170 | > debian/$(package_gtk_dbg_py).$$f; \ | |
171 | done; | |
172 | @for f in postinst prerm; do \ | |
173 | echo "generating control file $(package_msw_dev).$$f"; \ | |
174 | sed -e 's/=V/$(release)/g;s/=H/$(cross_host)/g' < debian/libwxmsw-dev.$$f \ | |
175 | > debian/$(package_msw_dev).$$f; \ | |
176 | done; | |
177 | @for f in postinst prerm; do \ | |
178 | echo "generating control file $(package_msw_dbg).$$f"; \ | |
179 | sed -e 's/=V/$(release)/g;s/=H/$(cross_host)/g' < debian/libwxmsw-dbg.$$f \ | |
180 | > debian/$(package_msw_dbg).$$f; \ | |
181 | done; | |
182 | @echo "generating control file lintian-override"; \ | |
183 | sed -e 's/=V/$(release)/g' < debian/lintian-override.in \ | |
184 | > debian/lintian-override; \ | |
185 | touch $@ | |
186 | ||
187 | build_arch: control-files-stamp $(build_arch_stamps) | |
188 | build_all: control-files-stamp $(build_stamps_native) | |
189 | ||
190 | # Really we should probably do nothing here until we know which | |
191 | # binary target is being called, but alpha builds were exploding | |
192 | # (compiler segfaults) in random places when building under fakeroot | |
193 | # from the binary-arch target. Build all -arch files here then, and | |
194 | # let the -indep stuff fend for itself later. | |
195 | ||
196 | build: build_arch | |
197 | ||
198 | ||
199 | configure-gtk-shared-stamp: | |
200 | dh_testdir | |
201 | mkdir -p $(objdir_gtk_shared) | |
202 | cd $(objdir_gtk_shared) \ | |
203 | && ../configure --prefix=/usr \ | |
204 | --cache-file=$(config_cache) \ | |
205 | --with-flavour=$(DEBIAN_WXFLAVOUR) \ | |
206 | --with-gtk \ | |
207 | --enable-gtk2 \ | |
208 | --enable-unicode \ | |
209 | --with-opengl \ | |
210 | --with-zlib=sys \ | |
211 | --with-libjpeg=sys \ | |
212 | --with-libpng=sys \ | |
213 | --with-libtiff=sys \ | |
214 | --enable-dynamic-loader \ | |
215 | --enable-std_iostreams | |
216 | touch $@ | |
217 | ||
218 | build-gtk-shared-stamp: configure-gtk-shared-stamp | |
219 | dh_testdir | |
220 | cd $(objdir_gtk_shared) && $(FAST_MAKE) | |
221 | touch $@ | |
222 | ||
223 | configure-gtk-static-stamp: | |
224 | dh_testdir | |
225 | mkdir -p $(objdir_gtk_static) | |
226 | cd $(objdir_gtk_static) \ | |
227 | && ../configure --prefix=/usr \ | |
228 | --cache-file=$(config_cache) \ | |
229 | --with-flavour=$(DEBIAN_WXFLAVOUR) \ | |
230 | --with-gtk \ | |
231 | --enable-gtk2 \ | |
232 | --enable-unicode \ | |
233 | --with-opengl \ | |
234 | --disable-shared \ | |
235 | --with-zlib=sys \ | |
236 | --with-libjpeg=sys \ | |
237 | --with-libpng=sys \ | |
238 | --with-libtiff=sys \ | |
239 | --enable-dynamic-loader \ | |
240 | --enable-std_iostreams | |
241 | touch $@ | |
242 | ||
243 | build-gtk-static-stamp: configure-gtk-static-stamp | |
244 | dh_testdir | |
245 | cd $(objdir_gtk_static) && $(FAST_MAKE) | |
246 | touch $@ | |
247 | ||
248 | configure-gtk-debug-stamp: | |
249 | dh_testdir | |
250 | mkdir -p $(objdir_gtk_debug) | |
251 | cd $(objdir_gtk_debug) \ | |
252 | && ../configure --prefix=/usr \ | |
253 | --cache-file=$(config_cache) \ | |
254 | --with-flavour=$(DEBIAN_WXFLAVOUR) \ | |
255 | --with-gtk \ | |
256 | --enable-gtk2 \ | |
257 | --enable-unicode \ | |
258 | --with-opengl \ | |
259 | --enable-debug \ | |
260 | --with-zlib=sys \ | |
261 | --with-libjpeg=sys \ | |
262 | --with-libpng=sys \ | |
263 | --with-libtiff=sys \ | |
264 | --enable-dynamic-loader \ | |
265 | --enable-std_iostreams | |
266 | touch $@ | |
267 | ||
268 | build-gtk-debug-stamp: configure-gtk-debug-stamp | |
269 | dh_testdir | |
270 | cd $(objdir_gtk_debug) && $(FAST_MAKE) | |
271 | touch $@ | |
272 | ||
273 | ||
274 | build-gtk-shared-contrib-stamp: build-gtk-shared-stamp | |
275 | dh_testdir | |
276 | cd $(objdir_gtk_shared)/contrib/src && $(FAST_MAKE) | |
277 | cd $(objdir_gtk_shared)/contrib/utils/wxrc && $(FAST_MAKE) | |
278 | cd $(objdir_gtk_shared)/contrib/utils/wxrcedit && $(FAST_MAKE) | |
279 | touch $@ | |
280 | ||
281 | build-gtk-static-contrib-stamp: build-gtk-static-stamp | |
282 | dh_testdir | |
283 | cd $(objdir_gtk_static)/contrib/src && $(FAST_MAKE) | |
284 | touch $@ | |
285 | ||
286 | build-gtk-debug-contrib-stamp: build-gtk-debug-stamp | |
287 | dh_testdir | |
288 | cd $(objdir_gtk_debug)/contrib/src && $(FAST_MAKE) | |
289 | touch $@ | |
290 | ||
291 | ||
292 | purge-dbg-py: | |
293 | @if [ ! -e build-gtk-py-stamp ]; then \ | |
294 | $(MAKE) -f debian/rules clean-py; \ | |
295 | fi | |
296 | $(RM) build-gtk-dbg-py-stamp | |
297 | ||
298 | build-gtk-py-stamp: build-gtk-shared-stamp purge-dbg-py | |
299 | dh_testdir | |
300 | touch docs/lgpl.txt | |
301 | cd wxPython \ | |
302 | && $(python_ver) ./setup.py build \ | |
303 | WX_CONFIG='$(wxconfig)' \ | |
304 | WXPORT=gtk2 \ | |
305 | UNICODE=1 | |
306 | touch $@ | |
307 | ||
308 | build-doc-stamp: build-gtk-shared-stamp | |
309 | dh_testdir | |
310 | cd $(objdir_gtk_shared)/utils/tex2rtf/src && $(FAST_MAKE) | |
311 | rm -rf $(objdir_doc) | |
312 | rm -rf $(objdir_doc_cruft) | |
313 | mkdir $(objdir_doc) | |
314 | mkdir $(objdir_doc_cruft) | |
315 | cd $(objdir_doc_cruft) \ | |
316 | && LD_LIBRARY_PATH=../$(objdir_gtk_shared)/lib:$(LD_LIBRARY_PATH) \ | |
317 | ../$(objdir_gtk_shared)/utils/tex2rtf/src/tex2rtf \ | |
318 | ../docs/latex/wx/manual.tex \ | |
319 | ../$(objdir_doc)/wx$(release)-manual.html \ | |
320 | -twice -html | |
321 | cp docs/latex/wx/*.gif $(objdir_doc) | |
322 | rm -rf $(objdir_doc_cruft) | |
323 | rm -f $(objdir_doc)/wxwin.con $(objdir_doc)/wxwin.hh* \ | |
324 | $(objdir_doc)/wxwin.htx $(objdir_doc)/wxwin.ref | |
325 | touch $@ | |
326 | ||
327 | build-examples-stamp: build-gtk-shared-stamp | |
328 | dh_testdir | |
329 | mkdir -p $(objdir_examples) | |
330 | ||
331 | # copy all samples and the Makefile generated for libwxgtk. | |
332 | cp -a samples $(objdir_examples) | |
333 | rm -f $(objdir_examples)/samples/Makefile | |
334 | cp -a $(objdir_gtk_shared)/samples/Makefile $(objdir_examples)/samples | |
335 | ||
336 | cd $(objdir_examples)/samples \ | |
337 | && find -name 'Makefile.in' -exec rm -f '{}' ';' \ | |
338 | && for d in $$(find -type d); do \ | |
339 | if [ -f $$d/makefile.unx ]; then \ | |
340 | mv $$d/makefile.unx $$d/Makefile; \ | |
341 | fi; \ | |
342 | done \ | |
343 | ||
344 | cp -a wxPython/demo $(objdir_examples)/wxPython | |
345 | ||
346 | touch $@ | |
347 | ||
348 | build-i18n-stamp: build-gtk-shared-stamp | |
349 | dh_testdir | |
350 | ||
351 | # touch .po files first, since if they are not already up | |
352 | # to date then _now_ is not the time to fix it. | |
353 | # That should have been been done before cvs was tagged. | |
354 | cd $(objdir_i18n) \ | |
355 | && touch *.po \ | |
356 | && $(MAKE) allmo | |
357 | touch $@ | |
358 | ||
359 | purge-release-py: | |
360 | @if [ ! -e build-gtk-dbg-py-stamp ]; then \ | |
361 | $(MAKE) -f debian/rules clean-py; \ | |
362 | fi | |
363 | $(RM) build-gtk-py-stamp | |
364 | ||
365 | build-gtk-dbg-py-stamp: build-gtk-debug-stamp purge-release-py | |
366 | dh_testdir | |
367 | touch docs/lgpl.txt | |
368 | cd wxPython \ | |
369 | && $(python_ver) ./setup.py build \ | |
370 | WX_CONFIG='$(wxconfig-dbg)' \ | |
371 | WXPORT=gtk2 \ | |
372 | UNICODE=1 | |
373 | touch $@ | |
374 | ||
375 | ||
376 | configure-msw-shared-stamp: | |
377 | dh_testdir | |
378 | mkdir -p $(objdir_msw_shared) | |
379 | cd $(objdir_msw_shared) \ | |
380 | && ../configure --prefix=/usr/$(cross_host) \ | |
381 | --cache-file=$(config_cache_cross) \ | |
382 | --host=$(cross_host) \ | |
383 | --build=$(cross_build) \ | |
384 | --with-flavour=$(DEBIAN_WXFLAVOUR) | |
385 | touch $@ | |
386 | ||
387 | build-msw-shared-stamp: configure-msw-shared-stamp | |
388 | dh_testdir | |
389 | cd $(objdir_msw_shared) && $(FAST_MAKE) | |
390 | touch $@ | |
391 | ||
392 | configure-msw-static-stamp: | |
393 | dh_testdir | |
394 | mkdir -p $(objdir_msw_static) | |
395 | cd $(objdir_msw_static) \ | |
396 | && ../configure --prefix=/usr/$(cross_host) \ | |
397 | --cache-file=$(config_cache_cross) \ | |
398 | --host=$(cross_host) \ | |
399 | --build=$(cross_build) \ | |
400 | --with-flavour=$(DEBIAN_WXFLAVOUR) \ | |
401 | --disable-shared | |
402 | touch $@ | |
403 | ||
404 | build-msw-static-stamp: configure-msw-static-stamp | |
405 | dh_testdir | |
406 | cd $(objdir_msw_static) && $(FAST_MAKE) | |
407 | touch $@ | |
408 | ||
409 | configure-msw-dbg-stamp: | |
410 | dh_testdir | |
411 | mkdir -p $(objdir_msw_dbg) | |
412 | cd $(objdir_msw_dbg) \ | |
413 | && ../configure --prefix=/usr/$(cross_host) \ | |
414 | --cache-file=$(config_cache_cross) \ | |
415 | --host=$(cross_host) \ | |
416 | --build=$(cross_build) \ | |
417 | --with-flavour=$(DEBIAN_WXFLAVOUR) \ | |
418 | --enable-debug | |
419 | touch $@ | |
420 | ||
421 | build-msw-dbg-stamp: configure-msw-dbg-stamp | |
422 | dh_testdir | |
423 | cd $(objdir_msw_dbg) && $(FAST_MAKE) | |
424 | touch $@ | |
425 | ||
426 | ||
427 | clean-py: | |
428 | cd wxPython \ | |
429 | && rm -rf licence \ | |
430 | && rm -rf build* \ | |
431 | && rm -rf docs/xml-raw \ | |
432 | && rm -rf wx/*.py | |
433 | ||
434 | # What to do about src/__version__.py ??? | |
435 | ||
436 | ||
437 | # We do the equivalent of this above by removing build, unfortunately | |
438 | # its not enough by itself to get the tree properly clean again. | |
439 | # && ./setup.py clean | |
440 | ||
441 | clean: debian/control clean-py | |
442 | dh_testdir | |
443 | dh_testroot | |
444 | ||
445 | rm -rf config_deb.cache config_deb_cross.cache *-stamp $(objdirs) | |
446 | rm -f docs/lgpl.txt | |
447 | rm -f $(objdir_i18n)/*.mo | |
448 | ||
449 | dh_clean | |
450 | rm -f debian/$(package_gtk_lib).* | |
451 | rm -f debian/$(package_gtk_dev).* | |
452 | rm -f debian/$(package_gtk_dbg).* | |
453 | rm -f debian/$(package_gtk_py).* | |
454 | rm -f debian/$(package_headers).* | |
455 | rm -f debian/$(package_i18n).* | |
456 | rm -f debian/$(package_doc).* | |
457 | rm -f debian/$(package_examples).* | |
458 | rm -f debian/$(package_gtk_dbg_py).* | |
459 | rm -f debian/$(package_msw_dev).* | |
460 | rm -f debian/$(package_msw_dbg).* | |
461 | rm -f debian/lintian-override | |
462 | ||
463 | install_arch: build_arch $(install_all_arch) | |
464 | ||
465 | install: build_all $(install_all_native) | |
466 | ||
467 | install-gtk-shared-stamp: build-gtk-shared-stamp build-gtk-shared-contrib-stamp | |
468 | dh_testdir | |
469 | mkdir -p $(objdir_gtk_install) | |
470 | cd $(objdir_gtk_shared) \ | |
471 | && $(MAKE) install prefix=`pwd`/../$(objdir_gtk_install) | |
472 | cd $(objdir_gtk_shared)/contrib/src \ | |
473 | && $(MAKE) install prefix=`pwd`/../../../$(objdir_gtk_install) | |
474 | touch $@ | |
475 | ||
476 | install-gtk-lib: DH_OPTIONS=-p$(package_gtk_lib) | |
477 | install-gtk-lib: install-gtk-shared-stamp | |
478 | dh_testdir | |
479 | dh_testroot | |
480 | dh_clean -k | |
481 | dh_installdirs | |
482 | dh_install $(objdir_gtk_install)/lib/libwx_*.so.* usr/lib | |
483 | dh_install $(objdir_gtk_install)/share/wx usr/share | |
484 | ||
485 | # FIXME: /share/wx may eventually need to go in a common runtime package. | |
486 | ||
487 | install-gtk-dev: DH_OPTIONS=-p$(package_gtk_dev) | |
488 | install-gtk-dev: build-gtk-static-stamp build-gtk-static-contrib-stamp install-gtk-shared-stamp | |
489 | dh_testdir | |
490 | dh_testroot | |
491 | dh_clean -k | |
492 | dh_installdirs | |
493 | dh_install $(objdir_gtk_install)/lib/libwx_*.so usr/lib | |
494 | dh_install $(objdir_gtk_install)/lib/wx/include usr/lib/wx | |
495 | dh_install $(objdir_gtk_install)/lib/wx/config/gtk* usr/lib/wx/config | |
496 | dh_install $(objdir_gtk_static)/lib/libwx*.a usr/lib | |
497 | dh_install $(objdir_gtk_static)/lib/wx/include usr/lib/wx | |
498 | dh_install $(objdir_gtk_static)/lib/wx/config/gtk* usr/lib/wx/config | |
499 | ||
500 | # FIXME: What to do about these for multi-version installs? Probably | |
501 | # put them in a bin package that conflicts. | |
502 | # | |
503 | #dh_install $(objdir_gtk_shared)/contrib/utils/wxrc/wxrc usr/bin | |
504 | #dh_install $(objdir_gtk_shared)/contrib/utils/wxrcedit/wxrcedit usr/bin | |
505 | ||
506 | #dh_installman debian/wxrc-tools.1 | |
507 | #dh_link usr/share/man/man1/wxrc-tools.1 usr/share/man/man1/wxrc.1 \ | |
508 | # usr/share/man/man1/wxrc-tools.1 usr/share/man/man1/wxrcedit.1 | |
509 | ||
510 | install-gtk-dbg: DH_OPTIONS=-p$(package_gtk_dbg) | |
511 | install-gtk-dbg: build-gtk-debug-stamp build-gtk-debug-contrib-stamp | |
512 | dh_testdir | |
513 | dh_testroot | |
514 | dh_clean -k | |
515 | dh_installdirs usr/share/lintian/overrides | |
516 | dh_install $(objdir_gtk_debug)/lib/libwx_* usr/lib | |
517 | dh_install $(objdir_gtk_debug)/lib/wx/include usr/lib/wx | |
518 | dh_install $(objdir_gtk_debug)/lib/wx/config/gtk* usr/lib/wx/config | |
519 | cp debian/lintian-override debian/$(package_gtk_dbg)/usr/share/lintian/overrides/$(package_gtk_dbg) | |
520 | ||
521 | ||
522 | install-gtk-py: DH_OPTIONS=-p$(package_gtk_py) | |
523 | install-gtk-py: build-gtk-py-stamp | |
524 | dh_testdir | |
525 | dh_testroot | |
526 | dh_clean -k | |
527 | dh_installdirs | |
528 | cd wxPython \ | |
529 | && $(python_ver) ./setup.py install \ | |
530 | --prefix=`pwd`/../debian/$(package_gtk_py)/usr \ | |
531 | WX_CONFIG='$(wxconfig)' \ | |
532 | WXPORT=gtk2 \ | |
533 | UNICODE=1 | |
534 | ||
535 | find debian/$(package_gtk_py)/usr/lib/$(python_ver)/site-packages \ | |
536 | -name '*.py?' -exec rm '{}' ';' | |
537 | ||
538 | dh_installman debian/wxPython-tools.1 | |
539 | dh_link usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2py.1 \ | |
540 | usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2xpm.1 \ | |
541 | usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2png.1 \ | |
542 | usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pycrust.1 \ | |
543 | usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyshell.1 \ | |
544 | usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/xrced.1 \ | |
545 | usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/helpviewer.1 \ | |
546 | usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyalacarte.1 \ | |
547 | usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyalamode.1 \ | |
548 | usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pywrap.1 | |
549 | ||
550 | # This is rather bogus, its included in the main copyright file now though. | |
551 | rm -f debian/$(package_gtk_py)/usr/lib/$(python_ver)/site-packages/wx/tools/XRCed/license.txt | |
552 | ||
553 | install-headers: DH_OPTIONS=-p$(package_headers) | |
554 | install-headers: install-gtk-shared-stamp | |
555 | dh_testdir | |
556 | dh_testroot | |
557 | dh_clean -k | |
558 | dh_installdirs | |
559 | ||
560 | # The only way to be really sure we get the univ headers correct is to install | |
561 | # them. Do that in a scratch dirs, and move the gtk ones last, so at least | |
562 | # they win in the result of any uncaught conflict. | |
563 | ||
564 | # cd $(objdir_gtk_univ) \ | |
565 | # && $(MAKE) install prefix=`pwd`/../$(objdir_univ_install)/usr | |
566 | ||
567 | # dh_movefiles --sourcedir=$(objdir_univ_install) | |
568 | dh_install $(objdir_gtk_install)/include usr | |
569 | ||
570 | # FIXME: put these in a common package that can conflict. | |
571 | #dh_install $(objdir_gtk_install)/share/aclocal usr/share | |
572 | #dh_installman debian/wx-config.1 | |
573 | ||
574 | install-i18n: DH_OPTIONS=-p$(package_i18n) | |
575 | install-i18n: build-i18n-stamp install-gtk-shared-stamp | |
576 | dh_testdir | |
577 | dh_testroot | |
578 | dh_clean -k | |
579 | dh_installdirs | |
580 | dh_install $(objdir_gtk_install)/share/locale usr/share | |
581 | ||
582 | install-doc: DH_OPTIONS=-p$(package_doc) | |
583 | install-doc: build-doc-stamp | |
584 | dh_testdir | |
585 | dh_testroot | |
586 | dh_clean -k | |
587 | dh_installdirs | |
588 | ||
589 | install-examples: DH_OPTIONS=-p$(package_examples) | |
590 | install-examples: build-examples-stamp | |
591 | dh_testdir | |
592 | dh_testroot | |
593 | dh_clean -k | |
594 | dh_installdirs | |
595 | ||
596 | install-gtk-dbg-py: DH_OPTIONS=-p$(package_gtk_dbg_py) | |
597 | install-gtk-dbg-py: build-gtk-dbg-py-stamp | |
598 | dh_testdir | |
599 | dh_testroot | |
600 | dh_clean -k | |
601 | dh_installdirs | |
602 | cd wxPython \ | |
603 | && $(python_ver) ./setup.py install \ | |
604 | --prefix=`pwd`/../debian/$(package_gtk_dbg_py)/usr \ | |
605 | WX_CONFIG='$(wxconfig-dbg)' \ | |
606 | WXPORT=gtk2 \ | |
607 | UNICODE=1 | |
608 | ||
609 | find debian/$(package_gtk_dbg_py)/usr/lib/$(python_ver)/site-packages \ | |
610 | -name '*.py?' -exec rm '{}' ';' | |
611 | ||
612 | dh_installman debian/wxPython-tools.1 | |
613 | dh_link usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2py.1 \ | |
614 | usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2xpm.1 \ | |
615 | usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2png.1 \ | |
616 | usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pycrust.1 \ | |
617 | usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyshell.1 \ | |
618 | usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/xrced.1 \ | |
619 | usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/helpviewer.1 \ | |
620 | usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyalacarte.1 \ | |
621 | usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyalamode.1 \ | |
622 | usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pywrap.1 | |
623 | ||
624 | # This is rather bogus, its included in the main copyright file now though. | |
625 | rm -f debian/$(package_gtk_dbg_py)/usr/lib/$(python_ver)/site-packages/wxPython/tools/XRCed/license.txt | |
626 | ||
627 | ||
628 | install-msw-dev: DH_OPTIONS=-p$(package_msw_dev) | |
629 | install-msw-dev: build-msw-shared-stamp build-msw-static-stamp | |
630 | dh_testdir | |
631 | dh_testroot | |
632 | dh_clean -k | |
633 | dh_installdirs | |
634 | dh_install $(objdir_msw_shared)/lib/*.dll* usr/$(cross_host)/lib | |
635 | dh_install $(objdir_msw_shared)/lib/wx/include usr/$(cross_host)/lib/wx | |
636 | dh_install $(objdir_msw_shared)/lib/wx/config/$(cross_host)* usr/$(cross_host)/lib/wx/config | |
637 | dh_install $(objdir_msw_static)/lib/*.a usr/$(cross_host)/lib | |
638 | dh_install $(objdir_msw_static)/lib/wx/include usr/$(cross_host)/lib/wx | |
639 | dh_install $(objdir_msw_static)/lib/wx/config/$(cross_host)* usr/$(cross_host)/lib/wx/config | |
640 | $(cross_host)-strip --strip-debug debian/$(package_msw_dev)/usr/$(cross_host)/lib/*.a | |
641 | ||
642 | @# As a special case for the cross packages, we link their config | |
643 | @# under /usr as well as under the normal cross prefix. This way | |
644 | @# --prefix=/usr/$(cross_host) and --prefix=/usr --host=$(cross_host) | |
645 | @# will have a congruent effect on wx-config. | |
646 | @( for f in `ls -1 debian/$(package_msw_dev)/usr/$(cross_host)/lib/wx/config`; do \ | |
647 | all_cfg="$${all_cfg} usr/$(cross_host)/lib/wx/config/$$f usr/lib/wx/config/$$f"; \ | |
648 | echo "linking cross config /usr/$(cross_host)/lib/wx/config/$$f"; \ | |
649 | done; \ | |
650 | dh_link $${all_cfg}; \ | |
651 | ) | |
652 | ||
653 | install-msw-dbg: DH_OPTIONS=-p$(package_msw_dbg) | |
654 | install-msw-dbg: build-msw-dbg-stamp | |
655 | dh_testdir | |
656 | dh_testroot | |
657 | dh_clean -k | |
658 | dh_installdirs | |
659 | dh_install $(objdir_msw_dbg)/lib/*.dll* usr/$(cross_host)/lib | |
660 | dh_install $(objdir_msw_dbg)/lib/wx/include usr/$(cross_host)/lib/wx | |
661 | dh_install $(objdir_msw_dbg)/lib/wx/config/$(cross_host)* usr/$(cross_host)/lib/wx/config | |
662 | # No static lib, they're freakin' huge! | |
663 | #$(cross_host)-strip --strip-debug debian/$(package_msw_dbg)/usr/$(cross_host)/lib/*.a | |
664 | ||
665 | @( for f in `ls -1 debian/$(package_msw_dbg)/usr/$(cross_host)/lib/wx/config`; do \ | |
666 | all_cfg="$${all_cfg} usr/$(cross_host)/lib/wx/config/$$f usr/lib/wx/config/$$f"; \ | |
667 | echo "linking cross config /usr/$(cross_host)/lib/wx/config/$$f"; \ | |
668 | done; \ | |
669 | dh_link $${all_cfg}; \ | |
670 | ) | |
671 | ||
672 | install-headers-msw: DH_OPTIONS=-p$(package_headers_msw) | |
673 | install-headers-msw: | |
674 | dh_testdir | |
675 | dh_testroot | |
676 | dh_clean -k | |
677 | ||
678 | # FIXME: This installs too much now. Do a dummy install first then | |
679 | # then determine the links from there instead of the main | |
680 | # tree. Or grab the list out of the main package install, | |
681 | # but that presupposed we already built it which we may not. | |
682 | ||
683 | @# Symlink all the headers that will be installed by the main -headers | |
684 | @# package to where the cross compiler will expect them. | |
685 | @( for f in `ls -1 include/wx`; do \ | |
686 | all_h="$${all_h} usr/include/wx-$(release)/wx/$$f usr/$(cross_host)/include/wx-$(release)/wx/$$f"; \ | |
687 | echo "linking header /usr/include/wx-$(release)/wx/$$f"; \ | |
688 | done; \ | |
689 | dh_link $${all_h}; \ | |
690 | ) | |
691 | ||
692 | @# But install this lot for real. | |
693 | rm -f debian/$(package_headers_msw)/usr/$(cross_host)/include/wx-$(release)/wx/msw | |
694 | dh_install include/wx/msw usr/$(cross_host)/include/wx-$(release)/wx | |
695 | ||
696 | ||
697 | binary-common: | |
698 | dh_testdir | |
699 | dh_testroot | |
700 | dh_installdocs | |
701 | dh_installchangelogs | |
702 | dh_installexamples | |
703 | dh_installmenu | |
704 | dh_link | |
705 | ||
706 | @# Don't strip debug libs at all, and strip cross libs elsewhere | |
707 | @# with the cross host tools until dh_strip gets smarter. | |
708 | dh_strip -N$(package_gtk_dbg) -N$(package_msw_dev) -N$(package_msw_dbg) | |
709 | ||
710 | dh_compress | |
711 | dh_fixperms | |
712 | ||
713 | @# Don't do this for the dbg-py special build because dh_makeshlibs | |
714 | @# will crap out if it is called with no packages to act on. | |
715 | @if [ "x$(DH_OPTIONS)" != "-p$(package_gtk_dbg_py)" ]; then \ | |
716 | echo "dh_makeshlibs -N$(package_gtk_py) -V"; \ | |
717 | dh_makeshlibs -N$(package_gtk_py) -V; \ | |
718 | fi | |
719 | ||
720 | dh_installdeb | |
721 | dh_shlibdeps -ldebian/$(package_gtk_lib)/usr/lib:debian/$(package_gtk_dbg)/usr/lib | |
722 | dh_gencontrol | |
723 | dh_md5sums | |
724 | dh_builddeb | |
725 | ||
726 | # Build architecture-independent files here. | |
727 | # Note that you currently can't build the indep packages without first | |
728 | # building the arch specific package files needed to create them. | |
729 | binary-indep: build_all install | |
730 | $(MAKE) -f debian/rules \ | |
731 | DH_OPTIONS="-i -N$(package_gtk_dbg_py) -N$(package_msw_dev) -N$(package_msw_dbg) -N$(package_headers_msw)" \ | |
732 | binary-common | |
733 | ||
734 | # Build just the architecture-dependent files here. | |
735 | binary-arch: build_arch install_arch | |
736 | $(MAKE) -f debian/rules \ | |
737 | DH_OPTIONS="-a -N$(package_gtk_dbg_py) -N$(package_msw_dev) -N$(package_msw_dbg) -N$(package_headers_msw)" \ | |
738 | binary-common | |
739 | ||
740 | # Build all packages target. | |
741 | binary: binary-arch binary-indep | |
742 | ||
743 | # This is a special target for building the wxMSW-cross packages. | |
744 | # It's not currently called during the official package build run | |
745 | # but may be run separately to build the extra packages. | |
746 | # There is an implied build dep on the mingw32 cross compiler | |
747 | # that is not in the control file. | |
748 | binary-cross: control-files-stamp $(install_all_cross) | |
749 | $(MAKE) -f debian/rules \ | |
750 | DH_OPTIONS="-p$(package_msw_dev) -p$(package_msw_dbg) -p$(package_headers_msw)" \ | |
751 | binary-common | |
752 | ||
753 | ||
754 | # Build wxPython against libwxgtk-dbg. This package will conflict | |
755 | # with the release build one, but may be useful to some people. | |
756 | binary-dbg-py: control-files-stamp install-gtk-dbg-py | |
757 | $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_dbg_py)" binary-common | |
758 | ||
759 | ||
760 | ############################################################################ | |
761 | # | |
762 | # Some rules to build a subset of the complete list of packages that can be | |
763 | # built from CVS. Beware that packages produced with these rules may *NOT* | |
764 | # be compatible with packages built using the 'binary' target or even with | |
765 | # Debian policy. Do not distribute packages built with these rules, they | |
766 | # are currently useful for rapid in-house testing by developers only. | |
767 | ||
768 | # libwxgtk shared lib package | |
769 | binary-gtk: control-files-stamp install-gtk-lib install-headers | |
770 | $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_lib) -p$(package_headers)" binary-common | |
771 | ||
772 | binary-gtk-dev: control-files-stamp install-gtk-dev install-headers | |
773 | $(MAKE) -f debian/rules \ | |
774 | DH_OPTIONS="-p$(package_gtk_lib) -p$(package_gtk_dev) -p$(package_headers)" \ | |
775 | binary-common | |
776 | ||
777 | binary-gtk-dbg: control-files-stamp install-gtk-dbg install-headers | |
778 | $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_dbg) -p$(package_headers)" binary-common | |
779 | ||
780 | ||
781 | # docs package | |
782 | binary-doc: control-files-stamp install-doc | |
783 | $(MAKE) -f debian/rules DH_OPTIONS=-p$(package_doc) binary-common | |
784 | ||
785 | binary-fast:control-files-stamp install-gtk-dbg install-msw-dev install-headers install-headers-msw | |
786 | $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_dbg) -p$(package_msw_dev) -p$(package_headers) -p$(package_headers_msw)" binary-common | |
787 | ||
788 | ||
789 | .PHONY: build build_all build_arch \ | |
790 | clean clean-py purge-release-py purge-dbg-py \ | |
791 | binary-indep binary-arch binary binary-common \ | |
792 | binary-gtk binary-gtk-dev binary-gtk-dbg binary-doc binary-cross \ | |
793 | install install_arch install-gtk-lib install-gtk-dev \ | |
794 | install-gtk-dbg \ | |
795 | install-gtk-py install-gtk-dbg-py \ | |
796 | install-headers install-i18n install-doc install-examples \ | |
797 | install-msw-dev install-msw-dbg install-headers-msw | |
798 |