12 |
|
|
13 |
for package in $(cat modules) |
for package in $(cat modules) |
14 |
do |
do |
15 |
|
|
16 |
case $package in |
case $package in |
17 |
SMEServer) continue ;; |
SMEServer) continue ;; |
18 |
|
|
19 |
# e-smith*) ;; |
e-smith*) ;; |
20 |
|
|
21 |
smeserver*) ;; |
smeserver*) ;; |
22 |
|
|
23 |
|
|
24 |
*) echo -n "Skipping $package "; date |
*) echo -n "Skipping $package "; date |
26 |
;; |
;; |
27 |
esac |
esac |
28 |
|
|
29 |
echo -n "Building $package "; date |
echo -n "Checking $package "; date |
30 |
|
|
31 |
[ -d $package ] || mzget $package |
[ -d $package ] || mzget $package |
32 |
|
|
33 |
( |
cd $package |
|
cd $package |
|
|
|
|
|
LOG=$package.log |
|
|
mzclean >>$LOG 2>&1 |
|
34 |
|
|
35 |
if mzbuild >>$LOG 2>&1 |
LOG=$package.log |
36 |
then |
mzclean >>$LOG 2>&1 |
37 |
release_rpms *.rpm |
|
38 |
else |
SPEC=$(echo F/*.spec) # XXX - FIXME - only one SPEC file |
39 |
echo "Build of $package failed - check $LOG" |
|
40 |
fi |
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 |
|
|
63 |
|
cd ~/work |
64 |
done |
done |