5 |
# Normally run as "buildrobot" |
# Normally run as "buildrobot" |
6 |
# Requires CVS/SSH access to cvs.sourceforge.net:/cvsroot/smeserver |
# Requires CVS/SSH access to cvs.sourceforge.net:/cvsroot/smeserver |
7 |
|
|
8 |
|
PATH=/builds/bin:$PATH |
9 |
|
export PATH |
10 |
|
|
11 |
cd ~/work |
cd ~/work |
12 |
|
|
13 |
for package in $(cat modules) |
for package in $(cat modules) |
14 |
do |
do |
15 |
|
|
16 |
case $package in |
case $package in |
17 |
SMEServer*) ;; |
SMEServer) continue ;; |
18 |
|
|
19 |
e-smith*) ;; |
e-smith*) ;; |
20 |
|
|
21 |
smeserver*) ;; |
smeserver*) ;; |
22 |
|
|
23 |
|
|
24 |
*) echo "Skipping $package" |
*) echo -n "Skipping $package "; date |
25 |
continue |
continue |
26 |
;; |
;; |
27 |
esac |
esac |
28 |
|
|
29 |
build_it $package |
echo -n "Checking $package "; date |
|
done |
|
|
|
|
|
build_it() |
|
|
{ |
|
|
package=$1 |
|
30 |
|
|
31 |
[ -d $package ] || mzget $package |
[ -d $package ] || mzget $package |
32 |
|
|
33 |
( |
cd $package |
34 |
cd $package |
|
35 |
mzsync |
LOG=$package.log |
36 |
mzbuild |
mzclean >>$LOG 2>&1 |
37 |
|
|
38 |
/builds/bin/release_rpms *.rpm |
SPEC=$(echo F/*.spec) # XXX - FIXME - only one SPEC file |
39 |
) |
|
40 |
} |
if [ ! -f $SPEC ] |
41 |
|
then |
42 |
|
echo "Sorry - can't find $SPEC" |
43 |
|
continue |
44 |
|
fi |
45 |
|
|
46 |
|
NVR=$(rpm -q --qf "%{NAME}-%{VERSION}-%{RELEASE}" --specfile $SPEC) |
47 |
|
|
48 |
|
SRPM=/builds/rpms/SRPMS/$NVR.src.rpm |
49 |
|
|
50 |
|
if [ -f $SRPM ] |
51 |
|
then |
52 |
|
echo "$SRPM already exists" |
53 |
|
continue |
54 |
|
fi |
55 |
|
|
56 |
|
if mzbuild >>$LOG 2>&1 |
57 |
|
then |
58 |
|
release_rpms *.rpm |
59 |
|
else |
60 |
|
echo "Build of $package failed - check $LOG" |
61 |
|
fi |
62 |
|
|
63 |
|
cd ~/work |
64 |
|
done |