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