added python-contrib package.

optimised use of configure cache.
determine python install dir automatically.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ron Lee
2000-09-24 14:52:31 +00:00
parent 68f73e7b18
commit 99aa2d72c7
11 changed files with 116 additions and 19 deletions

4
debian/changelog vendored
View File

@@ -1,6 +1,10 @@
wxwindows2.2 (2.2.2) unstable; urgency=low wxwindows2.2 (2.2.2) unstable; urgency=low
* added missing dependancy for contrib-dev package. Closes: #70880 * added missing dependancy for contrib-dev package. Closes: #70880
* by popular demand, added a package with the python-contrib libs.
* more tweaks to deb/rules. autodetect the python install location,
and cache the results of configure tests for all packages.
* and of course a whole stack of minor fixes in the main codebase too.
-- Ron Lee <ron@microtronics.com.au> Tue, 5 Sep 2000 18:51:24 +0930 -- Ron Lee <ron@microtronics.com.au> Tue, 5 Sep 2000 18:51:24 +0930

11
debian/control.in vendored
View File

@@ -122,6 +122,17 @@ Description: wxWindows Cross-platform C++ GUI toolkit (Python binding)
. .
This package provides a Python binding to the wxGTK library. This package provides a Python binding to the wxGTK library.
Package: libwxgtk=V-python-contrib
Architecture: any
Section: interpreters
Depends: libwxgtk=V-python (= ${Source-Version}), libwxgtk=V-contrib (= ${Source-Version}), ${shlibs:Depends}
Description: wxWindows Cross-platform C++ GUI toolkit (Python binding)
wxWindows is a class library for C++ providing GUI (Graphical User
Interface) and other facilities on more than one platform. Version =V
currently supports subsets of GTK+, Motif, and MS Windows.
.
This package provides Python bindings to the wxGTK contrib libs.
Package: libwxgtk=V-contrib Package: libwxgtk=V-contrib
Architecture: any Architecture: any
Section: libs Section: libs

2
debian/libwxgtk-python-contrib.dirs vendored Normal file
View File

@@ -0,0 +1,2 @@
usr/lib/=PY/site-packages/wxPython

2
debian/libwxgtk-python-contrib.files vendored Normal file
View File

@@ -0,0 +1,2 @@
usr/lib/=PY/site-packages/wxPython

13
debian/libwxgtk-python-contrib.postinst vendored Normal file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
set -e
WXPYTHONDIR="/usr/lib/=PY/site-packages/wxPython"
if [ "$1" = "configure" ]; then
python /usr/lib/=PY/compileall.py -q ${WXPYTHONDIR}
python -O /usr/lib/=PY/compileall.py -q ${WXPYTHONDIR}
fi
#DEBHELPER#

13
debian/libwxgtk-python-contrib.prerm vendored Normal file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
set -e
PACKAGE="libwxgtk=V-python-contrib"
dpkg --listfiles $PACKAGE |
awk '$0~/\.py$/ {print $0"c\n" $0"o"}' |
xargs rm -f >&2
#DEBHELPER#

View File

@@ -1 +1,2 @@
usr/lib/python1.5/site-packages/wxPython/lib/sizers usr/lib/=PY/site-packages/wxPython/lib/sizers

View File

@@ -1,4 +1,4 @@
usr/lib/python1.5/site-packages/wxPython usr/lib/=PY/site-packages/wxPython
usr/lib/libwxPyHelpers*.so usr/lib/libwxPyHelpers*.so
usr/lib/libwxPyHelpers*.so.* usr/lib/libwxPyHelpers*.so.*

View File

@@ -2,11 +2,11 @@
set -e set -e
WXPYTHONDIR="/usr/lib/python1.5/site-packages/wxPython" WXPYTHONDIR="/usr/lib/=PY/site-packages/wxPython"
if [ "$1" = "configure" ]; then if [ "$1" = "configure" ]; then
python /usr/lib/python1.5/compileall.py -q ${WXPYTHONDIR} python /usr/lib/=PY/compileall.py -q ${WXPYTHONDIR}
python -O /usr/lib/python1.5/compileall.py -q ${WXPYTHONDIR} python -O /usr/lib/=PY/compileall.py -q ${WXPYTHONDIR}
ldconfig ldconfig
fi fi

View File

@@ -2,8 +2,12 @@
set -e set -e
WXPYTHONDIR="/usr/lib/python1.5/site-packages/wxPython" PACKAGE="libwxgtk=V-python"
find ${WXPYTHONDIR} -name "*.py?" -exec rm -f {} \;
dpkg --listfiles $PACKAGE |
awk '$0~/\.py$/ {print $0"c\n" $0"o"}' |
xargs rm -f >&2
#DEBHELPER# #DEBHELPER#

