]> git.saurik.com Git - wxWidgets.git/blob - distrib/msw/makerpm
More details about the internal module name changes
[wxWidgets.git] / distrib / msw / makerpm
1 #!/bin/sh
2 # Makes the wxWindows RPMs
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 RPMs...
14 RPM_ROOT=$WXDEST/wxgtk/rpm-root
15
16 if [ ! -d $WXDEST ]; then
17 mkdir $WXDEST
18 fi
19
20 rm -f -r $WXDEST/wxgtk
21 mkdir $WXDEST/wxgtk
22 mkdir $WXDEST/wxgtk/release
23 mkdir $RPM_ROOT
24
25 cd $WXSRC
26 cd locale
27 make allmo
28 cd $WXDEST/wxgtk/release
29 echo Configuring...
30 $WXSRC/configure --with-gtk --no-recursion
31 echo Making...
32 make -j1 dist bzip-dist-only
33
34 echo Setting up RPM build dir $RPM_ROOT...
35 rm -f -r $RPM_ROOT
36 mkdir $RPM_ROOT
37 mkdir $RPM_ROOT/BUILD
38 mkdir $RPM_ROOT/RPMS
39 mkdir $RPM_ROOT/RPMS/i386
40 mkdir $RPM_ROOT/RPMS/i686
41 mkdir $RPM_ROOT/RPMS/noarch
42 mkdir $RPM_ROOT/SOURCES
43 mkdir $RPM_ROOT/SPECS
44 mkdir $RPM_ROOT/SRPMS
45
46 echo %_topdir $RPM_ROOT > ~/.rpmmacros
47
48 echo Copying wxGTK-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES...
49 cp wxGTK-$WXVER.tar.bz2 $RPM_ROOT/SOURCES
50 echo Copying wxGTK.spec to $RPM_ROOT/SPECS...
51 cp $WXSRC/wxGTK.spec $RPM_ROOT/SPECS
52
53 echo Starting wxGTK RPM build...
54 cd $RPM_ROOT
55 rpmbuild -ba SPECS/wxGTK.spec 2>&1 | tee wxGTK.out
56
57 echo Finished wxGTK RPM build, in $RPM_ROOT.
58 echo "SRPMS:"
59 ls SRPMS
60 echo "RPMS/i386:"
61 ls RPMS/i386
62
63 cp $RPM_ROOT/SRPMS/*.rpm $WXDEST
64 cp $RPM_ROOT/RPMS/*.rpm $WXDEST
65 cp $WXDEST/wxgtk/release/*.tar.gz $WXDEST
66 cp $WXDEST/wxgtk/release/*.tar.bz2 $WXDEST
67
68 rm -f -r $WXDEST/wxgtk
69
70 echo Now try the RPMs with rpm -i.
71 }
72
73 dospinwxmgl()
74 {
75 echo Making wxMGL RPMs...
76 RPM_ROOT=$WXDEST/wxmgl/rpm-root
77
78 if [ ! -d $WXDEST ]; then
79 mkdir $WXDEST
80 fi
81
82 rm -f -r $WXDEST/wxmgl
83 mkdir $WXDEST/wxmgl
84 mkdir $WXDEST/wxmgl/release
85 mkdir $RPM_ROOT
86
87 cd $WXSRC
88 cd locale
89 make allmo
90 cd $WXDEST/wxmgl/release
91 echo Configuring...
92 $WXSRC/configure --with-mgl --no-recursion
93 echo Making...
94 make -j1 dist bzip-dist-only
95
96 echo Setting up RPM build dir $RPM_ROOT...
97 rm -f -r $RPM_ROOT
98 mkdir $RPM_ROOT
99 mkdir $RPM_ROOT/BUILD
100 mkdir $RPM_ROOT/RPMS
101 mkdir $RPM_ROOT/RPMS/i386
102 mkdir $RPM_ROOT/RPMS/i686
103 mkdir $RPM_ROOT/RPMS/noarch
104 mkdir $RPM_ROOT/SOURCES
105 mkdir $RPM_ROOT/SPECS
106 mkdir $RPM_ROOT/SRPMS
107
108 echo %_topdir $RPM_ROOT > ~/.rpmmacros
109
110 echo Copying wxMGL-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES...
111 cp wxMGL-$WXVER.tar.bz2 $RPM_ROOT/SOURCES
112 echo Copying wxMGL.spec to $RPM_ROOT/SPECS...
113 cp $WXSRC/wxMGL.spec $RPM_ROOT/SPECS
114
115 echo Starting wxMGL RPM build...
116 cd $RPM_ROOT
117 rpmbuild -ba SPECS/wxMGL.spec 2>&1 | tee wxMGL.out
118
119 echo Finished wxMGL RPM build, in $RPM_ROOT.
120 echo "SRPMS:"
121 ls SRPMS
122 echo "RPMS/i386:"
123 ls RPMS/i386
124
125 cp $RPM_ROOT/SRPMS/*.rpm $WXDEST
126 cp $RPM_ROOT/RPMS/*.rpm $WXDEST
127 cp $WXDEST/wxmgl/release/*.tar.gz $WXDEST
128 cp $WXDEST/wxmgl/release/*.tar.bz2 $WXDEST
129
130 rm -f -r $WXDEST/wxmgl
131
132 echo Now try the RPMs with rpm -i.
133 }
134
135 dospinwxmotif()
136 {
137 echo Making wxMotif RPMs...
138 RPM_ROOT=$WXDEST/wxmotif/rpm-root
139
140 if [ ! -d $WXDEST ]; then
141 mkdir $WXDEST
142 fi
143
144 rm -f -r $WXDEST/wxmotif
145 mkdir $WXDEST/wxmotif
146 mkdir $WXDEST/wxmotif/release
147 mkdir $RPM_ROOT
148
149 cd $WXSRC
150 cd locale
151 make allmo
152 cd $WXDEST/wxmotif/release
153 echo Configuring...
154 $WXSRC/configure --with-motif --no-recursion
155 echo Making...
156 make -j1 dist bzip-dist-only
157
158 echo Setting up RPM build dir $RPM_ROOT...
159 rm -f -r $RPM_ROOT
160 mkdir $RPM_ROOT
161 mkdir $RPM_ROOT/BUILD
162 mkdir $RPM_ROOT/RPMS
163 mkdir $RPM_ROOT/RPMS/i386
164 mkdir $RPM_ROOT/RPMS/i686
165 mkdir $RPM_ROOT/RPMS/noarch
166 mkdir $RPM_ROOT/SOURCES
167 mkdir $RPM_ROOT/SPECS
168 mkdir $RPM_ROOT/SRPMS
169
170 echo %_topdir $RPM_ROOT > ~/.rpmmacros
171
172 echo Copying wxMOTIF-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES...
173 cp wxMOTIF-$WXVER.tar.bz2 $RPM_ROOT/SOURCES
174 echo Copying wxMotif.spec to $RPM_ROOT/SPECS...
175 cp $WXSRC/wxMotif.spec $RPM_ROOT/SPECS
176
177 echo Starting wxMotif RPM build...
178 cd $RPM_ROOT
179 rpmbuild -ba SPECS/wxMotif.spec 2>&1 | tee wxGTK.out
180
181 echo Finished wxMotif RPM build, in $RPM_ROOT.
182 echo "SRPMS:"
183 ls SRPMS
184 echo "RPMS/i386:"
185 ls RPMS/i386
186
187 cp $RPM_ROOT/SRPMS/*.rpm $WXDEST
188 cp $RPM_ROOT/RPMS/*.rpm $WXDEST
189 cp $WXDEST/wxmotif/release/*.tar.gz $WXDEST
190 cp $WXDEST/wxmotif/release/*.tar.bz2 $WXDEST
191
192 echo Rearchiving wxMotif tarballs to change wxMOTIF to wxMotif...
193 cd $WXDEST
194 mkdir wxMotif.tmp
195 cd wxMotif.tmp
196 rm -f -r *
197 tar xfz ../wxMOTIF-$WXVER.tar.gz
198 mv wxMOTIF-$WXVER wxMotif-$WXVER
199 rm -f ../wxMOTIF-$WXVER.tar.gz
200 rm -f ../wxMOTIF-$WXVER.tar.bz2
201 tar cf ../wxMotif-$WXVER.tar *
202 gzip -c ../wxMotif-$WXVER.tar > ../wxMotif-$WXVER.tar.gz
203 bzip2 -f9 ../wxMotif-$WXVER.tar
204 cd ..
205 rm -f -r wxMotif.tmp
206 rm -f -r $WXDEST/wxmotif
207
208 echo Now try the RPMs with rpm -i.
209 }
210
211 dospinwxmac()
212 {
213 echo Making wxMac tarballs...
214 echo Note that this must be done on a Mac.
215 if [ ! -d $WXDEST ]; then
216 mkdir $WXDEST
217 fi
218
219 rm -f -r $WXDEST/wxmac
220 mkdir $WXDEST/wxmac
221 mkdir $WXDEST/wxmac/release
222
223 cd $WXSRC
224 cd locale
225 make allmo
226 cd $WXDEST/wxmac/release
227 echo Configuring...
228 $WXSRC/configure --with-mac --no-recursion
229 echo Making...
230 make -j1 dist bzip-dist-only
231
232 cp $WXDEST/wxmac/release/*.tar.gz $WXDEST
233 cp $WXDEST/wxmac/release/*.tar.bz2 $WXDEST
234
235 echo Rearchiving wxMac tarballs to change wxMAC to wxMAC...
236 cd $WXDEST
237 mkdir wxMac.tmp
238 cd wxMac.tmp
239 rm -f -r *
240 tar xfz ../wxMac-$WXVER.tar.gz
241 mv wxMAC-$WXVER wxMac-$WXVER
242 rm -f ../wxMAC-$WXVER.tar.gz
243 rm -f ../wxMAC-$WXVER.tar.bz2
244 tar cf ../wxMac-$WXVER.tar *
245 gzip -c ../wxMac-$WXVER.tar > ../wxMac-$WXVER.tar.gz
246 bzip2 -f9 ../wxMac-$WXVER.tar
247 cd ..
248 rm -f -r wxMac.tmp
249
250 rm -f -r $WXDEST/wxmac
251 echo Now try the RPMs with rpm -i.
252 }
253
254 dospinwxbase()
255 {
256 echo Making wxBase RPMs...
257 RPM_ROOT=$WXDEST/wxbase/rpm-root
258
259 if [ ! -d $WXDEST ]; then
260 mkdir $WXDEST
261 fi
262
263 rm -f -r $WXDEST/wxbase
264 mkdir $WXDEST/wxbase
265 mkdir $WXDEST/wxbase/release
266 mkdir $RPM_ROOT
267
268 cd $WXSRC
269 cd locale
270 make allmo
271 cd $WXDEST/wxbase/release
272 echo Configuring...
273 $WXSRC/configure --disable-gui --no-recursion
274 echo Making...
275 make -j1 dist bzip-dist-only
276
277 echo Setting up RPM build dir $RPM_ROOT...
278 rm -f -r $RPM_ROOT
279 mkdir $RPM_ROOT
280 mkdir $RPM_ROOT/BUILD
281 mkdir $RPM_ROOT/RPMS
282 mkdir $RPM_ROOT/RPMS/i386
283 mkdir $RPM_ROOT/RPMS/i686
284 mkdir $RPM_ROOT/RPMS/noarch
285 mkdir $RPM_ROOT/SOURCES
286 mkdir $RPM_ROOT/SPECS
287 mkdir $RPM_ROOT/SRPMS
288
289 echo %_topdir $RPM_ROOT > ~/.rpmmacros
290
291 echo Copying wxBase-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES...
292 cp wxBase-$WXVER.tar.bz2 $RPM_ROOT/SOURCES
293 echo Copying wxBase.spec to $RPM_ROOT/SPECS...
294 cp $WXSRC/wxBase.spec $RPM_ROOT/SPECS
295
296 echo Starting wxBase RPM build...
297 cd $RPM_ROOT
298 rpmbuild -ba SPECS/wxBase.spec 2>&1 | tee wxBase.out
299
300 echo Finished wxBase RPM build, in $RPM_ROOT.
301 echo "SRPMS:"
302 ls SRPMS
303 echo "RPMS/i386:"
304 ls RPMS/i386
305
306 cp $RPM_ROOT/SRPMS/*.rpm $WXDEST
307 cp $RPM_ROOT/RPMS/*.rpm $WXDEST
308 cp $WXDEST/wxbase/release/*.tar.gz $WXDEST
309 cp $WXDEST/wxbase/release/*.tar.bz2 $WXDEST
310
311 rm -f -r $WXDEST/wxbase
312 echo Now try the RPMs with rpm -i.
313 }
314
315 dospinwxx11()
316 {
317 echo Making wxX11 RPMs...
318 RPM_ROOT=$WXDEST/wxx11/rpm-root
319
320 if [ ! -d $WXDEST ]; then
321 mkdir $WXDEST
322 fi
323
324 rm -f -r $WXDEST/wxx11
325 mkdir $WXDEST/wxx11
326 mkdir $WXDEST/wxx11/release
327 mkdir $RPM_ROOT
328
329 cd $WXSRC
330 cd locale
331 make allmo
332 cd $WXDEST/wxx11/release
333 echo Configuring...
334 $WXSRC/configure --with-x11 --no-recursion
335 echo Making...
336 make -j1 dist bzip-dist-only
337
338 echo Setting up RPM build dir $RPM_ROOT...
339 rm -f -r $RPM_ROOT
340 mkdir $RPM_ROOT
341 mkdir $RPM_ROOT/BUILD
342 mkdir $RPM_ROOT/RPMS
343 mkdir $RPM_ROOT/RPMS/i386
344 mkdir $RPM_ROOT/RPMS/i686
345 mkdir $RPM_ROOT/RPMS/noarch
346 mkdir $RPM_ROOT/SOURCES
347 mkdir $RPM_ROOT/SPECS
348 mkdir $RPM_ROOT/SRPMS
349
350 echo %_topdir $RPM_ROOT > ~/.rpmmacros
351
352 echo Copying wxX11-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES...
353 cp wxX11-$WXVER.tar.bz2 $RPM_ROOT/SOURCES
354 echo Copying wxX11.spec to $RPM_ROOT/SPECS...
355 cp $WXSRC/wxX11.spec $RPM_ROOT/SPECS
356
357 echo Starting wxX11 RPM build...
358 cd $RPM_ROOT
359 rpmbuild -ba SPECS/wxX11.spec 2>&1 | tee wxX11.out
360
361 echo Finished wxX11 RPM build, in $RPM_ROOT.
362 echo "SRPMS:"
363 ls SRPMS
364 echo "RPMS/i386:"
365 ls RPMS/i386
366
367 cp $RPM_ROOT/SRPMS/*.rpm $WXDEST
368 cp $RPM_ROOT/RPMS/*.rpm $WXDEST
369 cp $WXDEST/wxx11/release/*.tar.gz $WXDEST
370 cp $WXDEST/wxx11/release/*.tar.bz2 $WXDEST
371
372 rm -f -r $WXDEST/wxx11
373 echo Now try the RPMs with rpm -i.
374 }
375
376 PROGNAME=$0
377 WXSRC=$1
378 WXDEST=$2
379 WXVER=$3
380
381 SPINWXX11=0
382 SPINWXGTK=0
383 SPINWXMAC=0
384 SPINWXMOTIF=0
385 SPINWXBASE=0
386 SPINWXMGL=0
387 SPINEVERYTHING=0
388 UPDATECVS=0
389
390 usage()
391 {
392 echo Usage: $PROGNAME "src-dir dest-dir version-number [ options ]"
393 echo Options:
394 echo " --help Display this help message"
395 echo " --wxgtk Spin wxGTK RPMs"
396 echo " --wxbase Spin wxBase RPMs"
397 echo " --wxx11 Spin wxX11 RPMs"
398 echo " --wxmotif Spin wxMotif RPMs"
399 echo " --wxmgl Spin wxMGL RPMs"
400 echo " --wxmac Make wxMac tarball"
401 echo " --all Spin EVERYTHING"
402 echo " --updatecvs Update from CVS"
403
404 exit 1
405 }
406
407 init=""
408 if [ "$1" = "" ]
409 then
410 usage
411 exit
412 fi
413
414 if [ "$2" = "" ]
415 then
416 usage
417 exit
418 fi
419
420 if [ "$3" = "" ]
421 then
422 usage
423 exit
424 fi
425
426 # Process command line options.
427 shift 3
428 for i in "$@"; do
429 case "$i" in
430 --wxx11) SPINWXX11=1 ;;
431 --wxgtk) SPINWXGTK=1 ;;
432 --wxmotif) SPINWXMOTIF=1 ;;
433 --wxmgl) SPINWXMGL=1 ;;
434 --wxmac) SPINWXMAC=1 ;;
435 --wxbase) SPINWXBASE=1 ;;
436 --all) SPINEVERYTHING=1 ;;
437 --updatecvs) UPDATECVS=1 ;;
438 *)
439 usage
440 exit
441 ;;
442 esac
443 done
444
445 echo About to make wxWindows RPMs:
446 echo From $WXSRC
447 echo To $WXDEST
448 echo Version $WXVER
449 echo CTRL-C if this is not correct.
450 read dummy
451
452 if [ "$UPDATECVS" = "1" ]; then
453 doupdatecvs
454 fi
455
456 if [ "$SPINWXX11" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
457 dospinwxx11
458 fi
459
460 if [ "$SPINWXGTK" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
461 dospinwxgtk
462 fi
463
464 if [ "$SPINWXBASE" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
465 dospinwxbase
466 fi
467
468 if [ "$SPINWXMOTIF" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
469 dospinwxmotif
470 fi
471
472 if [ "$SPINWXMGL" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
473 dospinwxmgl
474 fi
475
476 if [ "$SPINWXMAC" = "1" ]; then
477 dospinwxmac
478 fi
479