2000-02-16 15:47:08 -05:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
# debian/rules file to build packages from wxWindows CVS source
|
|
|
|
#
|
|
|
|
# Sculpted 13/2/2000 by Ron Lee <ron@debian.org> from new and
|
|
|
|
# variously stolen code :-)
|
|
|
|
# (including a debhelper template, GNU copyright 1997 to 1999 by
|
|
|
|
# Joey Hess, and some ideas found in the ncurses rules file that
|
2000-02-21 18:02:25 -05:00
|
|
|
# I quite liked. Thanks!)
|
2000-02-16 15:47:08 -05:00
|
|
|
|
|
|
|
#export DH_VERBOSE=1
|
|
|
|
export DH_COMPAT=2
|
|
|
|
|
2000-02-21 18:02:25 -05:00
|
|
|
release:=$(shell dpkg-parsechangelog | sed -n 's/^Source: wxwindows//p')
|
2000-02-16 15:47:08 -05:00
|
|
|
|
2000-02-21 18:02:25 -05:00
|
|
|
# Packages to build:
|
2000-02-23 20:15:08 -05:00
|
|
|
package_wxbase_lib=libwxbase$(release)
|
|
|
|
package_wxbase_dev=libwxbase$(release)-dev
|
2000-02-16 15:47:08 -05:00
|
|
|
package_gtk_lib=libwxgtk$(release)
|
|
|
|
package_gtk_dev=libwxgtk$(release)-dev
|
2000-02-21 18:02:25 -05:00
|
|
|
package_gtk_py=libwxgtk$(release)-python
|
|
|
|
package_doc=wxwin$(release)-doc
|
2000-02-23 20:15:08 -05:00
|
|
|
package_examples=wxwin$(release)-examples
|
2000-02-16 15:47:08 -05:00
|
|
|
|
2000-02-21 18:02:25 -05:00
|
|
|
# Build directories:
|
2000-02-23 20:15:08 -05:00
|
|
|
objdir_wxbase_shared=objs_wxbase_sh
|
|
|
|
objdir_wxbase_static=objs_wxbase_st
|
2000-02-16 15:47:08 -05:00
|
|
|
objdir_gtk_shared=objs_gtk_sh
|
|
|
|
objdir_gtk_static=objs_gtk_st
|
2000-02-21 18:02:25 -05:00
|
|
|
objdir_doc_cruft=objs_doc_con
|
|
|
|
objdir_doc=docs/wxWindows-manual.html
|
2000-02-23 20:15:08 -05:00
|
|
|
objdir_examples=docs/examples
|
|
|
|
objdirs=$(objdir_wxbase_shared) $(objdir_wxbase_static) $(objdir_gtk_shared) \
|
|
|
|
$(objdir_gtk_static) $(objdir_doc) $(objdir_examples)
|
2000-02-16 15:47:08 -05:00
|
|
|
|
2000-02-23 20:15:08 -05:00
|
|
|
build_stamps=build-wxbase-shared-stamp build-wxbase-static-stamp \
|
|
|
|
build-gtk-shared-stamp build-gtk-static-stamp \
|
|
|
|
build-gtk-python-stamp build-examples-stamp build-doc-stamp
|
2000-02-16 15:47:08 -05:00
|
|
|
|
2000-02-21 18:02:25 -05:00
|
|
|
wxconfig:=$(shell pwd)/$(objdir_gtk_shared)/wx-config \
|
|
|
|
--prefix=$(shell pwd) \
|
|
|
|
--exec-prefix=$(shell pwd)/$(objdir_gtk_shared)
|
2000-02-16 15:47:08 -05:00
|
|
|
|
|
|
|
|
2000-02-21 18:02:25 -05:00
|
|
|
# The Rules:
|
|
|
|
|
2000-02-16 15:47:08 -05:00
|
|
|
debian/control: debian/control.in
|
|
|
|
sed -e 's/=V/$(release)/g' < debian/control.in > debian/control
|
|
|
|
|
2000-02-21 18:02:25 -05:00
|
|
|
debian/wxwin-doc.doc-base: debian/wxwin-doc.doc-base.in
|
|
|
|
sed -e 's/=V/$(release)/g' < debian/wxwin-doc.doc-base.in > debian/wxwin-doc.doc-base
|
|
|
|
|
|
|
|
build: debian/control debian/wxwin-doc.doc-base $(build_stamps)
|
2000-02-16 15:47:08 -05:00
|
|
|
|
2000-02-23 20:15:08 -05:00
|
|
|
build-wxbase-shared-stamp:
|
|
|
|
dh_testdir
|
|
|
|
mkdir $(objdir_wxbase_shared)
|
|
|
|
cd $(objdir_wxbase_shared) \
|
|
|
|
&& ../configure --prefix=/usr --disable-gui --enable-burnt_name \
|
|
|
|
&& $(MAKE)
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
build-wxbase-static-stamp:
|
|
|
|
dh_testdir
|
|
|
|
mkdir $(objdir_wxbase_static)
|
|
|
|
cd $(objdir_wxbase_static) \
|
|
|
|
&& ../configure --prefix=/usr --disable-gui --disable-shared \
|
|
|
|
&& $(MAKE)
|
|
|
|
touch $@
|
|
|
|
|
2000-02-16 15:47:08 -05:00
|
|
|
build-gtk-shared-stamp:
|
|
|
|
dh_testdir
|
|
|
|
mkdir $(objdir_gtk_shared)
|
|
|
|
cd $(objdir_gtk_shared) \
|
2000-02-21 18:02:25 -05:00
|
|
|
&& ../configure --prefix=/usr --with-gtk --enable-burnt_name --disable-newgrid \
|
2000-02-16 15:47:08 -05:00
|
|
|
&& $(MAKE)
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
build-gtk-static-stamp:
|
|
|
|
dh_testdir
|
|
|
|
mkdir $(objdir_gtk_static)
|
|
|
|
cd $(objdir_gtk_static) \
|
|
|
|
&& ../configure --prefix=/usr --with-gtk --disable-shared \
|
|
|
|
&& $(MAKE)
|
|
|
|
touch $@
|
|
|
|
|
2000-02-21 18:02:25 -05:00
|
|
|
build-gtk-python-stamp: build-gtk-shared-stamp
|
|
|
|
dh_testdir
|
|
|
|
cd utils/wxPython/src \
|
|
|
|
&& touch gtk/*.cpp gtk/*.py \
|
|
|
|
&& ../distrib/build.py -b WXDIR=../../.. WXCONFIG='$(wxconfig)'
|
|
|
|
cd utils/wxPython/modules/html \
|
|
|
|
&& ../../distrib/build.py -b WXDIR=../../../.. WXCONFIG='$(wxconfig)'
|
|
|
|
cd utils/wxPython/modules/utils \
|
|
|
|
&& ../../distrib/build.py -b WXDIR=../../../.. WXCONFIG='$(wxconfig)'
|
|
|
|
touch $@
|
|
|
|
|
2000-02-17 14:07:25 -05:00
|
|
|
build-doc-stamp: build-gtk-shared-stamp
|
|
|
|
dh_testdir
|
|
|
|
cd $(objdir_gtk_shared)/utils/tex2rtf/src \
|
2000-02-21 18:02:25 -05:00
|
|
|
&& $(MAKE)
|
|
|
|
mkdir $(objdir_doc)
|
|
|
|
mkdir $(objdir_doc_cruft)
|
|
|
|
cd $(objdir_doc_cruft) \
|
|
|
|
&& LD_LIBRARY_PATH=../$(objdir_gtk_shared)/lib \
|
|
|
|
../$(objdir_gtk_shared)/utils/tex2rtf/src/tex2rtf \
|
2000-02-23 20:15:08 -05:00
|
|
|
../docs/latex/wx/manual.tex ../$(objdir_doc)/wxwin.htm -twice -html
|
2000-02-21 18:02:25 -05:00
|
|
|
cp docs/latex/wx/*.gif $(objdir_doc)
|
|
|
|
rm -rf $(objdir_doc_cruft)
|
|
|
|
rm -f $(objdir_doc)/wxwin.con $(objdir_doc)/wxwin.hh* \
|
|
|
|
$(objdir_doc)/wxwin.htx $(objdir_doc)/wxwin.ref
|
2000-02-17 14:07:25 -05:00
|
|
|
touch $@
|
|
|
|
|
2000-02-23 20:15:08 -05:00
|
|
|
build-examples-stamp:
|
|
|
|
dh_testdir
|
|
|
|
mkdir $(objdir_examples)
|
|
|
|
cp -a samples $(objdir_examples)
|
|
|
|
cp -a demos $(objdir_examples)
|
|
|
|
cp -a utils/wxPython/demo $(objdir_examples)/wxPython
|
|
|
|
@for d in $(objdir_examples)/demos $(objdir_examples)/samples; do \
|
|
|
|
(cd $$d \
|
|
|
|
&& mv Makefile.in Makefile \
|
|
|
|
&& rm -f configure* \
|
|
|
|
&& find -name 'Makefile.in' -exec rm -f '{}' ';' \
|
|
|
|
&& for f in $$(find -type d); do \
|
|
|
|
if [ -f $$f/makefile.unx ]; then \
|
|
|
|
mv $$f/makefile.unx $$f/Makefile; \
|
|
|
|
fi; \
|
|
|
|
done) \
|
|
|
|
done;
|
|
|
|
touch $@
|
|
|
|
|
2000-02-16 15:47:08 -05:00
|
|
|
clean: debian/control
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2000-02-17 14:07:25 -05:00
|
|
|
rm -rf $(build_stamps) $(objdirs)
|
2000-02-21 18:02:25 -05:00
|
|
|
-cd utils/wxPython/src && $(MAKE) clean
|
|
|
|
-cd utils/wxPython/modules/html && $(MAKE) clean
|
|
|
|
-cd utils/wxPython/modules/utils && $(MAKE) clean
|
2000-02-16 15:47:08 -05:00
|
|
|
dh_clean
|
2000-02-23 20:15:08 -05:00
|
|
|
rm -f debian/$(package_wxbase_lib).*
|
|
|
|
rm -f debian/$(package_wxbase_dev).*
|
2000-02-17 14:07:25 -05:00
|
|
|
rm -f debian/$(package_gtk_lib).*
|
|
|
|
rm -f debian/$(package_gtk_dev).*
|
2000-02-21 18:02:25 -05:00
|
|
|
rm -f debian/$(package_gtk_py).*
|
2000-02-17 14:07:25 -05:00
|
|
|
rm -f debian/$(package_doc).*
|
2000-02-23 20:15:08 -05:00
|
|
|
rm -f debian/$(package_examples).*
|
2000-02-16 15:47:08 -05:00
|
|
|
|
|
|
|
install: build
|
2000-02-21 18:02:25 -05:00
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2000-02-23 20:15:08 -05:00
|
|
|
@for f in dirs docs files postinst; do \
|
|
|
|
echo "generating control file $(package_wxbase_lib).$$f"; \
|
|
|
|
cp debian/libwxbase.$$f debian/$(package_wxbase_lib).$$f; \
|
|
|
|
done;
|
2000-02-24 07:20:22 -05:00
|
|
|
@for f in dirs docs files links postinst prerm; do \
|
2000-02-23 20:15:08 -05:00
|
|
|
echo "generating control file $(package_wxbase_dev).$$f"; \
|
|
|
|
cp debian/libwxbase-dev.$$f debian/$(package_wxbase_dev).$$f; \
|
|
|
|
done;
|
2000-02-16 15:47:08 -05:00
|
|
|
@for f in dirs docs files postinst; do \
|
|
|
|
echo "generating control file $(package_gtk_lib).$$f"; \
|
|
|
|
cp debian/libwxgtk.$$f debian/$(package_gtk_lib).$$f; \
|
|
|
|
done;
|
2000-02-24 07:20:22 -05:00
|
|
|
@for f in dirs docs files links postinst prerm; do \
|
2000-02-16 15:47:08 -05:00
|
|
|
echo "generating control file $(package_gtk_dev).$$f"; \
|
|
|
|
cp debian/libwxgtk-dev.$$f debian/$(package_gtk_dev).$$f; \
|
|
|
|
done;
|
2000-02-21 18:02:25 -05:00
|
|
|
@for f in dirs docs files postinst prerm; do \
|
|
|
|
echo "generating control file $(package_gtk_py).$$f"; \
|
|
|
|
cp debian/libwxgtk-python.$$f debian/$(package_gtk_py).$$f; \
|
|
|
|
done;
|
2000-02-17 14:07:25 -05:00
|
|
|
@for f in dirs docs doc-base; do \
|
|
|
|
echo "generating control file $(package_doc).$$f"; \
|
2000-02-21 18:02:25 -05:00
|
|
|
cp debian/wxwin-doc.$$f debian/$(package_doc).$$f; \
|
2000-02-17 14:07:25 -05:00
|
|
|
done;
|
2000-02-23 20:15:08 -05:00
|
|
|
@for f in docs examples; do \
|
|
|
|
echo "generating control file $(package_examples).$$f"; \
|
|
|
|
cp debian/wxwin-examples.$$f debian/$(package_examples).$$f; \
|
|
|
|
done;
|
2000-02-16 15:47:08 -05:00
|
|
|
dh_clean -k
|
|
|
|
dh_installdirs
|
|
|
|
cd $(objdir_gtk_shared) \
|
|
|
|
&& $(MAKE) install prefix=`pwd`/../debian/tmp/usr
|
2000-02-24 07:20:22 -05:00
|
|
|
rm -f debian/tmp/usr/bin/wx-config
|
2000-02-16 15:47:08 -05:00
|
|
|
cp $(objdir_gtk_static)/lib/*.a debian/tmp/usr/lib
|
2000-02-23 20:15:08 -05:00
|
|
|
cp -a $(objdir_wxbase_shared)/lib/* debian/tmp/usr/lib
|
2000-02-24 07:20:22 -05:00
|
|
|
cp $(objdir_wxbase_shared)/wxbase-config debian/tmp/usr/bin/
|
2000-02-23 20:15:08 -05:00
|
|
|
cp $(objdir_wxbase_static)/lib/*.a debian/tmp/usr/lib
|
2000-02-21 18:02:25 -05:00
|
|
|
cd utils/wxPython/src \
|
|
|
|
&& ../distrib/build.py -i \
|
|
|
|
TARGETDIR=../../../debian/tmp/usr/lib/python1.5/site-packages/wxPython \
|
|
|
|
HELPERLIBDIR=../../../debian/tmp/usr/lib \
|
|
|
|
WXDIR=../../..
|
|
|
|
cd utils/wxPython/modules/html \
|
|
|
|
&& ../../distrib/build.py -i \
|
|
|
|
TARGETDIR=../../../../debian/tmp/usr/lib/python1.5/site-packages/wxPython \
|
|
|
|
WXDIR=../../../..
|
|
|
|
cd utils/wxPython/modules/utils \
|
|
|
|
&& ../../distrib/build.py -i \
|
|
|
|
TARGETDIR=../../../../debian/tmp/usr/lib/python1.5/site-packages/wxPython \
|
|
|
|
WXDIR=../../../..
|
2000-02-23 20:15:08 -05:00
|
|
|
rm -rf debian/tmp/usr/lib/python1.5/site-packages/wxPython/demo
|
2000-02-21 18:02:25 -05:00
|
|
|
find debian/tmp/usr/lib/python1.5/site-packages/wxPython \
|
|
|
|
-name '*.py?' -exec rm '{}' ';'
|
2000-02-16 15:47:08 -05:00
|
|
|
dh_movefiles
|
|
|
|
|
|
|
|
|
|
|
|
# Build architecture-independent files here.
|
|
|
|
binary-indep: build install
|
|
|
|
# nothing to do.
|
|
|
|
|
|
|
|
# Build architecture-dependent files here.
|
|
|
|
binary-arch: build install
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_installdocs
|
|
|
|
dh_installmanpages -p$(package_gtk_dev) \
|
|
|
|
ansi2knr.1 \
|
|
|
|
jpegtran.1 \
|
|
|
|
libpng.3 \
|
|
|
|
libpngpf.3 \
|
|
|
|
zlib.3 \
|
|
|
|
png.5
|
2000-02-23 20:15:08 -05:00
|
|
|
dh_installchangelogs
|
|
|
|
dh_installexamples
|
|
|
|
dh_link
|
2000-02-16 15:47:08 -05:00
|
|
|
dh_strip
|
|
|
|
dh_compress
|
|
|
|
dh_fixperms
|
|
|
|
dh_makeshlibs
|
|
|
|
dh_installdeb
|
2000-02-21 18:02:25 -05:00
|
|
|
dh_shlibdeps -ldebian/$(package_gtk_lib)/usr/lib:debian/$(package_gtk_py)/usr/lib
|
2000-02-16 15:47:08 -05:00
|
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
|
|
|
dh_builddeb
|
|
|
|
|
|
|
|
binary: binary-indep binary-arch
|
|
|
|
.PHONY: build clean binary-indep binary-arch binary install
|