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 |
|
case $package in |
|
|
SMEServer*) ;; |
|
|
|
|
|
e-smith*) ;; |
|
|
|
|
|
smeserver*) ;; |
|
15 |
|
|
16 |
|
case $package in |
17 |
|
SMEServer) continue ;; |
18 |
|
builds_bin) continue ;; |
19 |
|
cdrom.image) continue ;; |
20 |
|
e-smith-qpsmtpd) continue ;; |
21 |
|
e-smith-spamassassin) continue ;; |
22 |
|
isolinux) continue ;; |
23 |
|
|
24 |
|
grub) echo "Not building $package" |
25 |
|
continue |
26 |
|
;; |
27 |
|
|
28 |
*) echo "Skipping $package" |
*) ;; |
|
continue |
|
|
;; |
|
29 |
esac |
esac |
30 |
|
|
31 |
build_it $package |
echo -n "Checking $package "; date |
|
done |
|
|
|
|
|
build_it() |
|
|
{ |
|
|
package=$1 |
|
32 |
|
|
33 |
[ -d $package ] || mzget $package |
[ -d $package ] || mzget $package |
34 |
|
|
35 |
( |
cd $package |
36 |
cd $package |
|
37 |
mzsync |
LOG=$package.log |
38 |
mzbuild |
mzclean >$LOG 2>&1 |
39 |
|
|
40 |
/builds/bin/release_rpms *.rpm |
SPEC=$(echo F/*.spec) # XXX - FIXME - only one SPEC file |
41 |
) |
|
42 |
} |
if [ ! -f $SPEC ] |
43 |
|
then |
44 |
|
echo "Sorry - can't find $SPEC" |
45 |
|
continue |
46 |
|
fi |
47 |
|
|
48 |
|
NVR=$(rpm -q --qf "%{NAME}-%{VERSION}-%{RELEASE}" --specfile $SPEC) |
49 |
|
|
50 |
|
SRPM=/builds/rpms/SRPMS/$NVR.src.rpm |
51 |
|
|
52 |
|
if [ -f $SRPM ] |
53 |
|
then |
54 |
|
echo "$SRPM already exists" |
55 |
|
continue |
56 |
|
fi |
57 |
|
|
58 |
|
if mzbuild >>$LOG 2>&1 |
59 |
|
then |
60 |
|
: |
61 |
|
else |
62 |
|
echo "Build of $package failed - check $LOG" |
63 |
|
fi |
64 |
|
|
65 |
|
cd ~/work |
66 |
|
done |