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