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.12 |
isolinux) continue ;; |
23 |
gordonr |
1.2 |
|
24 |
gordonr |
1.11 |
grub) echo "Not building $package" |
25 |
|
|
continue |
26 |
|
|
;; |
27 |
|
|
|
28 |
gordonr |
1.7 |
*) ;; |
29 |
gordonr |
1.2 |
esac |
30 |
|
|
|
31 |
gordonr |
1.6 |
echo -n "Checking $package "; date |
32 |
gordonr |
1.3 |
|
33 |
gordonr |
1.2 |
[ -d $package ] || mzget $package |
34 |
|
|
|
35 |
gordonr |
1.6 |
cd $package |
36 |
gordonr |
1.4 |
|
37 |
gordonr |
1.6 |
LOG=$package.log |
38 |
gordonr |
1.7 |
mzclean >$LOG 2>&1 |
39 |
gordonr |
1.6 |
|
40 |
|
|
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 |
|
|
release_rpms *.rpm |
61 |
|
|
else |
62 |
|
|
echo "Build of $package failed - check $LOG" |
63 |
|
|
fi |
64 |
gordonr |
1.4 |
|
65 |
gordonr |
1.6 |
cd ~/work |
66 |
gordonr |
1.4 |
done |