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