2 # debian/rules file to build packages from wxWindows CVS source
4 # Sculpted 13/2/2000 by Ron Lee <ron@debian.org> from new and
5 # variously stolen code :-)
6 # It makes copious use of the debhelper utilities written by
7 # Joey Hess and others.
13 release
:=$(shell dpkg-parsechangelog | sed
-n
's/^Source: wxwindows//p')
16 package_wxbase_lib
=libwxbase
$(release
)
17 package_wxbase_dev
=libwxbase
$(release
)-dev
18 package_wxbase_dbg
=libwxbase
$(release
)-dbg
19 package_gtk_lib
=libwxgtk
$(release
)
20 package_gtk_dev
=libwxgtk
$(release
)-dev
21 package_gtk_dbg
=libwxgtk
$(release
)-dbg
22 package_gtk_py
=libwxgtk
$(release
)-python
23 package_gtk_contrib
=libwxgtk
$(release
)-contrib
24 package_gtk_contrib_dev
=libwxgtk
$(release
)-contrib-dev
25 package_headers
=wxwin
$(release
)-headers
26 package_i18n
=wxwin
$(release
)-i18n
27 package_doc
=wxwin
$(release
)-doc
28 package_examples
=wxwin
$(release
)-examples
31 objdir_wxbase_shared
=objs_wxbase_sh
32 objdir_wxbase_static
=objs_wxbase_st
33 objdir_wxbase_debug
=objs_wxbase_d
34 objdir_gtk_shared
=objs_gtk_sh
35 objdir_gtk_static
=objs_gtk_st
36 objdir_gtk_debug
=objs_gtk_d
37 objdir_doc_cruft
=objs_doc_con
38 objdir_doc
=docs
/wxWindows-manual.html
39 objdir_examples
=docs
/examples
41 objdirs
=$(objdir_wxbase_shared
) $(objdir_wxbase_static
) $(objdir_wxbase_debug
) \
42 $(objdir_gtk_shared
) $(objdir_gtk_static
) $(objdir_gtk_debug
) \
43 $(objdir_doc
) $(objdir_examples
)
45 build_stamps
=build-wxbase-shared-stamp build-wxbase-static-stamp \
46 build-wxbase-debug-stamp build-gtk-shared-stamp \
47 build-gtk-static-stamp build-gtk-debug-stamp \
48 build-contrib-shared-stamp build-contrib-static-stamp \
49 build-gtk-python-stamp build-examples-stamp build-doc-stamp \
52 install_all
=install-wxbase-lib install-wxbase-dev install-wxbase-dbg \
53 install-gtk-lib install-gtk-dev install-gtk-dbg \
54 install-gtk-contrib install-gtk-contrib-dev install-gtk-py \
55 install-headers install-i18n install-doc install-examples
57 wxconfig
:=$(shell pwd
)/$(objdir_gtk_shared
)/wx-config \
58 --prefix=$(shell pwd
) \
59 --exec-prefix
=$(shell pwd
)/$(objdir_gtk_shared
)
64 debian
/control
: debian
/control.in
65 sed
-e
's/=V/$(release)/g' < debian
/control.in
> debian
/control
67 debian
/wxwin-doc.doc-base
: debian
/wxwin-doc.doc-base.in
68 sed
-e
's/=V/$(release)/g' < debian
/wxwin-doc.doc-base.in
> debian
/wxwin-doc.doc-base
70 control-files-stamp
: debian
/control debian
/wxwin-doc.doc-base
72 @for f in dirs docs postinst
; do \
73 echo
"generating control file $(package_wxbase_lib).$$f"; \
74 cp debian
/libwxbase.
$$f debian
/$(package_wxbase_lib
).
$$f; \
76 @for f in dirs docs files links postinst prerm
; do \
77 echo
"generating control file $(package_wxbase_dev).$$f"; \
78 cp debian
/libwxbase-dev.
$$f debian
/$(package_wxbase_dev
).
$$f; \
80 @for f in dirs docs links postinst prerm
; do \
81 echo
"generating control file $(package_wxbase_dbg).$$f"; \
82 cp debian
/libwxbase-dbg.
$$f debian
/$(package_wxbase_dbg
).
$$f; \
84 @for f in dirs docs postinst
; do \
85 echo
"generating control file $(package_gtk_lib).$$f"; \
86 cp debian
/libwxgtk.
$$f debian
/$(package_gtk_lib
).
$$f; \
88 @for f in dirs docs files links postinst prerm
; do \
89 echo
"generating control file $(package_gtk_dev).$$f"; \
90 cp debian
/libwxgtk-dev.
$$f debian
/$(package_gtk_dev
).
$$f; \
92 @for f in dirs docs links postinst prerm
; do \
93 echo
"generating control file $(package_gtk_dbg).$$f"; \
94 cp debian
/libwxgtk-dbg.
$$f debian
/$(package_gtk_dbg
).
$$f; \
96 @for f in dirs docs files postinst prerm
; do \
97 echo
"generating control file $(package_gtk_py).$$f"; \
98 cp debian
/libwxgtk-python.
$$f debian
/$(package_gtk_py
).
$$f; \
100 @for f in dirs docs postinst
; do \
101 echo
"generating control file $(package_gtk_contrib).$$f"; \
102 cp debian
/libwxgtk-contrib.
$$f debian
/$(package_gtk_contrib
).
$$f; \
104 @for f in dirs docs files
; do \
105 echo
"generating control file $(package_gtk_contrib_dev).$$f"; \
106 cp debian
/libwxgtk-contrib-dev.
$$f debian
/$(package_gtk_contrib_dev
).
$$f; \
108 @for f in dirs docs files
; do \
109 echo
"generating control file $(package_headers).$$f"; \
110 cp debian
/wxwin-headers.
$$f debian
/$(package_headers
).
$$f; \
112 @for f in dirs docs files
; do \
113 echo
"generating control file $(package_i18n).$$f"; \
114 cp debian
/wxwin-i18n.
$$f debian
/$(package_i18n
).
$$f; \
116 @for f in dirs docs doc-base
; do \
117 echo
"generating control file $(package_doc).$$f"; \
118 cp debian
/wxwin-doc.
$$f debian
/$(package_doc
).
$$f; \
120 @for f in docs examples
; do \
121 echo
"generating control file $(package_examples).$$f"; \
122 cp debian
/wxwin-examples.
$$f debian
/$(package_examples
).
$$f; \
126 build
: control-files-stamp
$(build_stamps
)
128 build-wxbase-shared-stamp
:
130 mkdir
$(objdir_wxbase_shared
)
131 cd
$(objdir_wxbase_shared
) \
132 && ..
/configure
--prefix=/usr \
134 --enable-burnt_name \
139 build-wxbase-static-stamp
:
141 mkdir
$(objdir_wxbase_static
)
142 cd
$(objdir_wxbase_static
) \
143 && ..
/configure
--prefix=/usr \
150 build-wxbase-debug-stamp
:
152 mkdir
$(objdir_wxbase_debug
)
153 cd
$(objdir_wxbase_debug
) \
154 && ..
/configure
--prefix=/usr \
157 --enable-burnt_name \
162 build-gtk-shared-stamp
:
164 mkdir
$(objdir_gtk_shared
)
165 cd
$(objdir_gtk_shared
) \
166 && ..
/configure
--prefix=/usr \
169 --enable-burnt_name \
177 build-gtk-static-stamp
:
179 mkdir
$(objdir_gtk_static
)
180 cd
$(objdir_gtk_static
) \
181 && ..
/configure
--prefix=/usr \
192 build-gtk-debug-stamp
:
194 mkdir
$(objdir_gtk_debug
)
195 cd
$(objdir_gtk_debug
) \
196 && ..
/configure
--prefix=/usr \
200 --enable-burnt_name \
208 build-contrib-shared-stamp
: build-gtk-shared-stamp
210 cd
$(objdir_gtk_shared
)/contrib
/src
&& $(MAKE
)
213 build-contrib-static-stamp
: build-gtk-static-stamp
215 cd
$(objdir_gtk_static
)/contrib
/src
&& $(MAKE
)
218 build-gtk-python-stamp
: build-gtk-shared-stamp
221 && touch gtk
/*.
cpp gtk
/*.py \
222 && ..
/distrib
/build.py
-b WXDIR
=..
/.. WXCONFIG
='$(wxconfig)'
225 build-doc-stamp
: build-gtk-shared-stamp
227 cd
$(objdir_gtk_shared
)/utils
/tex2rtf
/src \
230 mkdir
$(objdir_doc_cruft
)
231 cd
$(objdir_doc_cruft
) \
232 && LD_LIBRARY_PATH
=..
/$(objdir_gtk_shared
)/lib \
233 ..
/$(objdir_gtk_shared
)/utils
/tex2rtf
/src
/tex2rtf \
234 ..
/docs
/latex
/wx
/manual.
tex ..
/$(objdir_doc
)/wxwin.htm
-twice
-html
235 cp docs
/latex
/wx
/*.gif
$(objdir_doc
)
236 rm -rf
$(objdir_doc_cruft
)
237 rm -f
$(objdir_doc
)/wxwin.con
$(objdir_doc
)/wxwin.hh
* \
238 $(objdir_doc
)/wxwin.htx
$(objdir_doc
)/wxwin.ref
241 build-examples-stamp
:
243 mkdir
$(objdir_examples
)
244 cp
-a samples
$(objdir_examples
)
245 cp
-a demos
$(objdir_examples
)
246 cp
-a wxPython
/demo
$(objdir_examples
)/wxPython
247 @for d in
$(objdir_examples
)/demos
$(objdir_examples
)/samples
; do \
249 && mv Makefile.in Makefile \
250 && rm -f configure
* \
251 && find
-name
'Makefile.in' -exec
rm -f
'{}' ';' \
252 && for f in
$$(find
-type d
); do \
253 if
[ -f
$$f/makefile.unx
]; then \
254 mv
$$f/makefile.unx
$$f/Makefile
; \
260 build-i18n-stamp
: build-gtk-shared-stamp
266 clean: debian
/control
269 rm -rf control-files-stamp
$(build_stamps
) $(objdirs
)
270 -cd wxPython
/src
&& $(MAKE
) clean
272 rm -f debian
/$(package_wxbase_lib
).
*
273 rm -f debian
/$(package_wxbase_dev
).
*
274 rm -f debian
/$(package_wxbase_dbg
).
*
275 rm -f debian
/$(package_gtk_lib
).
*
276 rm -f debian
/$(package_gtk_dev
).
*
277 rm -f debian
/$(package_gtk_dbg
).
*
278 rm -f debian
/$(package_gtk_py
).
*
279 rm -f debian
/$(package_gtk_contrib
).
*
280 rm -f debian
/$(package_gtk_contrib_dev
).
*
281 rm -f debian
/$(package_headers
).
*
282 rm -f debian
/$(package_i18n
).
*
283 rm -f debian
/$(package_doc
).
*
284 rm -f debian
/$(package_examples
).
*
286 install: build
$(install_all
)
288 install-wxbase-lib
: DH_OPTIONS
=-p
$(package_wxbase_lib
)
289 install-wxbase-lib
: build-wxbase-shared-stamp
294 cp
-a
$(objdir_wxbase_shared
)/lib
/* debian
/$(package_wxbase_lib
)/usr
/lib
295 cp
$(objdir_wxbase_shared
)/wxbase-config debian
/$(package_wxbase_lib
)/usr
/bin
/
297 install-wxbase-dev
: DH_OPTIONS
=-p
$(package_wxbase_dev
)
298 install-wxbase-dev
: build-wxbase-static-stamp install-wxbase-lib
303 dh_movefiles
--sourcedir
=debian
/$(package_wxbase_lib
)
304 cp
$(objdir_wxbase_static
)/lib
/*.a debian
/$(package_wxbase_dev
)/usr
/lib
306 install-wxbase-dbg
: DH_OPTIONS
=-p
$(package_wxbase_dbg
)
307 install-wxbase-dbg
: build-wxbase-debug-stamp
312 cp
-a
$(objdir_wxbase_debug
)/lib
/* debian
/$(package_wxbase_dbg
)/usr
/lib
313 cp
$(objdir_wxbase_debug
)/wxbased-config debian
/$(package_wxbase_dbg
)/usr
/bin
/
315 install-gtk-lib
: DH_OPTIONS
=-p
$(package_gtk_lib
)
316 install-gtk-lib
: build-gtk-shared-stamp
321 cd
$(objdir_gtk_shared
) \
322 && $(MAKE
) install prefix=`pwd`/..
/debian
/$(package_gtk_lib
)/usr
323 rm -f debian
/$(package_gtk_lib
)/usr
/bin
/wx-config
325 install-gtk-dev
: DH_OPTIONS
=-p
$(package_gtk_dev
)
326 install-gtk-dev
: build-gtk-static-stamp install-gtk-lib
331 dh_movefiles
--sourcedir
=debian
/$(package_gtk_lib
)
332 cp
$(objdir_gtk_static
)/lib
/libwx_gtk
*.a debian
/$(package_gtk_dev
)/usr
/lib
334 install-gtk-dbg
: DH_OPTIONS
=-p
$(package_gtk_dbg
)
335 install-gtk-dbg
: build-gtk-debug-stamp
340 cp
-a
$(objdir_gtk_debug
)/lib
/* debian
/$(package_gtk_dbg
)/usr
/lib
341 cp
$(objdir_gtk_debug
)/wxgtkd-config debian
/$(package_gtk_dbg
)/usr
/bin
/
343 install-gtk-contrib
: DH_OPTIONS
=-p
$(package_gtk_contrib
)
344 install-gtk-contrib
: build-contrib-shared-stamp
349 cd
$(objdir_gtk_shared
)/contrib
/src \
350 && $(MAKE
) install prefix=`pwd`/..
/..
/..
/debian
/$(package_gtk_contrib
)/usr
352 install-gtk-contrib-dev
: DH_OPTIONS
=-p
$(package_gtk_contrib_dev
)
353 install-gtk-contrib-dev
: build-contrib-static-stamp install-gtk-dev
358 dh_movefiles
--sourcedir
=debian
/$(package_gtk_contrib
)
359 cp
$(objdir_gtk_static
)/lib
/*.a debian
/$(package_gtk_contrib_dev
)/usr
/lib
360 rm -f debian
/$(package_gtk_contrib_dev
)/usr
/lib
/libwx_gtk
*.a
362 install-gtk-py
: DH_OPTIONS
=-p
$(package_gtk_py
)
363 install-gtk-py
: build-gtk-python-stamp
369 && ..
/distrib
/build.py
-i \
370 TARGETDIR
=..
/..
/debian
/$(package_gtk_py
)/usr
/lib
/python1.5
/site-packages
/wxPython \
371 HELPERLIBDIR
=..
/..
/debian
/$(package_gtk_py
)/usr
/lib \
373 rm -rf debian
/$(package_gtk_py
)/usr
/lib
/python1.5
/site-packages
/wxPython
/demo
374 find debian
/$(package_gtk_py
)/usr
/lib
/python1.5
/site-packages
/wxPython \
375 -name
'*.py?' -exec
rm '{}' ';'
377 install-headers
: DH_OPTIONS
=-p
$(package_headers
)
378 install-headers
: install-gtk-lib
383 dh_movefiles
--sourcedir
=debian
/$(package_gtk_lib
)
392 install-i18n
: DH_OPTIONS
=-p
$(package_i18n
)
393 install-i18n
: build-i18n-stamp install-gtk-lib
398 dh_movefiles
--sourcedir
=debian
/$(package_gtk_lib
)
400 install-doc
: DH_OPTIONS
=-p
$(package_doc
)
401 install-doc
: build-doc-stamp
407 install-examples
: DH_OPTIONS
=-p
$(package_examples
)
408 install-examples
: build-examples-stamp
415 dh_testversion
1.1.17
427 dh_shlibdeps
-ldebian
/$(package_gtk_lib
)/usr
/lib
:debian
/$(package_gtk_py
)/usr
/lib
432 # Build architecture-independent files here.
433 binary-indep
: build
install
434 $(MAKE
) -f debian
/rules DH_OPTIONS
=-i binary-common
436 # Build architecture-dependent files here.
437 binary-arch
: build
install
438 $(MAKE
) -f debian
/rules DH_OPTIONS
=-a binary-common
440 # Build all packages target.
441 binary
: binary-arch binary-indep
444 ############################################################################
446 # Some rules to build a subset of the complete list of packages that can be
447 # built from CVS. Beware that packages produced with these rules may *NOT*
448 # be compatible with packages built using the 'binary' target or even with
449 # Debian policy. Do not distribute packages built with these rules, they
450 # are currently useful for rapid in-house testing by developers only.
452 # libwxgtk shared lib package
453 binary-gtk
: control-files-stamp install-gtk-lib install-headers
454 $(MAKE
) -f debian
/rules DH_OPTIONS
="-p$(package_gtk_lib) -p$(package_headers)" binary-common
456 binary-gtk-dev
: control-files-stamp install-gtk-dev install-headers
457 $(MAKE
) -f debian
/rules \
458 DH_OPTIONS
="-p$(package_gtk_lib) -p$(package_gtk_dev) -p$(package_headers)" \
461 binary-gtk-dbg
: control-files-stamp install-gtk-dbg install-headers
462 $(MAKE
) -f debian
/rules DH_OPTIONS
="-p$(package_gtk_dbg) -p$(package_headers)" binary-common
464 # libwxbase shared lib package
465 binary-wxbase
: control-files-stamp install-wxbase-lib install-headers
466 $(MAKE
) -f debian
/rules DH_OPTIONS
="-p$(package_wxbase_lib) -p$(package_headers)" binary-common
468 binary-wxbase-dev
: control-files-stamp install-wxbase-dev install-headers
469 $(MAKE
) -f debian
/rules \
470 DH_OPTIONS
="-p$(package_wxbase_lib) -p$(package_wxbase_dev) -p$(package_headers)" \
473 binary-wxbase-dbg
: control-files-stamp install-wxbase-dbg install-headers
474 $(MAKE
) -f debian
/rules DH_OPTIONS
="-p$(package_wxbase_dbg) -p$(package_headers)" binary-common
477 binary-doc
: control-files-stamp install-doc
478 $(MAKE
) -f debian
/rules DH_OPTIONS
=-p
$(package_doc
) binary-common
481 .PHONY
: build
clean binary-indep binary-arch binary binary-common binary-gtk \
482 binary-gtk-dev binary-gtk-dbg binary-wxbase binary-wxbase-dev \
483 binary-wxbase-dbg binary-doc
install install-wxbase-lib \
484 install-wxbase-dev install-wxbase-dbg install-gtk-lib install-gtk-dev \
485 install-gtk-dbg install-gtk-contrib install-gtk-contrib-dev \
486 install-gtk-py install-headers install-i18n install-doc install-examples