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_wxbase_lib
=libwxbase
$(release
)
17 package_wxbase_dev
=libwxbase
$(release
)-dev
18 package_gtk_lib
=libwxgtk
$(release
)
19 package_gtk_dev
=libwxgtk
$(release
)-dev
20 package_gtk_py
=libwxgtk
$(release
)-python
21 package_doc
=wxwin
$(release
)-doc
22 package_examples
=wxwin
$(release
)-examples
25 objdir_wxbase_shared
=objs_wxbase_sh
26 objdir_wxbase_static
=objs_wxbase_st
27 objdir_gtk_shared
=objs_gtk_sh
28 objdir_gtk_static
=objs_gtk_st
29 objdir_doc_cruft
=objs_doc_con
30 objdir_doc
=docs
/wxWindows-manual.html
31 objdir_examples
=docs
/examples
32 objdirs
=$(objdir_wxbase_shared
) $(objdir_wxbase_static
) $(objdir_gtk_shared
) \
33 $(objdir_gtk_static
) $(objdir_doc
) $(objdir_examples
)
35 build_stamps
=build-wxbase-shared-stamp build-wxbase-static-stamp \
36 build-gtk-shared-stamp build-gtk-static-stamp \
37 build-gtk-python-stamp build-examples-stamp build-doc-stamp
39 wxconfig
:=$(shell pwd
)/$(objdir_gtk_shared
)/wx-config \
40 --prefix=$(shell pwd
) \
41 --exec-prefix
=$(shell pwd
)/$(objdir_gtk_shared
)
46 debian
/control
: debian
/control.in
47 sed
-e
's/=V/$(release)/g' < debian
/control.in
> debian
/control
49 debian
/wxwin-doc.doc-base
: debian
/wxwin-doc.doc-base.in
50 sed
-e
's/=V/$(release)/g' < debian
/wxwin-doc.doc-base.in
> debian
/wxwin-doc.doc-base
52 build
: debian
/control debian
/wxwin-doc.doc-base
$(build_stamps
)
54 build-wxbase-shared-stamp
:
56 mkdir
$(objdir_wxbase_shared
)
57 cd
$(objdir_wxbase_shared
) \
58 && ..
/configure
--prefix=/usr
--disable-gui
--enable-burnt_name \
62 build-wxbase-static-stamp
:
64 mkdir
$(objdir_wxbase_static
)
65 cd
$(objdir_wxbase_static
) \
66 && ..
/configure
--prefix=/usr
--disable-gui
--disable-shared \
70 build-gtk-shared-stamp
:
72 mkdir
$(objdir_gtk_shared
)
73 cd
$(objdir_gtk_shared
) \
74 && ..
/configure
--prefix=/usr
--with-gtk
--enable-burnt_name
--disable-newgrid \
78 build-gtk-static-stamp
:
80 mkdir
$(objdir_gtk_static
)
81 cd
$(objdir_gtk_static
) \
82 && ..
/configure
--prefix=/usr
--with-gtk
--disable-shared \
86 build-gtk-python-stamp
: build-gtk-shared-stamp
88 cd utils
/wxPython
/src \
89 && touch gtk
/*.
cpp gtk
/*.py \
90 && ..
/distrib
/build.py
-b WXDIR
=..
/..
/.. WXCONFIG
='$(wxconfig)'
91 cd utils
/wxPython
/modules
/html \
92 && ..
/..
/distrib
/build.py
-b WXDIR
=..
/..
/..
/.. WXCONFIG
='$(wxconfig)'
93 cd utils
/wxPython
/modules
/utils \
94 && ..
/..
/distrib
/build.py
-b WXDIR
=..
/..
/..
/.. WXCONFIG
='$(wxconfig)'
97 build-doc-stamp
: build-gtk-shared-stamp
99 cd
$(objdir_gtk_shared
)/utils
/tex2rtf
/src \
102 mkdir
$(objdir_doc_cruft
)
103 cd
$(objdir_doc_cruft
) \
104 && LD_LIBRARY_PATH
=..
/$(objdir_gtk_shared
)/lib \
105 ..
/$(objdir_gtk_shared
)/utils
/tex2rtf
/src
/tex2rtf \
106 ..
/docs
/latex
/wx
/manual.
tex ..
/$(objdir_doc
)/wxwin.htm
-twice
-html
107 cp docs
/latex
/wx
/*.gif
$(objdir_doc
)
108 rm -rf
$(objdir_doc_cruft
)
109 rm -f
$(objdir_doc
)/wxwin.con
$(objdir_doc
)/wxwin.hh
* \
110 $(objdir_doc
)/wxwin.htx
$(objdir_doc
)/wxwin.ref
113 build-examples-stamp
:
115 mkdir
$(objdir_examples
)
116 cp
-a samples
$(objdir_examples
)
117 cp
-a demos
$(objdir_examples
)
118 cp
-a utils
/wxPython
/demo
$(objdir_examples
)/wxPython
119 @for d in
$(objdir_examples
)/demos
$(objdir_examples
)/samples
; do \
121 && mv Makefile.in Makefile \
122 && rm -f configure
* \
123 && find
-name
'Makefile.in' -exec
rm -f
'{}' ';' \
124 && for f in
$$(find
-type d
); do \
125 if
[ -f
$$f/makefile.unx
]; then \
126 mv
$$f/makefile.unx
$$f/Makefile
; \
132 clean: debian
/control
135 rm -rf
$(build_stamps
) $(objdirs
)
136 -cd utils
/wxPython
/src
&& $(MAKE
) clean
137 -cd utils
/wxPython
/modules
/html
&& $(MAKE
) clean
138 -cd utils
/wxPython
/modules
/utils
&& $(MAKE
) clean
140 rm -f debian
/$(package_wxbase_lib
).
*
141 rm -f debian
/$(package_wxbase_dev
).
*
142 rm -f debian
/$(package_gtk_lib
).
*
143 rm -f debian
/$(package_gtk_dev
).
*
144 rm -f debian
/$(package_gtk_py
).
*
145 rm -f debian
/$(package_doc
).
*
146 rm -f debian
/$(package_examples
).
*
151 @for f in dirs docs files postinst
; do \
152 echo
"generating control file $(package_wxbase_lib).$$f"; \
153 cp debian
/libwxbase.
$$f debian
/$(package_wxbase_lib
).
$$f; \
155 @for f in dirs docs files links postinst prerm
; do \
156 echo
"generating control file $(package_wxbase_dev).$$f"; \
157 cp debian
/libwxbase-dev.
$$f debian
/$(package_wxbase_dev
).
$$f; \
159 @for f in dirs docs files postinst
; do \
160 echo
"generating control file $(package_gtk_lib).$$f"; \
161 cp debian
/libwxgtk.
$$f debian
/$(package_gtk_lib
).
$$f; \
163 @for f in dirs docs files links postinst prerm
; do \
164 echo
"generating control file $(package_gtk_dev).$$f"; \
165 cp debian
/libwxgtk-dev.
$$f debian
/$(package_gtk_dev
).
$$f; \
167 @for f in dirs docs files postinst prerm
; do \
168 echo
"generating control file $(package_gtk_py).$$f"; \
169 cp debian
/libwxgtk-python.
$$f debian
/$(package_gtk_py
).
$$f; \
171 @for f in dirs docs doc-base
; do \
172 echo
"generating control file $(package_doc).$$f"; \
173 cp debian
/wxwin-doc.
$$f debian
/$(package_doc
).
$$f; \
175 @for f in docs examples
; do \
176 echo
"generating control file $(package_examples).$$f"; \
177 cp debian
/wxwin-examples.
$$f debian
/$(package_examples
).
$$f; \
181 cd
$(objdir_gtk_shared
) \
182 && $(MAKE
) install prefix=`pwd`/..
/debian
/tmp
/usr
183 rm -f debian
/tmp
/usr
/bin
/wx-config
184 cp
$(objdir_gtk_static
)/lib
/*.a debian
/tmp
/usr
/lib
185 cp
-a
$(objdir_wxbase_shared
)/lib
/* debian
/tmp
/usr
/lib
186 cp
$(objdir_wxbase_shared
)/wxbase-config debian
/tmp
/usr
/bin
/
187 cp
$(objdir_wxbase_static
)/lib
/*.a debian
/tmp
/usr
/lib
188 cd utils
/wxPython
/src \
189 && ..
/distrib
/build.py
-i \
190 TARGETDIR
=..
/..
/..
/debian
/tmp
/usr
/lib
/python1.5
/site-packages
/wxPython \
191 HELPERLIBDIR
=..
/..
/..
/debian
/tmp
/usr
/lib \
193 cd utils
/wxPython
/modules
/html \
194 && ..
/..
/distrib
/build.py
-i \
195 TARGETDIR
=..
/..
/..
/..
/debian
/tmp
/usr
/lib
/python1.5
/site-packages
/wxPython \
197 cd utils
/wxPython
/modules
/utils \
198 && ..
/..
/distrib
/build.py
-i \
199 TARGETDIR
=..
/..
/..
/..
/debian
/tmp
/usr
/lib
/python1.5
/site-packages
/wxPython \
201 rm -rf debian
/tmp
/usr
/lib
/python1.5
/site-packages
/wxPython
/demo
202 find debian
/tmp
/usr
/lib
/python1.5
/site-packages
/wxPython \
203 -name
'*.py?' -exec
rm '{}' ';'
207 # Build architecture-independent files here.
208 binary-indep
: build
install
211 # Build architecture-dependent files here.
212 binary-arch
: build
install
216 dh_installmanpages
-p
$(package_gtk_dev
) \
231 dh_shlibdeps
-ldebian
/$(package_gtk_lib
)/usr
/lib
:debian
/$(package_gtk_py
)/usr
/lib
236 binary
: binary-indep binary-arch
237 .PHONY
: build
clean binary-indep binary-arch binary
install