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.2 |
|
19 |
gordonr |
1.5 |
e-smith*) ;; |
20 |
gordonr |
1.2 |
|
21 |
gordonr |
1.5 |
smeserver*) ;; |
22 |
gordonr |
1.2 |
|
23 |
|
|
|
24 |
gordonr |
1.4 |
*) echo -n "Skipping $package "; date |
25 |
gordonr |
1.2 |
continue |
26 |
|
|
;; |
27 |
|
|
esac |
28 |
|
|
|
29 |
gordonr |
1.6 |
echo -n "Checking $package "; date |
30 |
gordonr |
1.3 |
|
31 |
gordonr |
1.2 |
[ -d $package ] || mzget $package |
32 |
|
|
|
33 |
gordonr |
1.6 |
cd $package |
34 |
gordonr |
1.4 |
|
35 |
gordonr |
1.6 |
LOG=$package.log |
36 |
|
|
mzclean >>$LOG 2>&1 |
37 |
|
|
|
38 |
|
|
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 |
gordonr |
1.4 |
|
63 |
gordonr |
1.6 |
cd ~/work |
64 |
gordonr |
1.4 |
done |