]> git.saurik.com Git - wxWidgets.git/blame - debian/rules
do use context menu event under wxGTK, it is supported there now
[wxWidgets.git] / debian / rules
CommitLineData
e4c4c1c6 1#!/usr/bin/make -f
e1293dcf 2# debian/rules file to build packages from wx CVS source
e4c4c1c6
RL
3#
4# Sculpted 13/2/2000 by Ron Lee <ron@debian.org> from new and
5# variously stolen code :-)
f6bcfd97
BP
6# It makes copious use of the debhelper utilities written by
7# Joey Hess and others.
e4c4c1c6
RL
8
9#export DH_VERBOSE=1
f6bcfd97 10export DH_OPTIONS
e4c4c1c6 11
e1293dcf
RL
12release := $(shell dpkg-parsechangelog | sed -n 's/^Source: wxwidgets//p')
13python_ver := python$(shell python -c "import sys;print sys.version[:3]")
e4c4c1c6 14
e1293dcf
RL
15cross_host = i586-mingw32msvc
16cross_build = $(shell ./config.guess)
3a922bb4 17
e1293dcf
RL
18config_cache = ../config_deb.cache
19config_cache_cross = ../config_deb_cross.cache
a0b03701 20
e0a4aa8a 21# Packages to build:
e1293dcf
RL
22package_gtk_lib = libwxgtk$(release)
23package_gtk_dev = libwxgtk$(release)-dev
24package_gtk_dbg = libwxgtk$(release)-dbg
25package_gtk_py = libwxgtk$(release)-python
26package_gtk_contrib = libwxgtk$(release)-contrib
27package_gtk_contrib_dev = libwxgtk$(release)-contrib-dev
28package_headers = wx$(release)-headers
29package_i18n = wx$(release)-i18n
30package_doc = wx$(release)-doc
31package_examples = wx$(release)-examples
32
33package_msw_dev = libwxmsw$(release)-dev
34package_msw_dbg = libwxmsw$(release)-dbg
35package_headers_msw = wx$(release)-headers-msw
3a922bb4 36
e0a4aa8a 37# Build directories:
e1293dcf
RL
38objdir_gtk_shared = objs_gtk_sh
39objdir_gtk_static = objs_gtk_st
40objdir_gtk_debug = objs_gtk_d
41objdir_gtk_install = objs_gtk_install
42objdir_gtk_contrib_install = objs_gtk_contrib_install
43objdir_doc_cruft = objs_doc_con
44objdir_doc = docs/wx-manual.html
45objdir_examples = docs/examples
46objdir_i18n = locale
47
48objdir_msw_shared = objs_msw_sh
49objdir_msw_static = objs_msw_st
50objdir_msw_dbg = objs_msw_d
51
52objdirs = $(objdir_gtk_shared) $(objdir_gtk_static) $(objdir_gtk_debug) \
53 $(objdir_gtk_install) $(objdir_gtk_contrib_install) \
54 $(objdir_doc_cruft) $(objdir_doc) $(objdir_examples) \
55 $(objdir_msw_shared) $(objdir_msw_static) $(objdir_msw_dbg)
e4c4c1c6 56
afa3e1ed
RL
57# note that the i18n package is actually arch indep (once built)
58# but must be built (and installed) during the arch any phase as
e1293dcf
RL
59# it's pulled out of the wxGTK shared lib package.
60
afa3e1ed 61
050207ec 62# Build stamps:
e1293dcf
RL
63build_arch_stamps = build-gtk-shared-stamp build-gtk-static-stamp \
64 build-gtk-debug-stamp \
65 build-contrib-shared-stamp build-contrib-static-stamp \
66 build-i18n-stamp build-gtk-py-stamp
e4c4c1c6 67
0ecfbbea 68
e1293dcf 69build_indep_stamps = build-examples-stamp build-doc-stamp
f6bcfd97 70
e1293dcf 71build_cross_stamps = build-msw-shared-stamp build-msw-static-stamp build-msw-dbg-stamp
3a922bb4 72
e1293dcf 73build_stamps_native = $(build_arch_stamps) $(build_indep_stamps)
3a922bb4 74
e1293dcf 75build_stamps = $(build_stamps_native) $(build_cross_stamps)
050207ec 76
050207ec 77
e1293dcf
RL
78# Install targets:
79install_all_arch = install-gtk-lib install-gtk-dev install-gtk-dbg \
80 install-gtk-contrib install-gtk-contrib-dev \
81 install-headers install-i18n install-gtk-py
0ecfbbea 82
e1293dcf 83install_all_indep = install-examples install-doc
050207ec 84
e1293dcf 85install_all_cross = install-msw-dev install-msw-dbg install-headers-msw
3a922bb4 86
e1293dcf 87install_all_native = $(install_all_arch) $(install_all_indep)
3a922bb4 88
e1293dcf 89install_all = $(install_all_native) $(install_all_cross)
e4c4c1c6
RL
90
91
e1293dcf
RL
92wxconfig := $(shell pwd)/$(objdir_gtk_shared)/wx-config \
93 --prefix=$(shell pwd) \
afa3e1ed
RL
94 --exec-prefix=$(shell pwd)/$(objdir_gtk_shared)
95
b63b07a8
RL
96contrib_libs := $(subst CVS,,$(notdir $(wildcard contrib/include/wx/*)))
97
afa3e1ed 98
e0a4aa8a
RL
99# The Rules:
100
e4c4c1c6 101debian/control: debian/control.in
e1293dcf 102 sed -e 's/=V/$(release)/g;s/=PY/$(python_ver)/g' < debian/control.in > debian/control
e4c4c1c6 103
3a922bb4 104control-files-stamp: debian/control
f6bcfd97 105 dh_testdir
e1293dcf
RL
106 @for f in links postinst prerm; do \
107 echo "generating control file $(package_gtk_dev).$$f"; \
108 sed -e 's/=V/$(release)/g' < debian/libwxgtk-dev.$$f \
109 > debian/$(package_gtk_dev).$$f; \
f6bcfd97 110 done;
e1293dcf
RL
111 @for f in links postinst prerm; do \
112 echo "generating control file $(package_gtk_dbg).$$f"; \
113 sed -e 's/=V/$(release)/g' < debian/libwxgtk-dbg.$$f \
114 > debian/$(package_gtk_dbg).$$f; \
f6bcfd97 115 done;
e1293dcf
RL
116 @for f in dirs docs menu postinst prerm; do \
117 echo "generating control file $(package_gtk_py).$$f"; \
118 sed -e 's/=PY/$(python_ver)/g;s/=V/$(release)/g' \
119 < debian/libwxgtk-python.$$f \
120 > debian/$(package_gtk_py).$$f; \
f6bcfd97 121 done;
e1293dcf
RL
122 @for f in docs doc-base; do \
123 echo "generating control file $(package_doc).$$f"; \
b63b07a8 124 sed -e 's/=V/$(release)/g' < debian/wx-doc.$$f \
e1293dcf 125 > debian/$(package_doc).$$f; \
f6bcfd97 126 done;
e1293dcf
RL
127 @for f in examples; do \
128 echo "generating control file $(package_examples).$$f"; \
b63b07a8 129 cp debian/wx-examples.$$f debian/$(package_examples).$$f; \
f6bcfd97 130 done;
e1293dcf
RL
131 @for f in dirs links postinst prerm; do \
132 echo "generating control file $(package_msw_dev).$$f"; \
3a922bb4 133 sed -e 's/=V/$(release)/g;s/=H/$(cross_host)/g' < debian/libwxmsw-dev.$$f \
e1293dcf 134 > debian/$(package_msw_dev).$$f; \
3a922bb4 135 done;
e1293dcf
RL
136 @for f in dirs links postinst prerm; do \
137 echo "generating control file $(package_msw_dbg).$$f"; \
4fb788e4 138 sed -e 's/=V/$(release)/g;s/=H/$(cross_host)/g' < debian/libwxmsw-dbg.$$f \
e1293dcf 139 > debian/$(package_msw_dbg).$$f; \
4fb788e4 140 done;
e1293dcf
RL
141 @for f in dirs; do \
142 echo "generating control file $(package_headers_msw).$$f"; \
b63b07a8 143 sed -e 's/=H/$(cross_host)/g' < debian/wx-headers-msw.$$f \
e1293dcf 144 > debian/$(package_headers_msw).$$f; \
094e328c 145 done;
f6bcfd97
BP
146 touch $@
147
050207ec 148build_arch: control-files-stamp $(build_arch_stamps)
3a922bb4 149build_all: control-files-stamp $(build_stamps_native)
3abb92ce 150
3a922bb4
RL
151# Really we should probably do nothing here until we know which
152# binary target is being called, but alpha builds were exploding
153# (compiler segfaults) in random places when building under fakeroot
154# from the binary-arch target. Build all -arch files here then, and
155# let the -indep stuff fend for itself later.
156
157build: build_arch
050207ec 158
e4c4c1c6 159
8ddf18dd 160configure-gtk-shared-stamp:
e4c4c1c6 161 dh_testdir
3a922bb4 162 mkdir -p $(objdir_gtk_shared)
e4c4c1c6 163 cd $(objdir_gtk_shared) \
e1293dcf
RL
164 && ../configure --prefix=/usr \
165 --cache-file=$(config_cache) \
166 --with-gtk \
167 --enable-gtk2 \
b63b07a8 168 --enable-unicode \
e1293dcf
RL
169 --with-opengl \
170 --enable-soname \
171 --with-zlib=sys \
172 --with-libjpeg=sys \
173 --with-libpng=sys \
174 --with-libtiff=sys \
175 --enable-dynamic-loader \
176 --enable-std_iostreams
8ddf18dd
RL
177 touch $@
178
179build-gtk-shared-stamp: configure-gtk-shared-stamp
180 dh_testdir
181 cd $(objdir_gtk_shared) && $(MAKE)
e4c4c1c6
RL
182 touch $@
183
8ddf18dd 184configure-gtk-static-stamp:
e4c4c1c6 185 dh_testdir
3a922bb4 186 mkdir -p $(objdir_gtk_static)
e4c4c1c6 187 cd $(objdir_gtk_static) \
e1293dcf
RL
188 && ../configure --prefix=/usr \
189 --cache-file=$(config_cache) \
190 --with-gtk \
191 --enable-gtk2 \
b63b07a8 192 --enable-unicode \
e1293dcf
RL
193 --with-opengl \
194 --disable-shared \
195 --with-zlib=sys \
196 --with-libjpeg=sys \
197 --with-libpng=sys \
198 --with-libtiff=sys \
199 --enable-dynamic-loader \
200 --enable-std_iostreams
e4c4c1c6
RL
201 touch $@
202
8ddf18dd
RL
203build-gtk-static-stamp: configure-gtk-static-stamp
204 dh_testdir
205 cd $(objdir_gtk_static) && $(MAKE)
206 touch $@
207
208configure-gtk-debug-stamp:
f6bcfd97 209 dh_testdir
3a922bb4 210 mkdir -p $(objdir_gtk_debug)
f6bcfd97 211 cd $(objdir_gtk_debug) \
e1293dcf
RL
212 && ../configure --prefix=/usr \
213 --cache-file=$(config_cache) \
214 --with-gtk \
215 --enable-gtk2 \
b63b07a8 216 --enable-unicode \
e1293dcf
RL
217 --with-opengl \
218 --enable-debug \
219 --enable-soname \
220 --with-zlib=sys \
221 --with-libjpeg=sys \
222 --with-libpng=sys \
223 --with-libtiff=sys \
224 --enable-dynamic-loader \
225 --enable-std_iostreams
f6bcfd97
BP
226 touch $@
227
8ddf18dd
RL
228build-gtk-debug-stamp: configure-gtk-debug-stamp
229 dh_testdir
230 cd $(objdir_gtk_debug) && $(MAKE)
231 touch $@
232
7b7a7637 233
f6bcfd97
BP
234build-contrib-shared-stamp: build-gtk-shared-stamp
235 dh_testdir
b63b07a8 236 cd $(objdir_gtk_shared)/contrib/src && $(MAKE)
f6bcfd97
BP
237 touch $@
238
239build-contrib-static-stamp: build-gtk-static-stamp
240 dh_testdir
b63b07a8 241 cd $(objdir_gtk_static)/contrib/src && $(MAKE)
f6bcfd97
BP
242 touch $@
243
050207ec 244build-gtk-py-stamp: build-gtk-shared-stamp
e0a4aa8a 245 dh_testdir
050207ec 246 touch docs/lgpl.txt
b63b07a8
RL
247 cd wxPython/include/wx \
248 && for f in $(contrib_libs); do \
249 $(RM) $$f; \
250 ln -s ../../../contrib/include/wx/$$f .; \
251 done
050207ec 252 cd wxPython \
b63b07a8
RL
253 && $(python_ver) ./setup.py build \
254 WX_CONFIG='$(wxconfig)' \
255 WXPORT=gtk2 \
256 UNICODE=1
257 cd wxPython/include/wx \
258 && for f in $(contrib_libs); do $(RM) $$f; done
259
e0a4aa8a
RL
260 touch $@
261
f538864d
RL
262build-doc-stamp: build-gtk-shared-stamp
263 dh_testdir
264 cd $(objdir_gtk_shared)/utils/tex2rtf/src \
e0a4aa8a 265 && $(MAKE)
e1293dcf 266 rm -rf $(objdir_doc)
b63b07a8 267 rm -rf $(objdir_doc_cruft)
e0a4aa8a
RL
268 mkdir $(objdir_doc)
269 mkdir $(objdir_doc_cruft)
270 cd $(objdir_doc_cruft) \
3a922bb4 271 && LD_LIBRARY_PATH=../$(objdir_gtk_shared)/lib:$(LD_LIBRARY_PATH) \
e0a4aa8a 272 ../$(objdir_gtk_shared)/utils/tex2rtf/src/tex2rtf \
5c0e67b2 273 ../docs/latex/wx/manual.tex ../$(objdir_doc)/wxwin.htm -twice -html
e0a4aa8a
RL
274 cp docs/latex/wx/*.gif $(objdir_doc)
275 rm -rf $(objdir_doc_cruft)
276 rm -f $(objdir_doc)/wxwin.con $(objdir_doc)/wxwin.hh* \
277 $(objdir_doc)/wxwin.htx $(objdir_doc)/wxwin.ref
f538864d
RL
278 touch $@
279
3a922bb4 280build-examples-stamp: build-gtk-shared-stamp
5c0e67b2 281 dh_testdir
3a922bb4
RL
282 mkdir -p $(objdir_examples)
283
284 # copy all samples and the Makefile generated for libwxgtk.
5c0e67b2 285 cp -a samples $(objdir_examples)
3a922bb4
RL
286 rm -f $(objdir_examples)/samples/Makefile
287 cp -a $(objdir_gtk_shared)/samples/Makefile $(objdir_examples)/samples
288
5259a417
RL
289 cd $(objdir_examples)/samples \
290 && find -name 'Makefile.in' -exec rm -f '{}' ';' \
291 && for d in $$(find -type d); do \
292 if [ -f $$d/makefile.unx ]; then \
293 mv $$d/makefile.unx $$d/Makefile; \
294 fi; \
295 done \
296
f6bcfd97 297 cp -a wxPython/demo $(objdir_examples)/wxPython
5259a417 298
5c0e67b2
RL
299 touch $@
300
3ca6a5f0
BP
301build-i18n-stamp: build-gtk-shared-stamp
302 dh_testdir
54abcc91
RL
303
304 # touch .po files first, since if they are not already up
305 # to date then _now_ is not the time to fix it.
306 # That should have been been done before cvs was tagged.
3ca6a5f0 307 cd $(objdir_i18n) \
54abcc91 308 && touch *.po \
3ca6a5f0
BP
309 && $(MAKE) allmo
310 touch $@
311
8ddf18dd
RL
312
313configure-msw-shared-stamp:
3a922bb4 314 dh_testdir
978f1259
RL
315 mkdir -p $(objdir_msw_shared)
316 cd $(objdir_msw_shared) \
3a922bb4 317 && ../configure --prefix=/usr/$(cross_host) \
a0b03701 318 --cache-file=$(config_cache_cross) \
3a922bb4 319 --host=$(cross_host) \
8ddf18dd 320 --build=$(cross_build)
4fb788e4
RL
321 touch $@
322
8ddf18dd
RL
323build-msw-shared-stamp: configure-msw-shared-stamp
324 dh_testdir
325 cd $(objdir_msw_shared) && $(MAKE)
326 touch $@
327
328configure-msw-static-stamp:
978f1259
RL
329 dh_testdir
330 mkdir -p $(objdir_msw_static)
331 cd $(objdir_msw_static) \
332 && ../configure --prefix=/usr/$(cross_host) \
333 --cache-file=$(config_cache_cross) \
334 --host=$(cross_host) \
335 --build=$(cross_build) \
8ddf18dd 336 --disable-shared
978f1259
RL
337 touch $@
338
8ddf18dd
RL
339build-msw-static-stamp: configure-msw-static-stamp
340 dh_testdir
341 cd $(objdir_msw_static) && $(MAKE)
342 touch $@
343
344configure-msw-dbg-stamp:
4fb788e4
RL
345 dh_testdir
346 mkdir -p $(objdir_msw_dbg)
347 cd $(objdir_msw_dbg) \
348 && ../configure --prefix=/usr/$(cross_host) \
a0b03701 349 --cache-file=$(config_cache_cross) \
4fb788e4
RL
350 --host=$(cross_host) \
351 --build=$(cross_build) \
8ddf18dd
RL
352 --enable-debug
353 touch $@
354
355build-msw-dbg-stamp: configure-msw-dbg-stamp
356 dh_testdir
357 cd $(objdir_msw_dbg) && $(MAKE)
3a922bb4
RL
358 touch $@
359
360
e4c4c1c6
RL
361clean: debian/control
362 dh_testdir
363 dh_testroot
54abcc91 364
8ddf18dd 365 rm -rf config_deb.cache config_deb_cross.cache *-stamp $(objdirs)
050207ec 366 rm -f docs/lgpl.txt
54abcc91
RL
367 rm -f docs/latex/wx/manual.bb
368 rm -f $(objdir_i18n)/*.mo
369
370 cd wxPython \
54abcc91
RL
371 && rm -rf licence \
372 && rm -rf build \
0d7b3f0a 373 && rm -rf contrib/gizmos/contrib \
54abcc91
RL
374 && rm -rf contrib/ogl/contrib \
375 && rm -rf contrib/stc/contrib \
376 && rm -rf contrib/xrc/contrib \
377 && rm -rf *.pyc
378
5259a417
RL
379 cd wxPython/include/wx \
380 && for f in $(contrib_libs); do $(RM) $$f; done
381
0ecfbbea
RL
382# We do the equivalent of this above by removing build, unfortunately
383# its not enough by itself to get the tree properly clean again.
384# && ./setup.py clean
385
e4c4c1c6 386 dh_clean
f538864d
RL
387 rm -f debian/$(package_gtk_lib).*
388 rm -f debian/$(package_gtk_dev).*
f6bcfd97 389 rm -f debian/$(package_gtk_dbg).*
e0a4aa8a 390 rm -f debian/$(package_gtk_py).*
f6bcfd97
BP
391 rm -f debian/$(package_gtk_contrib).*
392 rm -f debian/$(package_gtk_contrib_dev).*
393 rm -f debian/$(package_headers).*
3ca6a5f0 394 rm -f debian/$(package_i18n).*
f538864d 395 rm -f debian/$(package_doc).*
5c0e67b2 396 rm -f debian/$(package_examples).*
3a922bb4 397 rm -f debian/$(package_msw_dev).*
4fb788e4 398 rm -f debian/$(package_msw_dbg).*
3a922bb4 399 rm -f debian/$(package_headers_msw).*
e4c4c1c6 400
050207ec
RL
401install_arch: build_arch $(install_all_arch)
402
3a922bb4 403install: build_all $(install_all_native)
f6bcfd97 404
8ddf18dd
RL
405install-gtk-shared-stamp:
406 dh_testdir
407 mkdir -p $(objdir_gtk_install)
408 cd $(objdir_gtk_shared) \
409 && $(MAKE) install prefix=`pwd`/../$(objdir_gtk_install)
410 touch $@
411
f6bcfd97 412install-gtk-lib: DH_OPTIONS=-p$(package_gtk_lib)
8ddf18dd 413install-gtk-lib: build-gtk-shared-stamp install-gtk-shared-stamp
f6bcfd97
BP
414 dh_testdir
415 dh_testroot
416 dh_clean -k
417 dh_installdirs
8ddf18dd
RL
418 dh_install $(objdir_gtk_install)/share/wx usr/share
419 dh_install $(objdir_gtk_install)/lib/*.so.* usr/lib
e4c4c1c6 420
f6bcfd97 421install-gtk-dev: DH_OPTIONS=-p$(package_gtk_dev)
8ddf18dd 422install-gtk-dev: build-gtk-static-stamp install-gtk-shared-stamp
f6bcfd97
BP
423 dh_testdir
424 dh_testroot
425 dh_clean -k
426 dh_installdirs
b63b07a8 427 dh_install $(objdir_gtk_install)/bin/wxgtk2u-$(release)-config usr/bin
8ddf18dd 428 dh_install $(objdir_gtk_install)/lib/{wx,*.so} usr/lib
b63b07a8 429 dh_install $(objdir_gtk_static)/lib/libwx_gtk2u{-,_gl}*.a usr/lib
e4c4c1c6 430
f6bcfd97
BP
431install-gtk-dbg: DH_OPTIONS=-p$(package_gtk_dbg)
432install-gtk-dbg: build-gtk-debug-stamp
433 dh_testdir
434 dh_testroot
435 dh_clean -k
e1293dcf 436 dh_installdirs usr/share/lintian/overrides
b63b07a8 437 dh_install $(objdir_gtk_debug)/wxgtk2ud-$(release)-config usr/bin
8ddf18dd 438 dh_install $(objdir_gtk_debug)/lib usr
050207ec 439 cp debian/lintian-override debian/$(package_gtk_dbg)/usr/share/lintian/overrides/$(package_gtk_dbg)
e4c4c1c6 440
7b7a7637 441
8ddf18dd
RL
442install-gtk-contrib-stamp:
443 dh_testdir
444 mkdir -p $(objdir_gtk_contrib_install)/lib
445 cd $(objdir_gtk_shared)/contrib/src \
446 && $(MAKE) install prefix=`pwd`/../../../$(objdir_gtk_contrib_install)
447 touch $@
448
f6bcfd97 449install-gtk-contrib: DH_OPTIONS=-p$(package_gtk_contrib)
8ddf18dd 450install-gtk-contrib: build-contrib-shared-stamp install-gtk-contrib-stamp
e4c4c1c6
RL
451 dh_testdir
452 dh_testroot
f6bcfd97
BP
453 dh_clean -k
454 dh_installdirs
8ddf18dd 455 dh_install $(objdir_gtk_contrib_install)/lib/*.so.* usr/lib
f6bcfd97
BP
456
457install-gtk-contrib-dev: DH_OPTIONS=-p$(package_gtk_contrib_dev)
8ddf18dd 458install-gtk-contrib-dev: build-contrib-static-stamp install-gtk-contrib-stamp
f6bcfd97
BP
459 dh_testdir
460 dh_testroot
461 dh_clean -k
462 dh_installdirs
8ddf18dd
RL
463 dh_install $(objdir_gtk_contrib_install)/include usr
464 dh_install $(objdir_gtk_contrib_install)/lib/*.so usr/lib
b63b07a8 465 dh_install -Xlibwx_gtk2u- -Xlibwx_gtk2u_gl- \
8ddf18dd 466 $(objdir_gtk_static)/lib/*.a usr/lib
f6bcfd97
BP
467
468install-gtk-py: DH_OPTIONS=-p$(package_gtk_py)
050207ec 469install-gtk-py: build-gtk-py-stamp
f6bcfd97
BP
470 dh_testdir
471 dh_testroot
472 dh_clean -k
473 dh_installdirs
e1293dcf
RL
474 cd wxPython \
475 && $(python_ver) ./setup.py install \
476 --prefix=`pwd`/../debian/$(package_gtk_py)/usr \
b63b07a8
RL
477 WX_CONFIG='$(wxconfig)' \
478 WXPORT=gtk2 \
479 UNICODE=1
e1293dcf
RL
480
481 find debian/$(package_gtk_py)/usr/lib/$(python_ver)/site-packages/wxPython \
f6bcfd97
BP
482 -name '*.py?' -exec rm '{}' ';'
483
0ecfbbea 484 dh_installman debian/wxPython-tools.1
e1293dcf
RL
485 dh_link usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2py.1 \
486 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2xpm.1 \
487 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2png.1 \
488 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pycrust.1 \
489 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyshell.1 \
490 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/xrced.1 \
491 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/helpviewer.1 \
492 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyalacarte.1 \
493 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyalamode.1 \
494 usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pywrap.1
495
496 # This is rather bogus, its included in the main copyright file now though.
b63b07a8 497 rm -f debian/$(package_gtk_py)/usr/lib/$(python_ver)/site-packages/wx/tools/XRCed/license.txt
0ecfbbea 498
f6bcfd97 499install-headers: DH_OPTIONS=-p$(package_headers)
8ddf18dd 500install-headers: install-gtk-shared-stamp
f6bcfd97
BP
501 dh_testdir
502 dh_testroot
503 dh_clean -k
504 dh_installdirs
8155b640
RL
505
506# The only way to be really sure we get the univ headers correct is to install
507# them. Do that in a scratch dirs, and move the gtk ones last, so at least
508# they win in the result of any uncaught conflict.
509
0ecfbbea
RL
510# cd $(objdir_gtk_univ) \
511# && $(MAKE) install prefix=`pwd`/../$(objdir_univ_install)/usr
8155b640 512
0ecfbbea 513# dh_movefiles --sourcedir=$(objdir_univ_install)
8ddf18dd
RL
514 dh_install $(objdir_gtk_install)/include usr
515 dh_install $(objdir_gtk_install)/share/aclocal usr/share
8155b640 516
0ecfbbea 517 dh_installman debian/wx-config.1
f6bcfd97 518
3ca6a5f0 519install-i18n: DH_OPTIONS=-p$(package_i18n)
8ddf18dd 520install-i18n: build-i18n-stamp install-gtk-shared-stamp
3ca6a5f0
BP
521 dh_testdir
522 dh_testroot
523 dh_clean -k
524 dh_installdirs
8ddf18dd 525 dh_install $(objdir_gtk_install)/share/locale usr/share
3ca6a5f0 526
f6bcfd97
BP
527install-doc: DH_OPTIONS=-p$(package_doc)
528install-doc: build-doc-stamp
529 dh_testdir
530 dh_testroot
531 dh_clean -k
532 dh_installdirs
533
534install-examples: DH_OPTIONS=-p$(package_examples)
535install-examples: build-examples-stamp
536 dh_testdir
537 dh_testroot
538 dh_clean -k
539 dh_installdirs
540
4fb788e4 541
3a922bb4 542install-msw-dev: DH_OPTIONS=-p$(package_msw_dev)
978f1259 543install-msw-dev: build-msw-shared-stamp build-msw-static-stamp
3a922bb4
RL
544 dh_testdir
545 dh_testroot
546 dh_clean -k
547 dh_installdirs
978f1259
RL
548 cp -a $(objdir_msw_shared)/lib/* debian/$(package_msw_dev)/usr/$(cross_host)/lib
549 cp -a $(objdir_msw_static)/lib/*.a debian/$(package_msw_dev)/usr/$(cross_host)/lib
550 cp $(objdir_msw_shared)/wxmsw-$(release)-$(cross_host)-config debian/$(package_msw_dev)/usr/bin/
3a922bb4
RL
551 $(cross_host)-strip --strip-debug debian/$(package_msw_dev)/usr/$(cross_host)/lib/*.a
552
4fb788e4
RL
553install-msw-dbg: DH_OPTIONS=-p$(package_msw_dbg)
554install-msw-dbg: build-msw-dbg-stamp
555 dh_testdir
556 dh_testroot
557 dh_clean -k
558 dh_installdirs
559 cp -a $(objdir_msw_dbg)/lib/* debian/$(package_msw_dbg)/usr/$(cross_host)/lib
a0b03701 560 cp $(objdir_msw_dbg)/wxmswd-$(release)-$(cross_host)-config debian/$(package_msw_dbg)/usr/bin/
978f1259
RL
561 # No static lib, they're freakin' huge!
562 #$(cross_host)-strip --strip-debug debian/$(package_msw_dbg)/usr/$(cross_host)/lib/*.a
4fb788e4 563
3a922bb4
RL
564install-headers-msw: DH_OPTIONS=-p$(package_headers_msw)
565install-headers-msw:
566 dh_testdir
567 dh_testroot
568 dh_clean -k
569 dh_installdirs
570 @# Symlink all the headers that will be installed by the main -headers
571 @# package to where the cross compiler will expect them.
572 @for f in `ls -1 include/wx`; do \
573 ln -s /usr/include/wx/$$f debian/$(package_headers_msw)/usr/$(cross_host)/include/wx; \
574 echo "linking header /usr/include/wx/$$f"; \
575 done;
576 @# But install this lot for real.
577 rm -f debian/$(package_headers_msw)/usr/$(cross_host)/include/wx/msw
578 cp -a include/wx/msw debian/$(package_headers_msw)/usr/$(cross_host)/include/wx
579 @# and remove this cruft(?)
580 rm -f debian/$(package_headers_msw)/usr/$(cross_host)/include/wx/treelay.h
581
582
f6bcfd97 583binary-common:
f6bcfd97
BP
584 dh_testdir
585 dh_testroot
586 dh_installdocs
5c0e67b2
RL
587 dh_installchangelogs
588 dh_installexamples
8155b640 589 dh_installmenu
5c0e67b2 590 dh_link
3a922bb4
RL
591
592 @# Don't strip debug libs at all, and strip cross libs elsewhere
593 @# with the cross host tools until dh_strip gets smarter.
e1293dcf 594 dh_strip -N$(package_gtk_dbg) -N$(package_msw_dev) -N$(package_msw_dbg)
3a922bb4 595
e4c4c1c6
RL
596 dh_compress
597 dh_fixperms
afa3e1ed 598 dh_makeshlibs -N$(package_gtk_py) -V
e4c4c1c6 599 dh_installdeb
b63b07a8 600 dh_shlibdeps -ldebian/$(package_gtk_lib)/usr/lib:debian/$(package_gtk_dbg)/usr/lib:debian/$(package_gtk_contrib)/usr/lib
e4c4c1c6
RL
601 dh_gencontrol
602 dh_md5sums
603 dh_builddeb
604
f6bcfd97 605# Build architecture-independent files here.
050207ec
RL
606# Note that you currently can't build the indep packages without first
607# building the arch specific package files needed to create them.
3abb92ce 608binary-indep: build_all install
3a922bb4 609 $(MAKE) -f debian/rules \
e1293dcf 610 DH_OPTIONS="-i -N$(package_msw_dev) -N$(package_msw_dbg) -N$(package_headers_msw)" \
a0b03701 611 binary-common
f6bcfd97 612
050207ec
RL
613# Build just the architecture-dependent files here.
614binary-arch: build_arch install_arch
3a922bb4 615 $(MAKE) -f debian/rules \
e1293dcf 616 DH_OPTIONS="-a -N$(package_msw_dev) -N$(package_msw_dbg) -N$(package_headers_msw)" \
a0b03701 617 binary-common
f6bcfd97
BP
618
619# Build all packages target.
620binary: binary-arch binary-indep
621
3a922bb4
RL
622# This is a special target for building the wxMSW-cross packages.
623# It's not currently called during the official package build run
624# but may be run separately to build the extra packages.
625# There is an implied build dep on the mingw32 cross compiler
626# that is not in the control file.
627binary-cross: control-files-stamp $(install_all_cross)
628 $(MAKE) -f debian/rules \
e1293dcf 629 DH_OPTIONS="-p$(package_msw_dev) -p$(package_msw_dbg) -p$(package_headers_msw)" \
a0b03701 630 binary-common
3a922bb4 631
f6bcfd97
BP
632
633############################################################################
634#
635# Some rules to build a subset of the complete list of packages that can be
636# built from CVS. Beware that packages produced with these rules may *NOT*
637# be compatible with packages built using the 'binary' target or even with
638# Debian policy. Do not distribute packages built with these rules, they
639# are currently useful for rapid in-house testing by developers only.
640
641# libwxgtk shared lib package
642binary-gtk: control-files-stamp install-gtk-lib install-headers
643 $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_lib) -p$(package_headers)" binary-common
644
645binary-gtk-dev: control-files-stamp install-gtk-dev install-headers
646 $(MAKE) -f debian/rules \
647 DH_OPTIONS="-p$(package_gtk_lib) -p$(package_gtk_dev) -p$(package_headers)" \
648 binary-common
649
650binary-gtk-dbg: control-files-stamp install-gtk-dbg install-headers
651 $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_dbg) -p$(package_headers)" binary-common
652
7b7a7637 653
f6bcfd97
BP
654# docs package
655binary-doc: control-files-stamp install-doc
656 $(MAKE) -f debian/rules DH_OPTIONS=-p$(package_doc) binary-common
657
76314141
RL
658binary-fast:control-files-stamp install-gtk-dbg install-msw-dev install-headers install-headers-msw
659 $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_dbg) -p$(package_msw_dev) -p$(package_headers) -p$(package_headers_msw)" binary-common
660
f6bcfd97 661
3abb92ce 662.PHONY: build build_all build_arch clean binary-indep binary-arch binary binary-common \
e1293dcf
RL
663 binary-gtk binary-gtk-dev binary-gtk-dbg binary-doc binary-cross \
664 install install_arch install-gtk-lib install-gtk-dev \
050207ec 665 install-gtk-dbg install-gtk-contrib install-gtk-contrib-dev \
3a922bb4 666 install-gtk-py install-headers install-i18n install-doc install-examples \
e1293dcf 667 install-msw-dev install-msw-dbg install-headers-msw
f6bcfd97 668