]>
Commit | Line | Data |
---|---|---|
4c4cba25 JS |
1 | #!/bin/sh |
2 | # Makes the wxWindows tarballs with 'make dist' | |
3 | ||
4 | doupdatecvs() | |
5 | { | |
6 | cd $WXSRC | |
7 | echo Updating from CVS... | |
8 | cvswx update -d -P | |
9 | } | |
10 | ||
11 | dospinwxgtk() | |
12 | { | |
13 | echo Making wxGTK tarballs... | |
14 | ||
15 | if [ ! -d $WXDEST ]; then | |
16 | mkdir $WXDEST | |
17 | fi | |
18 | ||
19 | rm -f -r $WXDEST/wxgtk | |
20 | mkdir $WXDEST/wxgtk | |
21 | mkdir $WXDEST/wxgtk/release | |
22 | ||
23 | cd $WXSRC | |
24 | cd locale | |
25 | make allmo | |
26 | cd $WXDEST/wxgtk/release | |
27 | echo Configuring... | |
28 | $WXSRC/configure --no-recursion | |
29 | echo Making... | |
30 | make -j1 dist | |
31 | mv $WXDEST/wxgtk/release/*.gz $WXDEST/wxgtk/release/*.bz2 $WXDEST | |
32 | } | |
33 | ||
34 | dospinwxx11() | |
35 | { | |
36 | echo Making wxX11 tarballs... | |
37 | ||
38 | if [ ! -d $WXDEST ]; then | |
39 | mkdir $WXDEST | |
40 | fi | |
41 | ||
42 | rm -f -r $WXDEST/wxx11 | |
43 | mkdir $WXDEST/wxx11 | |
44 | mkdir $WXDEST/wxx11/release | |
45 | ||
46 | cd $WXSRC | |
47 | cd locale | |
48 | make allmo | |
49 | cd $WXDEST/wxx11/release | |
50 | echo Configuring... | |
51 | $WXSRC/configure --with-x11 --no-recursion | |
52 | echo Making... | |
53 | make -j1 dist | |
54 | ||
55 | cp $WXDEST/wxx11/release/*.tar.gz $WXDEST | |
56 | cp $WXDEST/wxx11/release/*.tar.bz2 $WXDEST | |
57 | } | |
58 | ||
59 | dospinwxmotif() | |
60 | { | |
61 | echo Making wxMotif tarballs... | |
62 | ||
63 | if [ ! -d $WXDEST ]; then | |
64 | mkdir $WXDEST | |
65 | fi | |
66 | ||
67 | rm -f -r $WXDEST/wxmotif | |
68 | mkdir $WXDEST/wxmotif | |
69 | mkdir $WXDEST/wxmotif/release | |
70 | ||
71 | cd $WXSRC | |
72 | cd locale | |
73 | make allmo | |
74 | cd $WXDEST/wxmotif/release | |
75 | echo Configuring... | |
76 | $WXSRC/configure --with-motif --no-recursion | |
77 | echo Making... | |
78 | make -j1 dist | |
79 | ||
80 | cp $WXDEST/wxmotif/release/*.tar.gz $WXDEST | |
81 | cp $WXDEST/wxmotif/release/*.tar.bz2 $WXDEST | |
82 | } | |
83 | ||
84 | dospinwxmac() | |
85 | { | |
86 | echo Making wxMac tarballs... | |
87 | ||
88 | if [ ! -d $WXDEST ]; then | |
89 | mkdir $WXDEST | |
90 | fi | |
91 | ||
92 | rm -f -r $WXDEST/wxmac | |
93 | mkdir $WXDEST/wxmac | |
94 | mkdir $WXDEST/wxmac/release | |
95 | ||
96 | cd $WXSRC | |
97 | cd locale | |
98 | make allmo | |
99 | cd $WXDEST/wxmac/release | |
100 | echo Configuring... | |
101 | $WXSRC/configure --with-mac --no-recursion | |
102 | echo Making... | |
103 | make -j1 dist | |
104 | ||
105 | cp $WXDEST/wxmac/release/*.tar.gz $WXDEST | |
106 | cp $WXDEST/wxmac/release/*.tar.bz2 $WXDEST | |
107 | } | |
108 | ||
109 | PROGNAME=$0 | |
110 | WXSRC=$1 | |
111 | WXDEST=$2 | |
112 | WXVER=$3 | |
113 | ||
114 | SPINWXX11=0 | |
115 | SPINWXGTK=0 | |
116 | SPINWXMOTIF=0 | |
117 | SPINWXMAC=0 | |
118 | SPINWXBASE=0 | |
119 | SPINEVERYTHING=0 | |
120 | UPDATECVS=0 | |
121 | ||
122 | usage() | |
123 | { | |
124 | echo Usage: $PROGNAME "src-dir dest-dir version-number [ options ]" | |
125 | echo Options: | |
126 | echo " --help Display this help message" | |
127 | echo " --wxgtk Spin wxGTK" | |
128 | echo " --wxbase Spin wxBase" | |
129 | echo " --wxx11 Spin wxX11" | |
130 | echo " --wxmotif Spin wxMotif" | |
131 | echo " --wxmac Spin wxMac" | |
132 | echo " --all Spin EVERYTHING" | |
133 | echo " --updatecvs Update from CVS" | |
134 | ||
135 | exit 1 | |
136 | } | |
137 | ||
138 | init="" | |
139 | if [ "$1" = "" ] | |
140 | then | |
141 | usage | |
142 | exit | |
143 | fi | |
144 | ||
145 | if [ "$2" = "" ] | |
146 | then | |
147 | usage | |
148 | exit | |
149 | fi | |
150 | ||
151 | if [ "$3" = "" ] | |
152 | then | |
153 | usage | |
154 | exit | |
155 | fi | |
156 | ||
157 | # Process command line options. | |
158 | shift 3 | |
159 | for i in "$@"; do | |
160 | case "$i" in | |
161 | --wxx11) SPINWXX11=1 ;; | |
162 | --wxgtk) SPINWXGTK=1 ;; | |
163 | --wxmac) SPINWXMAC=1 ;; | |
164 | --wxmotif) SPINWXMOTIF=1 ;; | |
165 | --all) SPINEVERYTHING=1 ;; | |
166 | --updatecvs) UPDATECVS=1 ;; | |
167 | *) | |
168 | usage | |
169 | exit | |
170 | ;; | |
171 | esac | |
172 | done | |
173 | ||
174 | echo About to make wxWindows RPMs: | |
175 | echo From $WXSRC | |
176 | echo To $WXDEST | |
177 | echo Version $WXVER | |
178 | echo CTRL-C if this is not correct. | |
179 | read dummy | |
180 | ||
181 | if [ "$UPDATECVS" = "1" ]; then | |
182 | doupdatecvs | |
183 | fi | |
184 | ||
185 | if [ "$SPINWXX11" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then | |
186 | dospinwxx11 | |
187 | fi | |
188 | ||
189 | if [ "$SPINWXGTK" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then | |
190 | dospinwxgtk | |
191 | fi | |
192 | ||
193 | if [ "$SPINWXMOTIF" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then | |
194 | dospinwxmotif | |
195 | fi | |
196 | ||
197 | if [ "$SPINWXMAC" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then | |
198 | dospinwxmac | |
199 | fi | |
200 |