From 31a8ceaf5f516c67fcb390b67ed5ed9677f91c35 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 13 Dec 2006 13:14:40 +0000 Subject: [PATCH] added a tiny script to build both ANSI and Unicode debian packages git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- debian/README.HowToBuild.txt | 8 ++++++ debian/build_all | 49 ++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100755 debian/build_all diff --git a/debian/README.HowToBuild.txt b/debian/README.HowToBuild.txt index a013b5da67..29601fbf0d 100644 --- a/debian/README.HowToBuild.txt +++ b/debian/README.HowToBuild.txt @@ -149,6 +149,14 @@ When finished the binary and source packages will be left in the parent dir of the source tree. +Automating the process +---------------------- + +The script debian/build_all automates the above stepds and builds both +wxWidgets and wxPython packages in both ANSI and Unicode modes. You should do +the build manually at least the first time however to make sure you have all +the prerequisites and the build doesn't fail. + Other Sources of Information ---------------------------- diff --git a/debian/build_all b/debian/build_all new file mode 100755 index 0000000000..744a4241ed --- /dev/null +++ b/debian/build_all @@ -0,0 +1,49 @@ +#!/bin/sh +############################################################################## +# Name: debian/build_all +# Purpose: build both ANSI and Unicode Debian packages at once +# Created: 2006-12-13 +# RCS-ID: $Id$ +# Copyright: (c) 2006 Vadim Zeitlin +# Licence: wxWindows licence +############################################################################## + +# The following variables may be defined: +# wx The wxWidgets root directory (if it's unset you have to run the +# script from this directory) +# debsrc_dir If set, suppose there are already debian sources in this dir + +set -e +wx_dir=${wx-`pwd`} +if [ ! -f $wx_dir/debian/build_all ]; then + echo "Please run the script from the root wx directory" >&2 + exit 1 +fi + +( +if [ -z $debsrc_dir ]; then + configure_dir=/tmp/wxtmp-$$ + + mkdir $configure_dir + cd $configure_dir + $wx_dir/configure --without-subdirs > /dev/null + make debian-dist > /dev/null + debsrc_dir=`grep 'DEBIAN_SOURCE_DIR =' Makefile | sed 's@.*/@@'` + cd .. + rm -rf $configure_dir +fi + +cd $wx_dir/../$debsrc_dir +./debian/rules debian/control +dpkg-buildpackage -rfakeroot > /dev/null + +fakeroot ./debian/rules clean + +sed -i '/^WX_UNICODE := /s/1/0/' debian/rules +rm debian/control +./debian/rules debian/control +dpkg-buildpackage -rfakeroot > /dev/null + +fakeroot ./debian/rules clean + +) 2>&1 | tee $wx_dir/debian/build.log -- 2.45.2