]> git.saurik.com Git - wxWidgets.git/blob - debian/rules
removed saveValue param in EndEdit()
[wxWidgets.git] / debian / rules
1 #!/usr/bin/make -f
2 # debian/rules file to build packages from wxWindows CVS source
3 #
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!)
9
10 #export DH_VERBOSE=1
11 export DH_COMPAT=2
12
13 release:=$(shell dpkg-parsechangelog | sed -n 's/^Source: wxwindows//p')
14
15 # Packages to build:
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
20
21 # Build directories:
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)
27
28 build_stamps=build-gtk-shared-stamp build-gtk-static-stamp \
29 build-gtk-python-stamp build-doc-stamp
30
31 wxconfig:=$(shell pwd)/$(objdir_gtk_shared)/wx-config \
32 --prefix=$(shell pwd) \
33 --exec-prefix=$(shell pwd)/$(objdir_gtk_shared)
34
35
36 # The Rules:
37
38 debian/control: debian/control.in
39 sed -e 's/=V/$(release)/g' < debian/control.in > debian/control
40
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
43
44 build: debian/control debian/wxwin-doc.doc-base $(build_stamps)
45
46 build-gtk-shared-stamp:
47 dh_testdir
48 mkdir $(objdir_gtk_shared)
49 cd $(objdir_gtk_shared) \
50 && ../configure --prefix=/usr --with-gtk --enable-burnt_name --disable-newgrid \
51 && $(MAKE)
52 touch $@
53
54 build-gtk-static-stamp:
55 dh_testdir
56 mkdir $(objdir_gtk_static)
57 cd $(objdir_gtk_static) \
58 && ../configure --prefix=/usr --with-gtk --disable-shared \
59 && $(MAKE)
60 touch $@
61
62 build-gtk-python-stamp: build-gtk-shared-stamp
63 dh_testdir
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)'
71 touch $@
72
73 build-doc-stamp: build-gtk-shared-stamp
74 dh_testdir
75 cd $(objdir_gtk_shared)/utils/tex2rtf/src \
76 && $(MAKE)
77 mkdir $(objdir_doc)
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
87 touch $@
88
89 clean: debian/control
90 dh_testdir
91 dh_testroot
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
96 dh_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).*
101
102 install: build
103 dh_testdir
104 dh_testroot
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; \
108 done;
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; \
112 done;
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; \
116 done;
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; \
120 done;
121 dh_clean -k
122 dh_installdirs
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 \
130 WXDIR=../../..
131 cd utils/wxPython/modules/html \
132 && ../../distrib/build.py -i \
133 TARGETDIR=../../../../debian/tmp/usr/lib/python1.5/site-packages/wxPython \
134 WXDIR=../../../..
135 cd utils/wxPython/modules/utils \
136 && ../../distrib/build.py -i \
137 TARGETDIR=../../../../debian/tmp/usr/lib/python1.5/site-packages/wxPython \
138 WXDIR=../../../..
139 find debian/tmp/usr/lib/python1.5/site-packages/wxPython \
140 -name '*.py?' -exec rm '{}' ';'
141 dh_movefiles
142
143
144 # Build architecture-independent files here.
145 binary-indep: build install
146 # nothing to do.
147
148 # Build architecture-dependent files here.
149 binary-arch: build install
150 dh_testdir
151 dh_testroot
152 dh_installdocs
153 dh_installmanpages -p$(package_gtk_dev) \
154 ansi2knr.1 \
155 jpegtran.1 \
156 libpng.3 \
157 libpngpf.3 \
158 zlib.3 \
159 png.5
160 dh_installchangelogs
161 dh_strip
162 dh_compress
163 dh_fixperms
164 dh_makeshlibs
165 dh_installdeb
166 dh_shlibdeps -ldebian/$(package_gtk_lib)/usr/lib:debian/$(package_gtk_py)/usr/lib
167 dh_gencontrol
168 dh_md5sums
169 dh_builddeb
170
171 binary: binary-indep binary-arch
172 .PHONY: build clean binary-indep binary-arch binary install