2 # debian/rules file to build packages from wx CVS source
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.
9 # Significantly hacked up in July 2007 by Robin Dunn
15 ifdef CONCURRENCY_LEVEL
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
)
19 else ifdef DISTCC_HOSTS
20 # Otherwise, if they have a cluster, try to put it to good use.
21 JOB_COUNT
:= $(shell set
$${DISTCC_HOSTS} > /dev
/null
2>&1 ; echo
$$\
#)
25 FAST_MAKE
= $(MAKE
) -j
$(JOB_COUNT
)
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]')
36 PY_BUILD_DEPS
= python
$(PYVERS
), python
$(PYVERS
)-dbg
, python
$(PYVERS
)-dev
38 DEB_PYTHON_SYSTEM
=pycentral
39 PY_BUILD_DEPS
= python-all
, python-all-dbg
, python-all-dev
, python-central
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
48 #DEBIAN_WX_DEFAULT_VERSION = 2.8
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@')
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
)
69 ##release := $(shell dpkg-parsechangelog | sed -n 's/^Source: wxwidgets//p' | sed 's/-ansi//')
70 release
:= $(wx_major_version_number
).
$(wx_minor_version_number
)
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/')
79 sorelease
:= $(release
:%-$(DEBIAN_WXFLAVOUR
)=%)-$(soversion
)$(addprefix -,$(DEBIAN_WXFLAVOUR
))
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)
87 compatible_release
:= $(release
).
$(wx_release_number
)
89 compatible_release
:= $(release
)
92 # Base value for alternative priorities.
93 alt_prio
:= $(subst .
,,$(release
))
95 cross_host
:= i586-mingw32msvc
96 cross_build
:= $(shell .
/config.guess
)
98 config_cache
= ..
/config_deb.cache
99 config_cache_cross
= ..
/config_deb_cross.cache
103 COMMON_CONFIGURE_OPTIONS
= \
105 --cache-file
=$(config_cache
) \
106 --with-flavour
=$(DEBIAN_WXFLAVOUR
) \
108 --disable-reserved_virtual \
110 BASE_CONFIGURE_OPTIONS
= $(COMMON_CONFIGURE_OPTIONS
) \
113 GTK_CONFIGURE_OPTIONS
= $(COMMON_CONFIGURE_OPTIONS
) \
120 --enable-graphics_ctx \
127 PY_WX_CONFIG_OPTIONS
= --version
=$(release
) --toolkit
=$(pytoolkit
) --static
=no
132 ifeq ($(WX_UNICODE
),1)
133 COMMON_CONFIGURE_OPTIONS
+= --enable-unicode
134 PY_WX_CONFIG_OPTIONS
+= --unicode
135 PY_UNICODE
= UNICODE
=1
136 wxpydir
:= wx-
$(compatible_release
)-$(pytoolkit
)-unicode
138 # for compatibility with the existing 2.6 packages, we don't use "u" in
139 # the Unicode (default) package names
142 # but we do need to use something for non-Unicode packages to distinguish
144 unicode_suffix
:= -ansi
145 PY_UNICODE
= UNICODE
=0
146 wxpydir
:= wx-
$(compatible_release
)-$(pytoolkit
)
149 ifeq ($(WX_OPENGL
),1)
150 GTK_CONFIGURE_OPTIONS
+= --with-opengl
152 GTK_CONFIGURE_OPTIONS
+= --without-opengl
155 #---------------------------------------------------------------------------
158 package_wxbase_lib
:= libwxbase
$(sorelease
)$(unicode_suffix
)
159 package_wxbase_dev
:= libwxbase
$(release
)$(unicode_suffix
)-dev
160 package_wxbase_dbg
:= libwxbase
$(release
)$(unicode_suffix
)-dbg
162 package_gtk_lib
:= libwxgtk
$(sorelease
)$(unicode_suffix
)
163 package_gtk_dev
:= libwxgtk
$(release
)$(unicode_suffix
)-dev
164 package_gtk_dbg
:= libwxgtk
$(release
)$(unicode_suffix
)-dbg
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
172 package_gtk_py_lib
:= python-wxgtk
$(release
)$(unicode_suffix
)
173 package_gtk_py_ver
= python-wxversion
174 package_gtk_py_tools
= python-wxtools
175 package_gtk_py_addons
= python-wxaddons
176 package_gtk_dbg_py
:= python-wxgtk
$(release
)$(unicode_suffix
)-dbg
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.
181 common_packages
:= $(package_common
) $(package_gtk_py_ver
) $(package_gtk_py_tools
) $(package_gtk_py_addons
)
184 package_msw_dev
:= libwxmsw
$(release
)$(unicode_suffix
)-dev
185 package_msw_dbg
:= libwxmsw
$(release
)$(unicode_suffix
)-dbg
186 package_headers_msw
:= wx
$(release
)-headers-msw
188 # The packages listed here will not be built by default.
189 extra_packages
:= $(package_msw_dev
) $(package_msw_dbg
) $(package_headers_msw
)
191 ifdef DEBIAN_WX_DEFAULT_VERSION
192 extra_packages
+= $(common_packages
)
196 #---------------------------------------------------------------------------
199 objdir_wxbase_shared
= objs_wxbase_sh
200 objdir_wxbase_debug
= objs_wxbase_d
201 objdir_gtk_shared
= objs_gtk_sh
202 objdir_gtk_debug
= objs_gtk_d
203 objdir_gtk_install
= objs_gtk_install
204 objdir_doc_cruft
= objs_doc_con
205 objdir_doc
= docs
/wx-manual.html
206 objdir_examples
= docs
/examples
209 objdir_msw_shared
= objs_msw_sh
210 objdir_msw_static
= objs_msw_st
211 objdir_msw_dbg
= objs_msw_d
212 objdir_msw_install
= objs_msw_install
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
)
220 #---------------------------------------------------------------------------
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
225 # it's pulled out of the wxGTK shared lib package.
227 # similarly some of the wxpython packages are arch indep too, but
228 # all files for it are installed during the arch any phase.
231 build_arch_stamps
= build-wxbase-shared-stamp build-wxbase-debug-stamp \
232 build-gtk-shared-stamp build-gtk-shared-contrib-stamp \
233 build-gtk-debug-stamp build-gtk-debug-contrib-stamp \
234 build-i18n-stamp build-gtk-py-stamp build-gtk-dbg-py-stamp
236 build_indep_stamps
= build-examples-stamp build-doc-stamp
238 build_cross_stamps
= build-msw-shared-stamp build-msw-static-stamp build-msw-dbg-stamp
240 build_stamps_native
:= $(build_arch_stamps
) $(build_indep_stamps
)
242 build_stamps
:= $(build_stamps_native
) $(build_cross_stamps
)
245 #---------------------------------------------------------------------------
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
251 ifndef DEBIAN_WX_DEFAULT_VERSION
252 install_all_arch
+= install-common
255 install_all_indep
= install-examples install-doc
257 install_all_cross
= install-msw-dev install-msw-dbg install-headers-msw
259 install_all_native
:= $(install_all_arch
) $(install_all_indep
)
261 install_all
:= $(install_all_native
) $(install_all_cross
)
265 #---------------------------------------------------------------------------
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 '\
273 < debian
/control.in
> debian
/control
275 control-files-stamp
: debian
/control
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; \
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; \
291 @for f in postinst prerm
; do \
292 echo
"generating control file $(package_gtk_dev).$$f"; \
293 sed
-e
's/=V/$(release)/g; '\
294 ' s/=PRIO/$(alt_prio)/g' \
295 < debian
/libwxgtk-dev.
$$f \
296 > debian
/$(package_gtk_dev
).
$$f; \
298 @for f in postinst prerm
; do \
299 echo
"generating control file $(package_gtk_dbg).$$f"; \
300 sed
-e
's/=V/$(release)/g; '\
301 ' s/=PRIO/$(alt_prio)/g' \
302 < debian
/libwxgtk-dbg.
$$f \
303 > debian
/$(package_gtk_dbg
).
$$f; \
305 @for f in docs postinst prerm
; do \
306 echo
"generating control file $(package_gtk_py_lib).$$f"; \
307 sed
-e
's/=PYVERS/$(PYVERS)/g; '\
308 ' s|=WXPYDIR|$(wxpydir)|g; '\
309 ' s/=V/$(release)/g; '\
310 ' s/=PRIO/$(alt_prio)/g' \
311 < debian
/python-wxgtk.
$$f \
312 > debian
/$(package_gtk_py_lib
).
$$f; \
314 @echo
"generating control file $(package_gtk_dbg_py).docs";
315 @cp debian
/python-wxgtk.docs debian
/$(package_gtk_dbg_py
).docs
;
316 @for f in docs doc-base
; do \
317 echo
"generating control file $(package_doc).$$f"; \
318 sed
-e
's/=V/$(release)/g' < debian
/wx-doc.
$$f \
319 > debian
/$(package_doc
).
$$f; \
321 @for f in examples
; do \
322 echo
"generating control file $(package_examples).$$f"; \
323 cp debian
/wx-examples.
$$f debian
/$(package_examples
).
$$f; \
325 @for f in postinst prerm
; do \
326 echo
"generating control file $(package_msw_dev).$$f"; \
327 sed
-e
's/=V/$(release)/g; '\
328 ' s/=H/$(cross_host)/g; '\
329 ' s/=PRIO/$(alt_prio)/g' \
330 < debian
/libwxmsw-dev.
$$f \
331 > debian
/$(package_msw_dev
).
$$f; \
333 @for f in postinst prerm
; do \
334 echo
"generating control file $(package_msw_dbg).$$f"; \
335 sed
-e
's/=V/$(release)/g; '\
336 ' s/=H/$(cross_host)/g; '\
337 ' s/=PRIO/$(alt_prio)/g' \
338 < debian
/libwxmsw-dbg.
$$f \
339 > debian
/$(package_msw_dbg
).
$$f; \
341 # @echo "generating control file $(package_common).menu"; \
342 # sed -e 's/=V/$(release)/g' < debian/wx-common.menu \
343 # > debian/$(package_common).menu;
344 @echo
"generating control file lintian-override"; \
345 sed
-e
's/=V/$(release)/g; '\
346 ' s/=SOV/$(sorelease)/g' \
347 < debian
/lintian-override.in \
348 > debian
/lintian-override
; \
351 #---------------------------------------------------------------------------
354 build_arch
: control-files-stamp
$(build_arch_stamps
)
355 build_all
: control-files-stamp
$(build_stamps_native
)
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.
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
370 # files out when that is done.
372 # TODO: Is this still necessary? Can we just take the wxbase files
373 # from the wxgui build now without special treatment?
375 configure-wxbase-shared-stamp
:
377 mkdir
-p
$(objdir_wxbase_shared
)
378 cd
$(objdir_wxbase_shared
) \
379 && ..
/configure
$(BASE_CONFIGURE_OPTIONS
)
382 build-wxbase-shared-stamp
: configure-wxbase-shared-stamp
384 # Nothing to build here, move along...
385 #cd $(objdir_wxbase_shared) && $(FAST_MAKE)
388 configure-wxbase-debug-stamp
:
390 mkdir
-p
$(objdir_wxbase_debug
)
391 cd
$(objdir_wxbase_debug
) \
392 && ..
/configure
$(BASE_CONFIGURE_OPTIONS
) --enable-debug
395 build-wxbase-debug-stamp
: configure-wxbase-debug-stamp
397 # Nothing to build here, move along...
398 #cd $(objdir_wxbase_debug) && $(FAST_MAKE)
401 configure-gtk-shared-stamp
:
403 mkdir
-p
$(objdir_gtk_shared
)
404 cd
$(objdir_gtk_shared
) \
405 && ..
/configure
$(GTK_CONFIGURE_OPTIONS
)
408 build-gtk-shared-stamp
: configure-gtk-shared-stamp
410 cd
$(objdir_gtk_shared
) && $(FAST_MAKE
)
414 configure-gtk-debug-stamp
:
416 mkdir
-p
$(objdir_gtk_debug
)
417 cd
$(objdir_gtk_debug
) \
418 && ..
/configure
$(GTK_CONFIGURE_OPTIONS
) --enable-debug
421 build-gtk-debug-stamp
: configure-gtk-debug-stamp
423 cd
$(objdir_gtk_debug
) && $(FAST_MAKE
)
427 build-gtk-shared-contrib-stamp
: build-gtk-shared-stamp
429 cd
$(objdir_gtk_shared
)/contrib
/src
&& $(FAST_MAKE
)
430 cd
$(objdir_gtk_shared
)/utils
/wxrc
&& $(FAST_MAKE
)
434 build-gtk-debug-contrib-stamp
: build-gtk-debug-stamp
436 cd
$(objdir_gtk_debug
)/contrib
/src
&& $(FAST_MAKE
)
441 @if
[ ! -e build-gtk-py-stamp
]; then \
442 $(MAKE
) -f debian
/rules clean-py
; \
444 $(RM
) build-gtk-dbg-py-stamp
446 build-gtk-py-stamp
: build-gtk-shared-stamp purge-dbg-py
450 && $(python_ver
) .
/setup.py build \
451 WX_CONFIG
='$(wxconfig)' \
452 WXPORT
=$(pytoolkit
) \
454 FLAVOUR
=$(DEBIAN_WXFLAVOUR
)
457 build-doc-stamp
: build-gtk-shared-stamp
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
); \
463 rm -rf
$(objdir_doc
); \
464 rm -rf
$(objdir_doc_cruft
); \
465 mkdir
$(objdir_doc
); \
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 \
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
}; \
478 echo Copying docs...
; \
479 mkdir
-p
$(objdir_doc
); \
480 cp docs
/html
/wx
/* $(objdir_doc
); \
481 mv
$(objdir_doc
)/index.html
$(objdir_doc
)/wx-
$(release
)-manual_contents.html
; \
485 build-examples-stamp
: build-gtk-shared-stamp
487 mkdir
-p
$(objdir_examples
)
489 # copy all samples and the Makefile generated for libwxgtk.
490 cp
-a samples
$(objdir_examples
)
491 rm -f
$(objdir_examples
)/samples
/Makefile
492 cp
-a
$(objdir_gtk_shared
)/samples
/Makefile
$(objdir_examples
)/samples
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
; \
502 cp
-a wxPython
/demo
$(objdir_examples
)/wxPython
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
511 build-i18n-stamp
: build-gtk-shared-stamp
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.
523 @if
[ ! -e build-gtk-dbg-py-stamp
]; then \
524 $(MAKE
) -f debian
/rules clean-py
; \
526 $(RM
) build-gtk-py-stamp
528 build-gtk-dbg-py-stamp
: build-gtk-debug-stamp purge-release-py
532 && $(python_ver
) .
/setup.py build \
533 WX_CONFIG
='$(wxconfig-dbg)' \
534 WXPORT
=$(pytoolkit
) \
536 FLAVOUR
=$(addsuffix -,$(DEBIAN_WXFLAVOUR
))dbg
540 configure-msw-shared-stamp
:
542 mkdir
-p
$(objdir_msw_shared
)
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
)
551 build-msw-shared-stamp
: configure-msw-shared-stamp
553 cd
$(objdir_msw_shared
) && $(FAST_MAKE
)
556 configure-msw-static-stamp
:
558 mkdir
-p
$(objdir_msw_static
)
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
) \
568 build-msw-static-stamp
: configure-msw-static-stamp
570 cd
$(objdir_msw_static
) && $(FAST_MAKE
)
573 configure-msw-dbg-stamp
:
575 mkdir
-p
$(objdir_msw_dbg
)
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
) \
585 build-msw-dbg-stamp
: configure-msw-dbg-stamp
587 cd
$(objdir_msw_dbg
) && $(FAST_MAKE
)
590 #---------------------------------------------------------------------------
594 cd wxPython
&& rm -rf licence build
* docs
/xml-raw wx
/*.py src
/__version__.py
597 clean: debian
/control clean-py
601 rm -rf config_deb.cache config_deb_cross.cache
*-stamp
$(objdirs
)
603 rm -f
$(objdir_i18n
)/*.mo
606 rm -f debian
/$(package_wxbase_lib
).
*
607 rm -f debian
/$(package_wxbase_dev
).
*
608 rm -f debian
/$(package_wxbase_dbg
).
*
609 rm -f debian
/$(package_gtk_lib
).
*
610 rm -f debian
/$(package_gtk_dev
).
*
611 rm -f debian
/$(package_gtk_dbg
).
*
612 rm -f debian
/$(package_gtk_py_lib
).
*
613 rm -f debian
/$(package_headers
).
*
614 rm -f debian
/$(package_i18n
).
*
615 rm -f debian
/$(package_doc
).
*
616 rm -f debian
/$(package_examples
).
*
617 rm -f debian
/$(package_gtk_dbg_py
).
*
618 rm -f debian
/$(package_msw_dev
).
*
619 rm -f debian
/$(package_msw_dbg
).
*
620 rm -f debian
/lintian-override
621 rm -f debian
/unpack_examples.sh
622 find
-name
'*.py[co]' | xargs
-r
rm -f
623 rm -rf
include/wx-
$(release
)
626 #---------------------------------------------------------------------------
629 install_arch
: build_arch
$(install_all_arch
)
631 install: build_all
$(install_all_native
)
634 install-wxbase-lib
: DH_OPTIONS
=-p
$(package_wxbase_lib
)
635 install-wxbase-lib
: build-wxbase-shared-stamp install-gtk-shared-stamp
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
)
644 install-wxbase-dev
: DH_OPTIONS
=-p
$(package_wxbase_dev
)
645 install-wxbase-dev
: build-wxbase-shared-stamp install-gtk-shared-stamp
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
654 install-wxbase-dbg
: DH_OPTIONS
=-p
$(package_wxbase_dbg
)
655 install-wxbase-dbg
: build-wxbase-debug-stamp
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
)
666 install-gtk-shared-stamp
: build-gtk-shared-stamp build-gtk-shared-contrib-stamp
668 mkdir
-p
$(objdir_gtk_install
)
669 cd
$(objdir_gtk_shared
) \
670 && $(MAKE
) install prefix=`pwd`/..
/$(objdir_gtk_install
)
671 cd
$(objdir_gtk_shared
)/contrib
/src \
672 && $(MAKE
) install prefix=`pwd`/..
/..
/..
/$(objdir_gtk_install
)
675 install-gtk-lib
: DH_OPTIONS
=-p
$(package_gtk_lib
)
676 install-gtk-lib
: install-gtk-shared-stamp
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
)
684 install-gtk-dev
: DH_OPTIONS
=-p
$(package_gtk_dev
)
685 install-gtk-dev
: install-gtk-shared-stamp
689 dh_install
$(objdir_gtk_install
)/lib
/libwx_gtk
*.so usr
/lib
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
693 install-gtk-dbg
: DH_OPTIONS
=-p
$(package_gtk_dbg
)
694 install-gtk-dbg
: build-gtk-debug-stamp build-gtk-debug-contrib-stamp
698 dh_install
$(objdir_gtk_debug
)/lib
/libwx_gtk
* usr
/lib
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
701 dh_installdirs usr
/share
/lintian
/overrides
702 cp debian
/lintian-override debian
/$(package_gtk_dbg
)/usr
/share
/lintian
/overrides
/$(package_gtk_dbg
)
705 install-gtk-py-lib
: DH_OPTIONS
=-p
$(package_gtk_py_lib
)
706 install-gtk-py-lib
: build-gtk-py-stamp
710 dh_installdirs usr
/lib
/wx
/python
712 && $(python_ver
) .
/setup.py
install \
713 --prefix=`pwd`/..
/debian
/$(package_gtk_py_lib
)/usr \
714 WX_CONFIG
='$(wxconfig)' \
715 SYS_WX_CONFIG
='$(py_wxconfig)' \
716 WXPORT
=$(pytoolkit
) \
718 FLAVOUR
=$(DEBIAN_WXFLAVOUR
)
720 mv debian
/$(package_gtk_py_lib
)/$(pydir
)/wx.pth \
721 debian
/$(package_gtk_py_lib
)/usr
/lib
/wx
/python
/wx
$(release
).pth
723 find debian
/$(package_gtk_py_lib
)/$(pydir
) -name
'*.py?' -exec
rm '{}' ';'
725 # This is rather bogus, its included in the main copyright file now though.
726 rm -f debian
/$(package_gtk_py_lib
)/$(wxpydir
)/wx
/tools
/XRCed
/license.txt
728 install-gtk-py-ver
: DH_OPTIONS
=-p
$(package_gtk_py_ver
)
729 install-gtk-py-ver
: install-gtk-py-lib
734 ifndef DEBIAN_WX_DEFAULT_VERSION
736 dh_movefiles
--sourcedir
=debian
/$(package_gtk_py_lib
) $(pydir
)/wxversion.py
738 rm debian
/$(package_gtk_py_lib
)/$(pydir
)/wxversion.py
743 install-gtk-py-tools
: DH_OPTIONS
=-p
$(package_gtk_py_tools
)
744 install-gtk-py-tools
: install-gtk-py-ver
749 ifndef DEBIAN_WX_DEFAULT_VERSION
751 dh_movefiles
--sourcedir
=debian
/$(package_gtk_py_lib
) usr
/bin
753 dh_installman debian
/wxPython-tools
.1
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 \
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
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
)
769 mkdir
-p debian
/$(package_gtk_py_tools
)/usr
/share
/pixmaps
770 mkdir
-p debian
/$(package_gtk_py_tools
)/usr
/share
/applications
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
779 rm -r debian
/$(package_gtk_py_lib
)/usr
/bin
781 install-gtk-py-addons
: DH_OPTIONS
=-p
$(package_gtk_py_addons
)
782 install-gtk-py-addons
: install-gtk-py-tools
786 ifndef DEBIAN_WX_DEFAULT_VERSION
788 dh_movefiles
--sourcedir
=debian
/$(package_gtk_py_lib
) $(pydir
)/wxaddons
790 rm -r debian
/$(package_gtk_py_lib
)/$(pydir
)/wxaddons
794 install-gtk-py
: install-gtk-py-addons
797 install-common
: DH_OPTIONS
=-p
$(package_common
)
798 install-common
: install-gtk-shared-stamp
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
806 dh_install
$(objdir_gtk_install
)/share
/aclocal usr
/share
807 dh_installman debian
/wx-config
.1
809 dh_install
$(objdir_gtk_shared
)/utils
/wxrc
/wxrc usr
/bin
810 dh_installman debian
/wxrc-tools
.1
811 dh_link usr
/share
/man
/man1
/wxrc-tools
.1 usr
/share
/man
/man1
/wxrc
.1
814 install-headers
: DH_OPTIONS
=-p
$(package_headers
)
815 install-headers
: install-gtk-shared-stamp
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.
824 # cd $(objdir_gtk_univ) \
825 # && $(MAKE) install prefix=`pwd`/../$(objdir_univ_install)/usr
827 # dh_movefiles --sourcedir=$(objdir_univ_install)
828 dh_install
$(objdir_gtk_install
)/include usr
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
832 mkdir
-p debian
/$(package_headers
)/usr
/include/wx-
$(release
)/wx
/wxPython
/i_files
833 cp
-p wxPython
/include/wx
/wxPython
/*.h \
834 debian
/$(package_headers
)/usr
/include/wx-
$(release
)/wx
/wxPython
/
835 cp
-p wxPython
/include/wx
/wxPython
/src
/*.i wxPython
/include/wx
/wxPython
/src
/_
*.py \
836 wxPython
/include/wx
/wxPython
/src
/*.swg \
837 debian
/$(package_headers
)/usr
/include/wx-
$(release
)/wx
/wxPython
/i_files
839 install-i18n
: DH_OPTIONS
=-p
$(package_i18n
)
840 install-i18n
: build-i18n-stamp install-gtk-shared-stamp
844 dh_install
$(objdir_gtk_install
)/share
/locale usr
/share
847 install-doc
: DH_OPTIONS
=-p
$(package_doc
)
848 install-doc
: build-doc-stamp
852 dh_install
$(objdir_doc
) usr
/share
/doc
/$(package_doc
)
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
860 install-examples
: DH_OPTIONS
=-p
$(package_examples
)
861 install-examples
: build-examples-stamp
866 install-gtk-dbg-py
: DH_OPTIONS
=-p
$(package_gtk_dbg_py
)
867 install-gtk-dbg-py
: build-gtk-dbg-py-stamp
871 dh_installdirs usr
/lib
/wx
/python
873 && $(python_ver
) .
/setup.py
install \
874 --prefix=`pwd`/..
/debian
/$(package_gtk_dbg_py
)/usr \
875 WX_CONFIG
='$(wxconfig-dbg)' \
876 SYS_WX_CONFIG
='$(pyd_wxconfig)' \
877 WXPORT
=$(pytoolkit
) \
879 FLAVOUR
=$(addsuffix -,$(DEBIAN_WXFLAVOUR
))dbg
881 mv debian
/$(package_gtk_py_lib
)/$(pydir
)/wx.pth \
882 debian
/$(package_gtk_py_lib
)/usr
/lib
/wx
/python
/wx
$(release
)-dbg.pth
884 find debian
/$(package_gtk_dbg_py
)/$(pydir
) -name
'*.py?' -exec
rm '{}' ';'
885 rm -rf usr
/bin
$(pydir
)/{wxversion.py
,wx.pth
}
887 # This is rather bogus, its included in the main copyright file now though.
888 rm -f debian
/$(package_gtk_dbg_py
)/$(wxpydir
)/wx
/tools
/XRCed
/license.txt
891 install-msw-dev
: DH_OPTIONS
=-p
$(package_msw_dev
)
892 install-msw-dev
: build-msw-shared-stamp build-msw-static-stamp
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
898 dh_install
$(objdir_msw_shared
)/lib
/wx
/config
/$(cross_host
)* usr
/$(cross_host
)/lib
/wx
/config
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
901 dh_install
$(objdir_msw_static
)/lib
/wx
/config
/$(cross_host
)* usr
/$(cross_host
)/lib
/wx
/config
902 $(cross_host
)-strip --strip-debug debian
/$(package_msw_dev
)/usr
/$(cross_host
)/lib
/*.a
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"; \
912 dh_link
$${all_cfg}; \
915 install-msw-dbg
: DH_OPTIONS
=-p
$(package_msw_dbg
)
916 install-msw-dbg
: build-msw-dbg-stamp
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
922 dh_install
$(objdir_msw_dbg
)/lib
/wx
/config
/$(cross_host
)* usr
/$(cross_host
)/lib
/wx
/config
923 # No static lib, they're freakin' huge!
924 #$(cross_host)-strip --strip-debug debian/$(package_msw_dbg)/usr/$(cross_host)/lib/*.a
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"; \
930 dh_link
$${all_cfg}; \
933 install-headers-msw
: DH_OPTIONS
=-p
$(package_headers_msw
)
939 cd
$(objdir_msw_shared
) \
940 && $(MAKE
) install prefix=`pwd`/..
/$(objdir_msw_install
)
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 \
945 all_h
="$${all_h} usr/include/wx-$(release)/wx/$$f usr/$(cross_host)/include/wx-$(release)/wx/$$f"; \
946 echo
"linking header /usr/include/wx-$(release)/wx/$$f"; \
951 # But install this lot for real.
952 rm -f debian
/$(package_headers_msw
)/usr
/$(cross_host
)/include/wx-
$(release
)/wx
/msw
953 dh_install
$(objdir_msw_install
)/include/wx-
$(release
)/wx
/msw usr
/$(cross_host
)/include/wx-
$(release
)/wx
956 #---------------------------------------------------------------------------
957 # Tying it all together
960 binary-indep
: build_all
install
964 dh_installchangelogs
-i
965 dh_installexamples
-i
981 binary-arch
: build_arch install_arch
985 dh_installchangelogs
-a
986 dh_installexamples
-a
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
)
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
)
1008 dh_makeshlibs
-N
$(package_gtk_py_lib
) -N
$(package_gtk_dbg_py
) -V
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
1016 # Build all packages target.
1017 binary
: binary-indep binary-arch
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 \
1028 DH_OPTIONS
="-p$(package_msw_dev) -p$(package_msw_dbg) -p$(package_headers_msw)" \
1032 ############################################################################
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.
1040 DH_OPTIONS_GTK
:= -p
$(package_wxbase_lib
) -p
$(package_gtk_lib
) -p
$(package_headers
)
1042 # libwxgtk shared lib package
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
1046 binary-gtk-dev
: control-files-stamp install-gtk-dev install-wxbase-dev install-headers
1047 $(MAKE
) -f debian
/rules \
1048 DH_OPTIONS
="-p$(package_wxbase_dev) -p$(package_gtk_dev) $(DH_OPTIONS_GTK)" \
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)" \
1058 binary-doc
: control-files-stamp install-doc
1059 $(MAKE
) -f debian
/rules DH_OPTIONS
=-p
$(package_doc
) binary-common
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
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 \
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 \
1071 install install_arch install-gtk-lib install-gtk-dev \
1073 install-gtk-py install-gtk-py-tools install-gtk-py-ver \
1074 install-gtk-py-lib install-gtk-dbg-py \
1075 install-common install-headers install-i18n install-doc \
1076 install-examples install-msw-dev install-msw-dbg install-headers-msw