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