]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/makerpm
Compilation fixes for wxUSE_STL=1.
[wxWidgets.git] / distrib / msw / makerpm
CommitLineData
db0834fa
JS
1#!/bin/sh
2# Makes the wxWindows RPMs
3
4doupdatecvs()
5{
6 cd $WXSRC
7 echo Updating from CVS...
8 cvswx update -d -P
9}
10
11dospinwxgtk()
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 --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 wxBase 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 echo Now try the RPMs with rpm -i.
69}
70
71dospinwxbase()
72{
73 echo Making wxBase RPMs...
74 RPM_ROOT=$WXDEST/wxbase/rpm-root
75
76 if [ ! -d $WXDEST ]; then
77 mkdir $WXDEST
78 fi
79
80 rm -f -r $WXDEST/wxbase
81 mkdir $WXDEST/wxbase
82 mkdir $WXDEST/wxbase/release
83 mkdir $RPM_ROOT
84
85 cd $WXSRC
86 cd locale
87 make allmo
88 cd $WXDEST/wxbase/release
89 echo Configuring...
90 $WXSRC/configure --disable-gui --no-recursion
91 echo Making...
92 make -j1 dist bzip-dist-only
93
94 echo Setting up RPM build dir $RPM_ROOT...
95 rm -f -r $RPM_ROOT
96 mkdir $RPM_ROOT
97 mkdir $RPM_ROOT/BUILD
98 mkdir $RPM_ROOT/RPMS
99 mkdir $RPM_ROOT/RPMS/i386
100 mkdir $RPM_ROOT/RPMS/i686
101 mkdir $RPM_ROOT/RPMS/noarch
102 mkdir $RPM_ROOT/SOURCES
103 mkdir $RPM_ROOT/SPECS
104 mkdir $RPM_ROOT/SRPMS
105
106 echo %_topdir $RPM_ROOT > ~/.rpmmacros
107
108 echo Copying wxBase-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES...
109 cp wxBase-$WXVER.tar.bz2 $RPM_ROOT/SOURCES
110 echo Copying wxBase.spec to $RPM_ROOT/SPECS...
111 cp $WXSRC/wxBase.spec $RPM_ROOT/SPECS
112
113 echo Starting wxBase RPM build...
114 cd $RPM_ROOT
115 rpmbuild -ba SPECS/wxBase.spec 2>&1 | tee wxBase.out
116
117 echo Finished wxBase RPM build, in $RPM_ROOT.
118 echo "SRPMS:"
119 ls SRPMS
120 echo "RPMS/i386:"
121 ls RPMS/i386
122
123 cp $RPM_ROOT/SRPMS/*.rpm $WXDEST
124 cp $RPM_ROOT/RPMS/*.rpm $WXDEST
125 cp $WXDEST/wxbase/release/*.tar.gz $WXDEST
126 cp $WXDEST/wxbase/release/*.tar.bz2 $WXDEST
127
128 echo Now try the RPMs with rpm -i.
129}
130
131dospinwxx11()
132{
133 echo Making wxX11 RPMs...
134 RPM_ROOT=$WXDEST/wxx11/rpm-root
135
136 if [ ! -d $WXDEST ]; then
137 mkdir $WXDEST
138 fi
139
140 rm -f -r $WXDEST/wxx11
141 mkdir $WXDEST/wxx11
142 mkdir $WXDEST/wxx11/release
143 mkdir $RPM_ROOT
144
145 cd $WXSRC
146 cd locale
147 make allmo
148 cd $WXDEST/wxx11/release
149 echo Configuring...
150 $WXSRC/configure --with-x11 --no-recursion
151 echo Making...
152 make -j1 dist bzip-dist-only
153
154 echo Setting up RPM build dir $RPM_ROOT...
155 rm -f -r $RPM_ROOT
156 mkdir $RPM_ROOT
157 mkdir $RPM_ROOT/BUILD
158 mkdir $RPM_ROOT/RPMS
159 mkdir $RPM_ROOT/RPMS/i386
160 mkdir $RPM_ROOT/RPMS/i686
161 mkdir $RPM_ROOT/RPMS/noarch
162 mkdir $RPM_ROOT/SOURCES
163 mkdir $RPM_ROOT/SPECS
164 mkdir $RPM_ROOT/SRPMS
165
166 echo %_topdir $RPM_ROOT > ~/.rpmmacros
167
168 echo Copying wxX11-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES...
169 cp wxX11-$WXVER.tar.bz2 $RPM_ROOT/SOURCES
170 echo Copying wxX11.spec to $RPM_ROOT/SPECS...
171 cp $WXSRC/wxX11.spec $RPM_ROOT/SPECS
172
173 echo Starting wxX11 RPM build...
174 cd $RPM_ROOT
175 rpmbuild -ba SPECS/wxX11.spec 2>&1 | tee wxX11.out
176
177 echo Finished wxX11 RPM build, in $RPM_ROOT.
178 echo "SRPMS:"
179 ls SRPMS
180 echo "RPMS/i386:"
181 ls RPMS/i386
182
183 cp $RPM_ROOT/SRPMS/*.rpm $WXDEST
184 cp $RPM_ROOT/RPMS/*.rpm $WXDEST
185 cp $WXDEST/wxx11/release/*.tar.gz $WXDEST
186 cp $WXDEST/wxx11/release/*.tar.bz2 $WXDEST
187
188 echo Now try the RPMs with rpm -i.
189}
190
db0834fa
JS
191PROGNAME=$0
192WXSRC=$1
193WXDEST=$2
194WXVER=$3
195
196SPINWXX11=0
197SPINWXGTK=0
198SPINWXBASE=0
199SPINEVERYTHING=0
200UPDATECVS=0
201
202usage()
203{
204 echo Usage: $PROGNAME "src-dir dest-dir version-number [ options ]"
205 echo Options:
206 echo " --help Display this help message"
207 echo " --wxgtk Spin wxGTK RPMs"
208 echo " --wxbase Spin wxBase RPMs"
209 echo " --wxx11 Spin wxX11 RPMs"
210 echo " --all Spin EVERYTHING"
211 echo " --updatecvs Update from CVS"
212
213 exit 1
214}
215
3885ccc5
JS
216init=""
217if [ "$1" = "" ]
218then
219 usage
220 exit
221fi
222
223if [ "$2" = "" ]
224then
225 usage
226 exit
227fi
228
229if [ "$3" = "" ]
230then
231 usage
232 exit
233fi
234
db0834fa
JS
235# Process command line options.
236shift 3
237for i in "$@"; do
238 case "$i" in
239 --wxx11) SPINWXX11=1 ;;
240 --wxgtk) SPINWXGTK=1 ;;
241 --wxbase) SPINWXBASE=1 ;;
242 --all) SPINEVERYTHING=1 ;;
243 --updatecvs) UPDATECVS=1 ;;
244 *)
245 usage
246 exit
247 ;;
248 esac
249done
250
251echo About to make wxWindows RPMs:
252echo From $WXSRC
253echo To $WXDEST
254echo Version $WXVER
255echo CTRL-C if this is not correct.
256read dummy
257
258if [ "$UPDATECVS" = "1" ]; then
259 doupdatecvs
260fi
261
262if [ "$SPINWXX11" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
263 dospinwxx11
264fi
265
266if [ "$SPINWXGTK" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
267 dospinwxgtk
268fi
269
270if [ "$SPINWXBASE" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
271 dospinwxbase
272fi
273