]>
Commit | Line | Data |
---|---|---|
31a8ceaf VZ |
1 | #!/bin/sh |
2 | ############################################################################## | |
3 | # Name: debian/build_all | |
4 | # Purpose: build both ANSI and Unicode Debian packages at once | |
5 | # Created: 2006-12-13 | |
31a8ceaf VZ |
6 | # Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org> |
7 | # Licence: wxWindows licence | |
8 | ############################################################################## | |
9 | ||
10 | # The following variables may be defined: | |
11 | # wx The wxWidgets root directory (if it's unset you have to run the | |
12 | # script from this directory) | |
13 | # debsrc_dir If set, suppose there are already debian sources in this dir | |
14 | ||
15 | set -e | |
16 | wx_dir=${wx-`pwd`} | |
17 | if [ ! -f $wx_dir/debian/build_all ]; then | |
18 | echo "Please run the script from the root wx directory" >&2 | |
19 | exit 1 | |
20 | fi | |
21 | ||
22 | ( | |
23 | if [ -z $debsrc_dir ]; then | |
24 | configure_dir=/tmp/wxtmp-$$ | |
25 | ||
26 | mkdir $configure_dir | |
27 | cd $configure_dir | |
28 | $wx_dir/configure --without-subdirs > /dev/null | |
29 | make debian-dist > /dev/null | |
30 | debsrc_dir=`grep 'DEBIAN_SOURCE_DIR =' Makefile | sed 's@.*/@@'` | |
31 | cd .. | |
32 | rm -rf $configure_dir | |
33 | fi | |
34 | ||
35 | cd $wx_dir/../$debsrc_dir | |
36 | ./debian/rules debian/control | |
37 | dpkg-buildpackage -rfakeroot > /dev/null | |
38 | ||
39 | fakeroot ./debian/rules clean | |
40 | ||
41 | sed -i '/^WX_UNICODE := /s/1/0/' debian/rules | |
42 | rm debian/control | |
43 | ./debian/rules debian/control | |
44 | dpkg-buildpackage -rfakeroot > /dev/null | |
45 | ||
7239c22f | 46 | sed -i '/^WX_UNICODE := /s/0/1/' debian/rules |
31a8ceaf VZ |
47 | fakeroot ./debian/rules clean |
48 | ||
49 | ) 2>&1 | tee $wx_dir/debian/build.log |