1 |
#!/bin/sh |
#!/bin/bash |
2 |
|
# Build all locally maintained packages from CVS |
3 |
|
# Check whether anything is new and let us know if there is |
4 |
|
|
5 |
cd /mirrors/mitel/devel/repo/SRPMS |
# Normally run as "buildrobot" |
6 |
|
# Requires CVS/SSH access to cvs.sourceforge.net:/cvsroot/smeserver |
7 |
|
|
8 |
FAILED="" |
PATH=/builds/bin:$PATH |
9 |
|
export PATH |
10 |
|
|
11 |
for file in e-smith* |
cd ~/work |
12 |
|
|
13 |
|
for package in $(cat modules) |
14 |
do |
do |
15 |
if [ -f /builds/rpms/SRPMS/$file ] |
|
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 |
|
|
23 |
|
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 |
|
*) ;; |
30 |
|
esac |
31 |
|
|
32 |
|
echo -n "Checking $package "; date |
33 |
|
|
34 |
|
[ -d $package ] || mzget $package |
35 |
|
|
36 |
|
cd $package |
37 |
|
|
38 |
|
LOG=$package.log |
39 |
|
mzclean >$LOG 2>&1 |
40 |
|
|
41 |
|
SPEC=$(echo F/*.spec) # XXX - FIXME - only one SPEC file |
42 |
|
|
43 |
|
if [ ! -f $SPEC ] |
44 |
then |
then |
45 |
echo "Already built: $file" |
echo "Sorry - can't find $SPEC" |
46 |
continue |
continue |
47 |
fi |
fi |
48 |
|
|
49 |
echo "Building: $file" |
NVR=$(rpm -q --qf "%{NAME}-%{VERSION}-%{RELEASE}" --specfile $SPEC) |
50 |
if rpmbuild --rebuild $file |
|
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 |
then |
61 |
cp -p $file /builds/rpms/SRPMS |
release_rpms *.rpm |
62 |
else |
else |
63 |
echo "FAILED: $file" |
echo "Build of $package failed - check $LOG" |
|
FAILED="$FAILED $file" |
|
64 |
fi |
fi |
|
done |
|
65 |
|
|
66 |
echo "Failed to build: $FAILED" |
cd ~/work |
67 |
|
done |