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