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