]> git.saurik.com Git - wxWidgets.git/blame - debian/rules
wxGTK compilation fix (wxFrame::Show call without argument)
[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
8# I quite liked)
9
10#export DH_VERBOSE=1
11export DH_COMPAT=2
12
13# Change this when the release version changes and
14# touch control.in to propagate the change.
15release=2.1
16
17# These are the packages we will build
18package_gtk_lib=libwxgtk$(release)
19package_gtk_dev=libwxgtk$(release)-dev
f538864d 20package_doc=libwx$(release)-doc
e4c4c1c6
RL
21
22# Dirs to put the various builds object files in
23objdir_gtk_shared=objs_gtk_sh
24objdir_gtk_static=objs_gtk_st
25
26objdirs=$(objdir_gtk_shared) $(objdir_gtk_static)
27
f538864d 28build_stamps=build-gtk-shared-stamp build-gtk-static-stamp build-doc-stamp
e4c4c1c6
RL
29
30
31debian/control: debian/control.in
32 sed -e 's/=V/$(release)/g' < debian/control.in > debian/control
33
34build: debian/control $(build_stamps)
35
36build-gtk-shared-stamp:
37 dh_testdir
38 mkdir $(objdir_gtk_shared)
39 cd $(objdir_gtk_shared) \
40 && ../configure --prefix=/usr --with-gtk \
41 && $(MAKE)
42 touch $@
43
44build-gtk-static-stamp:
45 dh_testdir
46 mkdir $(objdir_gtk_static)
47 cd $(objdir_gtk_static) \
48 && ../configure --prefix=/usr --with-gtk --disable-shared \
49 && $(MAKE)
50 touch $@
51
f538864d
RL
52build-doc-stamp: build-gtk-shared-stamp
53 dh_testdir
54 cd $(objdir_gtk_shared)/utils/tex2rtf/src \
55 && $(MAKE) \
56 && mkdir HTML \
57 && ./tex2rtf ../../../../docs/latex/wx/manual.tex HTML/wxwin -twice -html \
58 && cp ../../../../docs/latex/wx/*.gif HTML \
59 && rm -f *.con \
60 && rm -f HTML/wxwin.con HTML/wxwin.hh* HTML/wxwin.htx HTML/wxwin.ref
61 rm -rf docs/wxWindows-manual.html
62 mv $(objdir_gtk_shared)/utils/tex2rtf/src/HTML docs/wxWindows-manual.html
63 touch $@
64
e4c4c1c6
RL
65clean: debian/control
66 dh_testdir
67 dh_testroot
f538864d
RL
68 rm -rf $(build_stamps) $(objdirs)
69 rm -rf docs/wxWindows-manual.html
e4c4c1c6 70 dh_clean
f538864d
RL
71 rm -f debian/$(package_gtk_lib).*
72 rm -f debian/$(package_gtk_dev).*
73 rm -f debian/$(package_doc).*
e4c4c1c6
RL
74
75install: build
76 @for f in dirs docs files postinst; do \
77 echo "generating control file $(package_gtk_lib).$$f"; \
78 cp debian/libwxgtk.$$f debian/$(package_gtk_lib).$$f; \
79 done;
80 @for f in dirs docs files; do \
81 echo "generating control file $(package_gtk_dev).$$f"; \
82 cp debian/libwxgtk-dev.$$f debian/$(package_gtk_dev).$$f; \
83 done;
f538864d
RL
84 @for f in dirs docs doc-base; do \
85 echo "generating control file $(package_doc).$$f"; \
86 cp debian/libwx-doc.$$f debian/$(package_doc).$$f; \
87 done;
e4c4c1c6
RL
88 dh_testdir
89 dh_testroot
90 dh_clean -k
91 dh_installdirs
92 cd $(objdir_gtk_shared) \
93 && $(MAKE) install prefix=`pwd`/../debian/tmp/usr
94 cp $(objdir_gtk_static)/lib/*.a debian/tmp/usr/lib
95 dh_movefiles
96
97
98# Build architecture-independent files here.
99binary-indep: build install
100# nothing to do.
101
102# Build architecture-dependent files here.
103binary-arch: build install
104 dh_testdir
105 dh_testroot
106 dh_installdocs
107 dh_installmanpages -p$(package_gtk_dev) \
108 ansi2knr.1 \
109 jpegtran.1 \
110 libpng.3 \
111 libpngpf.3 \
112 zlib.3 \
113 png.5
114 dh_installchangelogs
115 dh_strip
116 dh_compress
117 dh_fixperms
118 dh_makeshlibs
119 dh_installdeb
120 dh_shlibdeps
121 dh_gencontrol
122 dh_md5sums
123 dh_builddeb
124
125binary: binary-indep binary-arch
126.PHONY: build clean binary-indep binary-arch binary install