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 # (including a debhelper template, GNU copyright 1997 to 1999 by
7 # Joey Hess, and some ideas found in the ncurses rules file that
8 # I quite liked. Thanks!)
13 release
:=$(shell dpkg-parsechangelog | sed
-n
's/^Source: wxwindows//p')
16 package_gtk_lib
=libwxgtk
$(release
)
17 package_gtk_dev
=libwxgtk
$(release
)-dev
18 package_gtk_py
=libwxgtk
$(release
)-python
19 package_doc
=wxwin
$(release
)-doc
22 objdir_gtk_shared
=objs_gtk_sh
23 objdir_gtk_static
=objs_gtk_st
24 objdir_doc_cruft
=objs_doc_con
25 objdir_doc
=docs
/wxWindows-manual.html
26 objdirs
=$(objdir_gtk_shared
) $(objdir_gtk_static
) $(objdir_doc
)
28 build_stamps
=build-gtk-shared-stamp build-gtk-static-stamp \
29 build-gtk-python-stamp build-doc-stamp
31 wxconfig
:=$(shell pwd
)/$(objdir_gtk_shared
)/wx-config \
32 --prefix=$(shell pwd
) \
33 --exec-prefix
=$(shell pwd
)/$(objdir_gtk_shared
)
38 debian
/control
: debian
/control.in
39 sed
-e
's/=V/$(release)/g' < debian
/control.in
> debian
/control
41 debian
/wxwin-doc.doc-base
: debian
/wxwin-doc.doc-base.in
42 sed
-e
's/=V/$(release)/g' < debian
/wxwin-doc.doc-base.in
> debian
/wxwin-doc.doc-base
44 build
: debian
/control debian
/wxwin-doc.doc-base
$(build_stamps
)
46 build-gtk-shared-stamp
:
48 mkdir
$(objdir_gtk_shared
)
49 cd
$(objdir_gtk_shared
) \
50 && ..
/configure
--prefix=/usr
--with-gtk
--enable-burnt_name
--disable-newgrid \
54 build-gtk-static-stamp
:
56 mkdir
$(objdir_gtk_static
)
57 cd
$(objdir_gtk_static
) \
58 && ..
/configure
--prefix=/usr
--with-gtk
--disable-shared \
62 build-gtk-python-stamp
: build-gtk-shared-stamp
64 cd utils
/wxPython
/src \
65 && touch gtk
/*.
cpp gtk
/*.py \
66 && ..
/distrib
/build.py
-b WXDIR
=..
/..
/.. WXCONFIG
='$(wxconfig)'
67 cd utils
/wxPython
/modules
/html \
68 && ..
/..
/distrib
/build.py
-b WXDIR
=..
/..
/..
/.. WXCONFIG
='$(wxconfig)'
69 cd utils
/wxPython
/modules
/utils \
70 && ..
/..
/distrib
/build.py
-b WXDIR
=..
/..
/..
/.. WXCONFIG
='$(wxconfig)'
73 build-doc-stamp
: build-gtk-shared-stamp
75 cd
$(objdir_gtk_shared
)/utils
/tex2rtf
/src \
78 mkdir
$(objdir_doc_cruft
)
79 cd
$(objdir_doc_cruft
) \
80 && LD_LIBRARY_PATH
=..
/$(objdir_gtk_shared
)/lib \
81 ..
/$(objdir_gtk_shared
)/utils
/tex2rtf
/src
/tex2rtf \
82 ..
/docs
/latex
/wx
/manual.
tex ..
/$(objdir_doc
)/wxwin
-twice
-html
83 cp docs
/latex
/wx
/*.gif
$(objdir_doc
)
84 rm -rf
$(objdir_doc_cruft
)
85 rm -f
$(objdir_doc
)/wxwin.con
$(objdir_doc
)/wxwin.hh
* \
86 $(objdir_doc
)/wxwin.htx
$(objdir_doc
)/wxwin.ref
92 rm -rf
$(build_stamps
) $(objdirs
)
93 -cd utils
/wxPython
/src
&& $(MAKE
) clean
94 -cd utils
/wxPython
/modules
/html
&& $(MAKE
) clean
95 -cd utils
/wxPython
/modules
/utils
&& $(MAKE
) clean
97 rm -f debian
/$(package_gtk_lib
).
*
98 rm -f debian
/$(package_gtk_dev
).
*
99 rm -f debian
/$(package_gtk_py
).
*
100 rm -f debian
/$(package_doc
).
*
105 @for f in dirs docs files postinst
; do \
106 echo
"generating control file $(package_gtk_lib).$$f"; \
107 cp debian
/libwxgtk.
$$f debian
/$(package_gtk_lib
).
$$f; \
109 @for f in dirs docs files
; do \
110 echo
"generating control file $(package_gtk_dev).$$f"; \
111 cp debian
/libwxgtk-dev.
$$f debian
/$(package_gtk_dev
).
$$f; \
113 @for f in dirs docs files postinst prerm
; do \
114 echo
"generating control file $(package_gtk_py).$$f"; \
115 cp debian
/libwxgtk-python.
$$f debian
/$(package_gtk_py
).
$$f; \
117 @for f in dirs docs doc-base
; do \
118 echo
"generating control file $(package_doc).$$f"; \
119 cp debian
/wxwin-doc.
$$f debian
/$(package_doc
).
$$f; \
123 cd
$(objdir_gtk_shared
) \
124 && $(MAKE
) install prefix=`pwd`/..
/debian
/tmp
/usr
125 cp
$(objdir_gtk_static
)/lib
/*.a debian
/tmp
/usr
/lib
126 cd utils
/wxPython
/src \
127 && ..
/distrib
/build.py
-i \
128 TARGETDIR
=..
/..
/..
/debian
/tmp
/usr
/lib
/python1.5
/site-packages
/wxPython \
129 HELPERLIBDIR
=..
/..
/..
/debian
/tmp
/usr
/lib \
131 cd utils
/wxPython
/modules
/html \
132 && ..
/..
/distrib
/build.py
-i \
133 TARGETDIR
=..
/..
/..
/..
/debian
/tmp
/usr
/lib
/python1.5
/site-packages
/wxPython \
135 cd utils
/wxPython
/modules
/utils \
136 && ..
/..
/distrib
/build.py
-i \
137 TARGETDIR
=..
/..
/..
/..
/debian
/tmp
/usr
/lib
/python1.5
/site-packages
/wxPython \
139 find debian
/tmp
/usr
/lib
/python1.5
/site-packages
/wxPython \
140 -name
'*.py?' -exec
rm '{}' ';'
144 # Build architecture-independent files here.
145 binary-indep
: build
install
148 # Build architecture-dependent files here.
149 binary-arch
: build
install
153 dh_installmanpages
-p
$(package_gtk_dev
) \
166 dh_shlibdeps
-ldebian
/$(package_gtk_lib
)/usr
/lib
:debian
/$(package_gtk_py
)/usr
/lib
171 binary
: binary-indep binary-arch
172 .PHONY
: build
clean binary-indep binary-arch binary
install