71
debian/rules vendored
View File

@@ -11,6 +11,7 @@ export DH_COMPAT=2
export DH_OPTIONS export DH_OPTIONS
release:=$(shell dpkg-parsechangelog | sed -n 's/^Source: wxwindows//p') release:=$(shell dpkg-parsechangelog | sed -n 's/^Source: wxwindows//p')
python_dir:=python$(shell python -c "import sys;print sys.version[:3]")
# Packages to build: # Packages to build:
package_wxbase_lib=libwxbase$(release) package_wxbase_lib=libwxbase$(release)
@@ -22,6 +23,7 @@ package_gtk_dbg=libwxgtk$(release)-dbg
package_gtk_py=libwxgtk$(release)-python package_gtk_py=libwxgtk$(release)-python
package_gtk_contrib=libwxgtk$(release)-contrib package_gtk_contrib=libwxgtk$(release)-contrib
package_gtk_contrib_dev=libwxgtk$(release)-contrib-dev package_gtk_contrib_dev=libwxgtk$(release)-contrib-dev
package_gtk_py_contrib=libwxgtk$(release)-python-contrib
package_headers=wxwin$(release)-headers package_headers=wxwin$(release)-headers
package_i18n=wxwin$(release)-i18n package_i18n=wxwin$(release)-i18n
package_doc=wxwin$(release)-doc package_doc=wxwin$(release)-doc
@@ -46,13 +48,14 @@ build_stamps=build-wxbase-shared-stamp build-wxbase-static-stamp \
build-wxbase-debug-stamp build-gtk-shared-stamp \ build-wxbase-debug-stamp build-gtk-shared-stamp \
build-gtk-static-stamp build-gtk-debug-stamp \ build-gtk-static-stamp build-gtk-debug-stamp \
build-contrib-shared-stamp build-contrib-static-stamp \ build-contrib-shared-stamp build-contrib-static-stamp \
build-gtk-python-stamp build-examples-stamp build-doc-stamp \ build-gtk-py-stamp build-gtk-py-contrib-stamp \
build-i18n-stamp build-examples-stamp build-doc-stamp build-i18n-stamp
install_all=install-wxbase-lib install-wxbase-dev install-wxbase-dbg \ install_all=install-wxbase-lib install-wxbase-dev install-wxbase-dbg \
install-gtk-lib install-gtk-dev install-gtk-dbg \ install-gtk-lib install-gtk-dev install-gtk-dbg \
install-gtk-contrib install-gtk-contrib-dev install-gtk-py \ install-gtk-contrib install-gtk-contrib-dev install-gtk-py \
install-headers install-i18n install-doc install-examples install-gtk-py-contrib install-headers install-i18n install-doc \
install-examples
wxconfig:=$(shell pwd)/$(objdir_gtk_shared)/wx-config \ wxconfig:=$(shell pwd)/$(objdir_gtk_shared)/wx-config \
--prefix=$(shell pwd) \ --prefix=$(shell pwd) \
@@ -95,7 +98,13 @@ control-files-stamp: debian/control debian/wxwin-doc.doc-base
done; done;
@for f in dirs docs files postinst prerm; do \ @for f in dirs docs files postinst prerm; do \
echo "generating control file $(package_gtk_py).$$f"; \ echo "generating control file $(package_gtk_py).$$f"; \
cp debian/libwxgtk-python.$$f debian/$(package_gtk_py).$$f; \ sed -e 's/=PY/$(python_dir)/g;s/=V/$(release)/g' < debian/libwxgtk-python.$$f \
> debian/$(package_gtk_py).$$f; \
done;
@for f in dirs files postinst prerm; do \
echo "generating control file $(package_gtk_py_contrib).$$f"; \
sed -e 's/=PY/$(python_dir)/g;s/=V/$(release)/g' < debian/libwxgtk-python-contrib.$$f \
> debian/$(package_gtk_py_contrib).$$f; \
done; done;
@for f in dirs postinst; do \ @for f in dirs postinst; do \
echo "generating control file $(package_gtk_contrib).$$f"; \ echo "generating control file $(package_gtk_contrib).$$f"; \
@@ -130,6 +139,7 @@ build-wxbase-shared-stamp:
mkdir $(objdir_wxbase_shared) mkdir $(objdir_wxbase_shared)
cd $(objdir_wxbase_shared) \ cd $(objdir_wxbase_shared) \
&& ../configure --prefix=/usr \ && ../configure --prefix=/usr \
--cache-file=../config.cache.debian \
--disable-gui \ --disable-gui \
--enable-burnt_name \ --enable-burnt_name \
--with-zlib=sys \ --with-zlib=sys \
@@ -141,6 +151,7 @@ build-wxbase-static-stamp:
mkdir $(objdir_wxbase_static) mkdir $(objdir_wxbase_static)
cd $(objdir_wxbase_static) \ cd $(objdir_wxbase_static) \
&& ../configure --prefix=/usr \ && ../configure --prefix=/usr \
--cache-file=../config.cache.debian \
--disable-gui \ --disable-gui \
--disable-shared \ --disable-shared \
--with-zlib=sys \ --with-zlib=sys \
@@ -152,6 +163,7 @@ build-wxbase-debug-stamp:
mkdir $(objdir_wxbase_debug) mkdir $(objdir_wxbase_debug)
cd $(objdir_wxbase_debug) \ cd $(objdir_wxbase_debug) \
&& ../configure --prefix=/usr \ && ../configure --prefix=/usr \
--cache-file=../config.cache.debian \
--disable-gui \ --disable-gui \
--enable-debug \ --enable-debug \
--enable-burnt_name \ --enable-burnt_name \
@@ -164,6 +176,7 @@ build-gtk-shared-stamp:
mkdir $(objdir_gtk_shared) mkdir $(objdir_gtk_shared)
cd $(objdir_gtk_shared) \ cd $(objdir_gtk_shared) \
&& ../configure --prefix=/usr \ && ../configure --prefix=/usr \
--cache-file=../config.cache.debian \
--with-gtk \ --with-gtk \
--with-opengl \ --with-opengl \
--enable-burnt_name \ --enable-burnt_name \
@@ -179,6 +192,7 @@ build-gtk-static-stamp:
mkdir $(objdir_gtk_static) mkdir $(objdir_gtk_static)
cd $(objdir_gtk_static) \ cd $(objdir_gtk_static) \
&& ../configure --prefix=/usr \ && ../configure --prefix=/usr \
--cache-file=../config.cache.debian \
--with-gtk \ --with-gtk \
--with-opengl \ --with-opengl \
--disable-shared \ --disable-shared \
@@ -194,6 +208,7 @@ build-gtk-debug-stamp:
mkdir $(objdir_gtk_debug) mkdir $(objdir_gtk_debug)
cd $(objdir_gtk_debug) \ cd $(objdir_gtk_debug) \
&& ../configure --prefix=/usr \ && ../configure --prefix=/usr \
--cache-file=../config.cache.debian \
--with-gtk \ --with-gtk \
--with-opengl \ --with-opengl \
--enable-debug \ --enable-debug \
@@ -207,21 +222,33 @@ build-gtk-debug-stamp:
build-contrib-shared-stamp: build-gtk-shared-stamp build-contrib-shared-stamp: build-gtk-shared-stamp
dh_testdir dh_testdir
cd $(objdir_gtk_shared)/contrib/src && $(MAKE) cd $(objdir_gtk_shared)/contrib/src \
&& $(MAKE)
touch $@ touch $@
build-contrib-static-stamp: build-gtk-static-stamp build-contrib-static-stamp: build-gtk-static-stamp
dh_testdir dh_testdir
cd $(objdir_gtk_static)/contrib/src && $(MAKE) cd $(objdir_gtk_static)/contrib/src \
&& $(MAKE)
touch $@ touch $@
build-gtk-python-stamp: build-gtk-shared-stamp build-gtk-py-stamp: build-gtk-shared-stamp
dh_testdir dh_testdir
cd wxPython/src \ cd wxPython/src \
&& touch gtk/*.cpp gtk/*.py \ && touch gtk/*.cpp gtk/*.py \
&& ../distrib/build.py -b WXDIR=../.. WXCONFIG='$(wxconfig)' && ../distrib/build.py -b WXDIR=../.. WXCONFIG='$(wxconfig)'
touch $@ touch $@
build-gtk-py-contrib-stamp: build-contrib-shared-stamp build-gtk-py-stamp
dh_testdir
cd wxPython/contrib \
&& for d in $$(find -type d -maxdepth 1); do \
(cd $$d \
&& ln -s ../../../contrib contrib \
&& ../../distrib/build.py -b WXDIR=../../.. WXCONFIG='$(wxconfig)') \
done;
touch $@
build-doc-stamp: build-gtk-shared-stamp build-doc-stamp: build-gtk-shared-stamp
dh_testdir dh_testdir
cd $(objdir_gtk_shared)/utils/tex2rtf/src \ cd $(objdir_gtk_shared)/utils/tex2rtf/src \
@@ -268,6 +295,10 @@ clean: debian/control
dh_testroot dh_testroot
rm -rf control-files-stamp $(build_stamps) $(objdirs) rm -rf control-files-stamp $(build_stamps) $(objdirs)
-cd wxPython/src && $(MAKE) clean -cd wxPython/src && $(MAKE) clean
-cd wxPython/contrib \
&& for d in $$(find -type d -maxdepth 1); do \
(cd $$d && $(MAKE) clean && rm -f contrib) \
done;
dh_clean dh_clean
rm -f debian/$(package_wxbase_lib).* rm -f debian/$(package_wxbase_lib).*
rm -f debian/$(package_wxbase_dev).* rm -f debian/$(package_wxbase_dev).*
@@ -276,6 +307,7 @@ clean: debian/control
rm -f debian/$(package_gtk_dev).* rm -f debian/$(package_gtk_dev).*
rm -f debian/$(package_gtk_dbg).* rm -f debian/$(package_gtk_dbg).*
rm -f debian/$(package_gtk_py).* rm -f debian/$(package_gtk_py).*
rm -f debian/$(package_gtk_py_contrib).*
rm -f debian/$(package_gtk_contrib).* rm -f debian/$(package_gtk_contrib).*
rm -f debian/$(package_gtk_contrib_dev).* rm -f debian/$(package_gtk_contrib_dev).*
rm -f debian/$(package_headers).* rm -f debian/$(package_headers).*
@@ -360,18 +392,32 @@ install-gtk-contrib-dev: build-contrib-static-stamp install-gtk-dev
rm -f debian/$(package_gtk_contrib_dev)/usr/lib/libwx_gtk*.a rm -f debian/$(package_gtk_contrib_dev)/usr/lib/libwx_gtk*.a
install-gtk-py: DH_OPTIONS=-p$(package_gtk_py) install-gtk-py: DH_OPTIONS=-p$(package_gtk_py)
install-gtk-py: build-gtk-python-stamp install-gtk-py: build-gtk-py-stamp
dh_testdir dh_testdir
dh_testroot dh_testroot
dh_clean -k dh_clean -k
dh_installdirs dh_installdirs
cd wxPython/src \ cd wxPython/src \
&& ../distrib/build.py -i \ && ../distrib/build.py -i \
TARGETDIR=../../debian/$(package_gtk_py)/usr/lib/python1.5/site-packages/wxPython \ TARGETDIR=../../debian/$(package_gtk_py)/usr/lib/$(python_dir)/site-packages/wxPython \
HELPERLIBDIR=../../debian/$(package_gtk_py)/usr/lib \ HELPERLIBDIR=../../debian/$(package_gtk_py)/usr/lib \
WXDIR=../.. WXDIR=../..
rm -rf debian/$(package_gtk_py)/usr/lib/python1.5/site-packages/wxPython/demo rm -rf debian/$(package_gtk_py)/usr/lib/$(python_dir)/site-packages/wxPython/demo
find debian/$(package_gtk_py)/usr/lib/python1.5/site-packages/wxPython \ find debian/$(package_gtk_py)/usr/lib/$(python_dir)/site-packages/wxPython \
-name '*.py?' -exec rm '{}' ';'
install-gtk-py-contrib: DH_OPTIONS=-p$(package_gtk_py_contrib)
install-gtk-py-contrib: build-gtk-py-contrib-stamp
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
cd wxPython/contrib && for d in $$(find -type d -maxdepth 1); do \
(cd $$d \
&& ../../distrib/build.py -i \
TARGETDIR=../../../debian/$(package_gtk_py_contrib)/usr/lib/$(python_dir)/site-packages/wxPython) \
done;
find debian/$(package_gtk_py_contrib)/usr/lib/$(python_dir)/site-packages/wxPython \
-name '*.py?' -exec rm '{}' ';' -name '*.py?' -exec rm '{}' ';'
install-headers: DH_OPTIONS=-p$(package_headers) install-headers: DH_OPTIONS=-p$(package_headers)
@@ -483,5 +529,6 @@ binary-doc: control-files-stamp install-doc
binary-wxbase-dbg binary-doc install install-wxbase-lib \ binary-wxbase-dbg binary-doc install install-wxbase-lib \
install-wxbase-dev install-wxbase-dbg install-gtk-lib install-gtk-dev \ install-wxbase-dev install-wxbase-dbg install-gtk-lib install-gtk-dev \
install-gtk-dbg install-gtk-contrib install-gtk-contrib-dev \ install-gtk-dbg install-gtk-contrib install-gtk-contrib-dev \
install-gtk-py install-headers install-i18n install-doc install-examples install-gtk-py install-gtk-py-contrib install-headers install-i18n \
install-doc install-examples