]>
Commit | Line | Data |
---|---|---|
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 | echo Rearchiving wxMotif tarballs to change wxMOTIF to wxMotif... | |
84 | cd $WXDEST | |
85 | mkdir wxMotif.tmp | |
86 | cd wxMotif.tmp | |
87 | rm -f -r * | |
88 | tar xfz ../wxMOTIF-$WXVER.tar.gz | |
89 | mv wxMOTIF-$WXVER wxMotif-$WXVER | |
90 | rm -f ../wxMOTIF-$WXVER.tar.gz | |
91 | rm -f ../wxMOTIF-$WXVER.tar.bz2 | |
92 | tar cf ../wxMotif-$WXVER.tar * | |
93 | gzip -c ../wxMotif-$WXVER.tar > ../wxMotif-$WXVER.tar.gz | |
94 | bzip2 -f9 ../wxMotif-$WXVER.tar | |
95 | cd .. | |
96 | rm -f -r wxMotif.tmp | |
97 | rm -f -r $WXDEST/wxmotif | |
98 | } | |
99 | ||
100 | dospinwxmac() | |
101 | { | |
102 | echo Making wxMac tarballs... | |
103 | ||
104 | if [ ! -d $WXDEST ]; then | |
105 | mkdir $WXDEST | |
106 | fi | |
107 | ||
108 | rm -f -r $WXDEST/wxmac | |
109 | mkdir $WXDEST/wxmac | |
110 | mkdir $WXDEST/wxmac/release | |
111 | ||
112 | cd $WXSRC | |
113 | cd locale | |
114 | make allmo | |
115 | cd $WXDEST/wxmac/release | |
116 | echo Configuring... | |
117 | $WXSRC/configure --with-mac --no-recursion | |
118 | echo Making... | |
119 | make -j1 dist | |
120 | ||
121 | cp $WXDEST/wxmac/release/*.tar.gz $WXDEST | |
122 | cp $WXDEST/wxmac/release/*.tar.bz2 $WXDEST | |
123 | ||
124 | echo Rearchiving wxMac tarballs to change wxMAC to wxMAC... | |
125 | cd $WXDEST | |
126 | mkdir wxMac.tmp | |
127 | cd wxMac.tmp | |
128 | rm -f -r * | |
129 | tar xfz ../wxMac-$WXVER.tar.gz | |
130 | mv wxMAC-$WXVER wxMac-$WXVER | |
131 | rm -f ../wxMAC-$WXVER.tar.gz | |
132 | rm -f ../wxMAC-$WXVER.tar.bz2 | |
133 | tar cf ../wxMac-$WXVER.tar * | |
134 | gzip -c ../wxMac-$WXVER.tar > ../wxMac-$WXVER.tar.gz | |
135 | bzip2 -f9 ../wxMac-$WXVER.tar | |
136 | cd .. | |
137 | rm -f -r wxMac.tmp | |
138 | ||
139 | rm -f -r $WXDEST/wxmac | |
140 | } | |
141 | ||
142 | docopydocs() | |
143 | { | |
144 | cp $WXSRC/docs/readme.txt $WXDEST/readme-${WXVER}.txt | |
145 | cp $WXSRC/docs/changes.txt $WXDEST/changes-${WXVER}.txt | |
146 | cp $WXSRC/docs/mgl/readme.txt $WXDEST/readme-mgl-${WXVER}.txt | |
147 | cp $WXSRC/docs/mgl/install.txt $WXDEST/install-mgl-${WXVER}.txt | |
148 | cp $WXSRC/docs/x11/readme.txt $WXDEST/readme-x11-${WXVER}.txt | |
149 | cp $WXSRC/docs/x11/readme-nanox.txt $WXDEST/readme-nanox-${WXVER}.txt | |
150 | cp $WXSRC/docs/x11/install.txt $WXDEST/install-x11-${WXVER}.txt | |
151 | cp $WXSRC/docs/motif/readme.txt $WXDEST/readme-motif-${WXVER}.txt | |
152 | cp $WXSRC/docs/motif/install.txt $WXDEST/install-motif-${WXVER}.txt | |
153 | cp $WXSRC/docs/msw/readme.txt $WXDEST/readme-msw-${WXVER}.txt | |
154 | cp $WXSRC/docs/msw/install.txt $WXDEST/install-msw-${WXVER}.txt | |
155 | cp $WXSRC/docs/gtk/readme.txt $WXDEST/readme-gtk-${WXVER}.txt | |
156 | cp $WXSRC/docs/gtk/install.txt $WXDEST/install-gtk-${WXVER}.txt | |
157 | cp $WXSRC/docs/mac/readme.txt $WXDEST/readme-mac-${WXVER}.txt | |
158 | cp $WXSRC/docs/mac/install.txt $WXDEST/install-mac-${WXVER}.txt | |
159 | cp $WXSRC/docs/os2/install.txt $WXDEST/install-os2-${WXVER}.txt | |
160 | } | |
161 | ||
162 | PROGNAME=$0 | |
163 | WXSRC=$1 | |
164 | WXDEST=$2 | |
165 | WXVER=$3 | |
166 | ||
167 | SPINWXX11=0 | |
168 | SPINWXGTK=0 | |
169 | SPINWXMOTIF=0 | |
170 | SPINWXMAC=0 | |
171 | SPINWXBASE=0 | |
172 | SPINEVERYTHING=0 | |
173 | UPDATECVS=0 | |
174 | ||
175 | usage() | |
176 | { | |
177 | echo Usage: $PROGNAME "src-dir dest-dir version-number [ options ]" | |
178 | echo Options: | |
179 | echo " --help Display this help message" | |
180 | echo " --wxgtk Spin wxGTK" | |
181 | echo " --wxbase Spin wxBase" | |
182 | echo " --wxx11 Spin wxX11" | |
183 | echo " --wxmotif Spin wxMotif" | |
184 | echo " --wxmac Spin wxMac" | |
185 | echo " --all Spin EVERYTHING" | |
186 | echo " --updatecvs Update from CVS" | |
187 | ||
188 | exit 1 | |
189 | } | |
190 | ||
191 | init="" | |
192 | if [ "$1" = "" ] | |
193 | then | |
194 | usage | |
195 | exit | |
196 | fi | |
197 | ||
198 | if [ "$2" = "" ] | |
199 | then | |
200 | usage | |
201 | exit | |
202 | fi | |
203 | ||
204 | if [ "$3" = "" ] | |
205 | then | |
206 | usage | |
207 | exit | |
208 | fi | |
209 | ||
210 | # Process command line options. | |
211 | shift 3 | |
212 | for i in "$@"; do | |
213 | case "$i" in | |
214 | --wxx11) SPINWXX11=1 ;; | |
215 | --wxgtk) SPINWXGTK=1 ;; | |
216 | --wxmac) SPINWXMAC=1 ;; | |
217 | --wxmotif) SPINWXMOTIF=1 ;; | |
218 | --all) SPINEVERYTHING=1 ;; | |
219 | --updatecvs) UPDATECVS=1 ;; | |
220 | *) | |
221 | usage | |
222 | exit | |
223 | ;; | |
224 | esac | |
225 | done | |
226 | ||
227 | echo About to make wxWindows RPMs: | |
228 | echo From $WXSRC | |
229 | echo To $WXDEST | |
230 | echo Version $WXVER | |
231 | echo CTRL-C if this is not correct. | |
232 | read dummy | |
233 | ||
234 | if [ "$UPDATECVS" = "1" ]; then | |
235 | doupdatecvs | |
236 | fi | |
237 | ||
238 | if [ "$SPINWXX11" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then | |
239 | dospinwxx11 | |
240 | fi | |
241 | ||
242 | if [ "$SPINWXGTK" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then | |
243 | dospinwxgtk | |
244 | fi | |
245 | ||
246 | if [ "$SPINWXMOTIF" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then | |
247 | dospinwxmotif | |
248 | fi | |
249 | ||
250 | if [ "$SPINWXMAC" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then | |
251 | dospinwxmac | |
252 | fi | |
253 | ||
254 | docopydocs |