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