]> git.saurik.com Git - wxWidgets.git/blame - debian/rules
SetSelection() in wxNotebook now sets the focus,
[wxWidgets.git] / debian / rules
CommitLineData
e4c4c1c6
RL
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
e0a4aa8a 8# I quite liked. Thanks!)
e4c4c1c6
RL
9
10#export DH_VERBOSE=1
11export DH_COMPAT=2
12
e0a4aa8a 13release:=$(shell dpkg-parsechangelog | sed -n 's/^Source: wxwindows//p')
e4c4c1c6 14
e0a4aa8a 15# Packages to build:
e4c4c1c6
RL
16package_gtk_lib=libwxgtk$(release)
17package_gtk_dev=libwxgtk$(release)-dev
e0a4aa8a
RL
18package_gtk_py=libwxgtk$(release)-python
19package_doc=wxwin$(release)-doc
e4c4c1c6 20
e0a4aa8a 21# Build directories:
e4c4c1c6
RL
22objdir_gtk_shared=objs_gtk_sh
23objdir_gtk_static=objs_gtk_st
e0a4aa8a
RL
24objdir_doc_cruft=objs_doc_con
25objdir_doc=docs/wxWindows-manual.html
26objdirs=$(objdir_gtk_shared) $(objdir_gtk_static) $(objdir_doc)
e4c4c1c6 27
e0a4aa8a
RL
28build_stamps=build-gtk-shared-stamp build-gtk-static-stamp \
29 build-gtk-python-stamp build-doc-stamp
e4c4c1c6 30
e0a4aa8a
RL
31wxconfig:=$(shell pwd)/$(objdir_gtk_shared)/wx-config \
32 --prefix=$(shell pwd) \
33 --exec-prefix=$(shell pwd)/$(objdir_gtk_shared)
e4c4c1c6
RL
34
35
e0a4aa8a
RL
36# The Rules:
37
e4c4c1c6
RL
38debian/control: debian/control.in
39 sed -e 's/=V/$(release)/g' < debian/control.in > debian/control
40
e0a4aa8a
RL
41debian/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
44build: debian/control debian/wxwin-doc.doc-base $(build_stamps)
e4c4c1c6
RL
45
46build-gtk-shared-stamp:
47 dh_testdir
48 mkdir $(objdir_gtk_shared)
49 cd $(objdir_gtk_shared) \
e0a4aa8a 50 && ../configure --prefix=/usr --with-gtk --enable-burnt_name --disable-newgrid \
e4c4c1c6
RL
51 && $(MAKE)
52 touch $@
53
54build-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
e0a4aa8a
RL
62build-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
f538864d
RL
73build-doc-stamp: build-gtk-shared-stamp
74 dh_testdir
75 cd $(objdir_gtk_shared)/utils/tex2rtf/src \
e0a4aa8a
RL
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
f538864d
RL
87 touch $@
88
e4c4c1c6
RL
89clean: debian/control
90 dh_testdir
91 dh_testroot
f538864d 92 rm -rf $(build_stamps) $(objdirs)
e0a4aa8a
RL
93 -cd utils/wxPython/src && $(MAKE) clean
94 -cd utils/wxPython/modules/html && $(MAKE) clean
95 -cd utils/wxPython/modules/utils && $(MAKE) clean
e4c4c1c6 96 dh_clean
f538864d
RL
97 rm -f debian/$(package_gtk_lib).*
98 rm -f debian/$(package_gtk_dev).*
e0a4aa8a 99 rm -f debian/$(package_gtk_py).*
f538864d 100 rm -f debian/$(package_doc).*
e4c4c1c6
RL
101
102install: build
e0a4aa8a
RL
103 dh_testdir
104 dh_testroot
e4c4c1c6
RL
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;
e0a4aa8a
RL
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;
f538864d
RL
117 @for f in dirs docs doc-base; do \
118 echo "generating control file $(package_doc).$$f"; \
e0a4aa8a 119 cp debian/wxwin-doc.$$f debian/$(package_doc).$$f; \
f538864d 120 done;
e4c4c1c6
RL
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
e0a4aa8a
RL
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 '{}' ';'
e4c4c1c6
RL
141 dh_movefiles
142
143
144# Build architecture-independent files here.
145binary-indep: build install
146# nothing to do.
147
148# Build architecture-dependent files here.
149binary-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
e0a4aa8a 166 dh_shlibdeps -ldebian/$(package_gtk_lib)/usr/lib:debian/$(package_gtk_py)/usr/lib
e4c4c1c6
RL
167 dh_gencontrol
168 dh_md5sums
169 dh_builddeb
170
171binary: binary-indep binary-arch
172.PHONY: build clean binary-indep binary-arch binary install