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')
14 python_dir
:=python
$(shell python
-c
"import sys;print sys.version[:3]")
17 package_wxbase_lib
=libwxbase
$(release
)
18 package_wxbase_dev
=libwxbase
$(release
)-dev
19 package_wxbase_dbg
=libwxbase
$(release
)-dbg
20 package_gtk_lib
=libwxgtk
$(release
)
21 package_gtk_dev
=libwxgtk
$(release
)-dev
22 package_gtk_dbg
=libwxgtk
$(release
)-dbg
23 package_gtk_py
=libwxgtk
$(release
)-python
24 package_gtk_contrib
=libwxgtk
$(release
)-contrib
25 package_gtk_contrib_dev
=libwxgtk
$(release
)-contrib-dev
26 package_headers
=wxwin
$(release
)-headers
27 package_i18n
=wxwin
$(release
)-i18n
28 package_doc
=wxwin
$(release
)-doc
29 package_examples
=wxwin
$(release
)-examples
32 objdir_wxbase_shared
=objs_wxbase_sh
33 objdir_wxbase_static
=objs_wxbase_st
34 objdir_wxbase_debug
=objs_wxbase_d
35 objdir_gtk_shared
=objs_gtk_sh
36 objdir_gtk_static
=objs_gtk_st
37 objdir_gtk_debug
=objs_gtk_d
38 objdir_doc_cruft
=objs_doc_con
39 objdir_doc
=docs
/wxWindows-manual.html
40 objdir_examples
=docs
/examples
42 objdirs
=$(objdir_wxbase_shared
) $(objdir_wxbase_static
) $(objdir_wxbase_debug
) \
43 $(objdir_gtk_shared
) $(objdir_gtk_static
) $(objdir_gtk_debug
) \
44 $(objdir_doc
) $(objdir_examples
)
47 build_arch_stamps
=build-wxbase-shared-stamp build-wxbase-static-stamp \
48 build-wxbase-debug-stamp build-gtk-shared-stamp \
49 build-gtk-static-stamp build-gtk-debug-stamp \
50 build-contrib-shared-stamp build-contrib-static-stamp \
53 build_indep_stamps
=build-examples-stamp build-doc-stamp build-i18n-stamp
55 build_stamps
=$(build_arch_stamps
) $(build_indep_stamps
)
58 install_all_arch
=install-wxbase-lib install-wxbase-dev install-wxbase-dbg \
59 install-gtk-lib install-gtk-dev install-gtk-dbg \
60 install-gtk-contrib install-gtk-contrib-dev install-gtk-py \
63 install_all_indep
=install-i18n install-doc install-examples
65 install_all
=$(install_all_arch
) $(install_all_indep
)
70 debian
/control
: debian
/control.in
71 sed
-e
's/=V/$(release)/g' < debian
/control.in
> debian
/control
73 debian
/wxwin-doc.doc-base
: debian
/wxwin-doc.doc-base.in
74 sed
-e
's/=V/$(release)/g' < debian
/wxwin-doc.doc-base.in
> debian
/wxwin-doc.doc-base
76 control-files-stamp
: debian
/control debian
/wxwin-doc.doc-base
78 @for f in dirs postinst
; do \
79 echo
"generating control file $(package_wxbase_lib).$$f"; \
80 cp debian
/libwxbase.
$$f debian
/$(package_wxbase_lib
).
$$f; \
82 @for f in dirs files links postinst prerm
; do \
83 echo
"generating control file $(package_wxbase_dev).$$f"; \
84 cp debian
/libwxbase-dev.
$$f debian
/$(package_wxbase_dev
).
$$f; \
86 @for f in dirs links postinst prerm
; do \
87 echo
"generating control file $(package_wxbase_dbg).$$f"; \
88 cp debian
/libwxbase-dbg.
$$f debian
/$(package_wxbase_dbg
).
$$f; \
90 @for f in dirs postinst
; do \
91 echo
"generating control file $(package_gtk_lib).$$f"; \
92 cp debian
/libwxgtk.
$$f debian
/$(package_gtk_lib
).
$$f; \
94 @for f in dirs files links postinst prerm
; do \
95 echo
"generating control file $(package_gtk_dev).$$f"; \
96 cp debian
/libwxgtk-dev.
$$f debian
/$(package_gtk_dev
).
$$f; \
98 @for f in dirs links postinst prerm
; do \
99 echo
"generating control file $(package_gtk_dbg).$$f"; \
100 cp debian
/libwxgtk-dbg.
$$f debian
/$(package_gtk_dbg
).
$$f; \
102 @for f in dirs docs files postinst prerm
; do \
103 echo
"generating control file $(package_gtk_py).$$f"; \
104 sed
-e
's/=PY/$(python_dir)/g;s/=V/$(release)/g' < debian
/libwxgtk-python.
$$f \
105 > debian
/$(package_gtk_py
).
$$f; \
107 @for f in dirs postinst
; do \
108 echo
"generating control file $(package_gtk_contrib).$$f"; \
109 cp debian
/libwxgtk-contrib.
$$f debian
/$(package_gtk_contrib
).
$$f; \
111 @for f in dirs files
; do \
112 echo
"generating control file $(package_gtk_contrib_dev).$$f"; \
113 cp debian
/libwxgtk-contrib-dev.
$$f debian
/$(package_gtk_contrib_dev
).
$$f; \
115 @for f in dirs files
; do \
116 echo
"generating control file $(package_headers).$$f"; \
117 cp debian
/wxwin-headers.
$$f debian
/$(package_headers
).
$$f; \
119 @for f in dirs files
; do \
120 echo
"generating control file $(package_i18n).$$f"; \
121 cp debian
/wxwin-i18n.
$$f debian
/$(package_i18n
).
$$f; \
123 @for f in dirs docs doc-base
; do \
124 echo
"generating control file $(package_doc).$$f"; \
125 cp debian
/wxwin-doc.
$$f debian
/$(package_doc
).
$$f; \
127 @for f in examples
; do \
128 echo
"generating control file $(package_examples).$$f"; \
129 cp debian
/wxwin-examples.
$$f debian
/$(package_examples
).
$$f; \
133 build_arch
: control-files-stamp
$(build_arch_stamps
)
135 build
: control-files-stamp
$(build_stamps
)
137 build-wxbase-shared-stamp
:
139 mkdir
$(objdir_wxbase_shared
)
140 cd
$(objdir_wxbase_shared
) \
141 && ..
/configure
--prefix=/usr \
142 --cache-file
=..
/config_deb.cache \
144 --enable-burnt_name \
149 build-wxbase-static-stamp
:
151 mkdir
$(objdir_wxbase_static
)
152 cd
$(objdir_wxbase_static
) \
153 && ..
/configure
--prefix=/usr \
154 --cache-file
=..
/config_deb.cache \
161 build-wxbase-debug-stamp
:
163 mkdir
$(objdir_wxbase_debug
)
164 cd
$(objdir_wxbase_debug
) \
165 && ..
/configure
--prefix=/usr \
166 --cache-file
=..
/config_deb.cache \
169 --enable-burnt_name \
174 build-gtk-shared-stamp
:
176 mkdir
$(objdir_gtk_shared
)
177 cd
$(objdir_gtk_shared
) \
178 && ..
/configure
--prefix=/usr \
179 --cache-file
=..
/config_deb.cache \
182 --enable-burnt_name \
190 build-gtk-static-stamp
:
192 mkdir
$(objdir_gtk_static
)
193 cd
$(objdir_gtk_static
) \
194 && ..
/configure
--prefix=/usr \
195 --cache-file
=..
/config_deb.cache \
206 build-gtk-debug-stamp
:
208 mkdir
$(objdir_gtk_debug
)
209 cd
$(objdir_gtk_debug
) \
210 && ..
/configure
--prefix=/usr \
211 --cache-file
=..
/config_deb.cache \
215 --enable-burnt_name \
223 build-contrib-shared-stamp
: build-gtk-shared-stamp
225 cd
$(objdir_gtk_shared
)/contrib
/src \
229 build-contrib-static-stamp
: build-gtk-static-stamp
231 cd
$(objdir_gtk_static
)/contrib
/src \
235 build-gtk-py-stamp
: build-gtk-shared-stamp
239 && .
/setup.py build IN_CVS_TREE
=1
242 build-doc-stamp
: build-gtk-shared-stamp
244 cd
$(objdir_gtk_shared
)/utils
/tex2rtf
/src \
247 mkdir
$(objdir_doc_cruft
)
248 cd
$(objdir_doc_cruft
) \
249 && LD_LIBRARY_PATH
=..
/$(objdir_gtk_shared
)/lib \
250 ..
/$(objdir_gtk_shared
)/utils
/tex2rtf
/src
/tex2rtf \
251 ..
/docs
/latex
/wx
/manual.
tex ..
/$(objdir_doc
)/wxwin.htm
-twice
-html
252 cp docs
/latex
/wx
/*.gif
$(objdir_doc
)
253 rm -rf
$(objdir_doc_cruft
)
254 rm -f
$(objdir_doc
)/wxwin.con
$(objdir_doc
)/wxwin.hh
* \
255 $(objdir_doc
)/wxwin.htx
$(objdir_doc
)/wxwin.ref
258 build-examples-stamp
:
260 mkdir
$(objdir_examples
)
261 cp
-a samples
$(objdir_examples
)
262 cp
-a demos
$(objdir_examples
)
263 cp
-a wxPython
/demo
$(objdir_examples
)/wxPython
264 @for d in
$(objdir_examples
)/demos
$(objdir_examples
)/samples
; do \
266 && mv Makefile.in Makefile \
267 && rm -f configure
* \
268 && find
-name
'Makefile.in' -exec
rm -f
'{}' ';' \
269 && for f in
$$(find
-type d
); do \
270 if
[ -f
$$f/makefile.unx
]; then \
271 mv
$$f/makefile.unx
$$f/Makefile
; \
277 build-i18n-stamp
: build-gtk-shared-stamp
283 clean: debian
/control
286 rm -rf config_deb.cache control-files-stamp
$(build_stamps
) $(objdirs
)
288 cd wxPython
&& .
/setup.py
clean
290 rm -f debian
/$(package_wxbase_lib
).
*
291 rm -f debian
/$(package_wxbase_dev
).
*
292 rm -f debian
/$(package_wxbase_dbg
).
*
293 rm -f debian
/$(package_gtk_lib
).
*
294 rm -f debian
/$(package_gtk_dev
).
*
295 rm -f debian
/$(package_gtk_dbg
).
*
296 rm -f debian
/$(package_gtk_py
).
*
297 rm -f debian
/$(package_gtk_contrib
).
*
298 rm -f debian
/$(package_gtk_contrib_dev
).
*
299 rm -f debian
/$(package_headers
).
*
300 rm -f debian
/$(package_i18n
).
*
301 rm -f debian
/$(package_doc
).
*
302 rm -f debian
/$(package_examples
).
*
304 install_arch
: build_arch
$(install_all_arch
)
306 install: build
$(install_all
)
308 install-wxbase-lib
: DH_OPTIONS
=-p
$(package_wxbase_lib
)
309 install-wxbase-lib
: build-wxbase-shared-stamp
314 cp
-a
$(objdir_wxbase_shared
)/lib
/* debian
/$(package_wxbase_lib
)/usr
/lib
315 cp
$(objdir_wxbase_shared
)/wxbase-config debian
/$(package_wxbase_lib
)/usr
/bin
/
317 install-wxbase-dev
: DH_OPTIONS
=-p
$(package_wxbase_dev
)
318 install-wxbase-dev
: build-wxbase-static-stamp install-wxbase-lib
323 dh_movefiles
--sourcedir
=debian
/$(package_wxbase_lib
)
324 cp
$(objdir_wxbase_static
)/lib
/*.a debian
/$(package_wxbase_dev
)/usr
/lib
326 install-wxbase-dbg
: DH_OPTIONS
=-p
$(package_wxbase_dbg
)
327 install-wxbase-dbg
: build-wxbase-debug-stamp
332 cp
-a
$(objdir_wxbase_debug
)/lib
/* debian
/$(package_wxbase_dbg
)/usr
/lib
333 cp
$(objdir_wxbase_debug
)/wxbased-config debian
/$(package_wxbase_dbg
)/usr
/bin
/
334 cp debian
/lintian-override debian
/$(package_wxbase_dbg
)/usr
/share
/lintian
/overrides
/$(package_wxbase_dbg
)
336 install-gtk-lib
: DH_OPTIONS
=-p
$(package_gtk_lib
)
337 install-gtk-lib
: build-gtk-shared-stamp
342 cd
$(objdir_gtk_shared
) \
343 && $(MAKE
) install prefix=`pwd`/..
/debian
/$(package_gtk_lib
)/usr
344 rm -f debian
/$(package_gtk_lib
)/usr
/bin
/wx-config
346 install-gtk-dev
: DH_OPTIONS
=-p
$(package_gtk_dev
)
347 install-gtk-dev
: build-gtk-static-stamp install-gtk-lib
352 dh_movefiles
--sourcedir
=debian
/$(package_gtk_lib
)
353 cp
$(objdir_gtk_static
)/lib
/libwx_gtk
*.a debian
/$(package_gtk_dev
)/usr
/lib
355 install-gtk-dbg
: DH_OPTIONS
=-p
$(package_gtk_dbg
)
356 install-gtk-dbg
: build-gtk-debug-stamp
361 cp
-a
$(objdir_gtk_debug
)/lib
/* debian
/$(package_gtk_dbg
)/usr
/lib
362 cp
$(objdir_gtk_debug
)/wxgtkd-config debian
/$(package_gtk_dbg
)/usr
/bin
/
363 cp debian
/lintian-override debian
/$(package_gtk_dbg
)/usr
/share
/lintian
/overrides
/$(package_gtk_dbg
)
365 install-gtk-contrib
: DH_OPTIONS
=-p
$(package_gtk_contrib
)
366 install-gtk-contrib
: build-contrib-shared-stamp
371 cd
$(objdir_gtk_shared
)/contrib
/src \
372 && $(MAKE
) install prefix=`pwd`/..
/..
/..
/debian
/$(package_gtk_contrib
)/usr
374 install-gtk-contrib-dev
: DH_OPTIONS
=-p
$(package_gtk_contrib_dev
)
375 install-gtk-contrib-dev
: build-contrib-static-stamp install-gtk-dev
380 dh_movefiles
--sourcedir
=debian
/$(package_gtk_contrib
)
381 cp
$(objdir_gtk_static
)/lib
/*.a debian
/$(package_gtk_contrib_dev
)/usr
/lib
382 rm -f debian
/$(package_gtk_contrib_dev
)/usr
/lib
/libwx_gtk
*.a
384 install-gtk-py
: DH_OPTIONS
=-p
$(package_gtk_py
)
385 install-gtk-py
: build-gtk-py-stamp
391 && .
/setup.py
install --prefix=`pwd`/..
/debian
/$(package_gtk_py
)/usr
392 find debian
/$(package_gtk_py
)/usr
/lib
/$(python_dir
)/site-packages
/wxPython \
393 -name
'*.py?' -exec
rm '{}' ';'
395 install-headers
: DH_OPTIONS
=-p
$(package_headers
)
396 install-headers
: install-gtk-lib
401 dh_movefiles
--sourcedir
=debian
/$(package_gtk_lib
)
410 install-i18n
: DH_OPTIONS
=-p
$(package_i18n
)
411 install-i18n
: build-i18n-stamp install-gtk-lib
416 dh_movefiles
--sourcedir
=debian
/$(package_gtk_lib
)
418 install-doc
: DH_OPTIONS
=-p
$(package_doc
)
419 install-doc
: build-doc-stamp
425 install-examples
: DH_OPTIONS
=-p
$(package_examples
)
426 install-examples
: build-examples-stamp
433 dh_testversion
1.1.17
440 dh_strip
-N
$(package_gtk_dbg
) -N
$(package_wxbase_dbg
)
443 dh_makeshlibs
-N
$(package_gtk_py
)
445 dh_shlibdeps
-ldebian
/$(package_gtk_lib
)/usr
/lib
450 # Build architecture-independent files here.
451 # Note that you currently can't build the indep packages without first
452 # building the arch specific package files needed to create them.
453 binary-indep
: build
install
454 $(MAKE
) -f debian
/rules DH_OPTIONS
=-i binary-common
456 # Build just the architecture-dependent files here.
457 binary-arch
: build_arch install_arch
458 $(MAKE
) -f debian
/rules DH_OPTIONS
=-a binary-common
460 # Build all packages target.
461 binary
: binary-arch binary-indep
464 ############################################################################
466 # Some rules to build a subset of the complete list of packages that can be
467 # built from CVS. Beware that packages produced with these rules may *NOT*
468 # be compatible with packages built using the 'binary' target or even with
469 # Debian policy. Do not distribute packages built with these rules, they
470 # are currently useful for rapid in-house testing by developers only.
472 # libwxgtk shared lib package
473 binary-gtk
: control-files-stamp install-gtk-lib install-headers
474 $(MAKE
) -f debian
/rules DH_OPTIONS
="-p$(package_gtk_lib) -p$(package_headers)" binary-common
476 binary-gtk-dev
: control-files-stamp install-gtk-dev install-headers
477 $(MAKE
) -f debian
/rules \
478 DH_OPTIONS
="-p$(package_gtk_lib) -p$(package_gtk_dev) -p$(package_headers)" \
481 binary-gtk-dbg
: control-files-stamp install-gtk-dbg install-headers
482 $(MAKE
) -f debian
/rules DH_OPTIONS
="-p$(package_gtk_dbg) -p$(package_headers)" binary-common
484 # libwxbase shared lib package
485 binary-wxbase
: control-files-stamp install-wxbase-lib install-headers
486 $(MAKE
) -f debian
/rules DH_OPTIONS
="-p$(package_wxbase_lib) -p$(package_headers)" binary-common
488 binary-wxbase-dev
: control-files-stamp install-wxbase-dev install-headers
489 $(MAKE
) -f debian
/rules \
490 DH_OPTIONS
="-p$(package_wxbase_lib) -p$(package_wxbase_dev) -p$(package_headers)" \
493 binary-wxbase-dbg
: control-files-stamp install-wxbase-dbg install-headers
494 $(MAKE
) -f debian
/rules DH_OPTIONS
="-p$(package_wxbase_dbg) -p$(package_headers)" binary-common
497 binary-doc
: control-files-stamp install-doc
498 $(MAKE
) -f debian
/rules DH_OPTIONS
=-p
$(package_doc
) binary-common
501 .PHONY
: build build_arch
clean binary-indep binary-arch binary binary-common \
502 binary-gtk binary-gtk-dev binary-gtk-dbg binary-wxbase binary-wxbase-dev \
503 binary-wxbase-dbg binary-doc
install install_arch install-wxbase-lib \
504 install-wxbase-dev install-wxbase-dbg install-gtk-lib install-gtk-dev \
505 install-gtk-dbg install-gtk-contrib install-gtk-contrib-dev \
506 install-gtk-py install-headers install-i18n install-doc install-examples