107
|
1 #!/bin/bash
|
|
2
|
|
3 T=`grep AM_INIT_AUTOMAKE configure.in | cut -d'(' -f2`
|
|
4 NAME=`echo $T | cut -d, -f1`
|
|
5 VER=`echo $T | cut -d, -f2 | cut -d')' -f1`
|
|
6 BALL=$NAME-$VER.tar.gz
|
|
7 web=/home/httpd/html/510sg/$NAME
|
|
8 distlog=/tmp/distcheck
|
|
9
|
|
10 chown --recursive root:root *
|
|
11 make -f *cvs
|
|
12 ./configure >/dev/null
|
|
13 (cd xml; make; make distclean)
|
110
|
14 # cp -a html/*html $web
|
107
|
15 make distcheck >$distlog 2>&1
|
|
16 if [ $? -eq 0 ]; then
|
|
17 if [ -f $BALL ]; then
|
|
18 # expand locally to see the tarball
|
|
19 rm -rf junk
|
112
|
20 ## mkdir junk
|
|
21 ## cd junk
|
|
22 ## tar xfz ../$BALL
|
|
23 ## cd $NAME-$VER
|
|
24 ## ./configure >/dev/null
|
|
25 ## make >/dev/null
|
|
26 ## make install >/dev/null
|
|
27 ## if [ -f /etc/rc.d/init.d/$NAME ]; then
|
|
28 ## /etc/rc.d/init.d/$NAME stop
|
|
29 ## fi
|
|
30 ## make chkconfig
|
|
31 ## if [ -f /etc/rc.d/init.d/$NAME ]; then
|
|
32 ## chkconfig $NAME on
|
|
33 ## /etc/rc.d/init.d/$NAME start
|
|
34 ## fi
|
|
35 ## cd ..
|
|
36 ## cd ..
|
107
|
37
|
|
38 # build rpm on target
|
|
39 target=host62
|
|
40 scp $BALL $target:/tmp
|
112
|
41 ssh $target "cd /tmp; rpmbuild -ta $BALL"
|
107
|
42
|
|
43 # add packages to the web site
|
|
44 wp=$web/packages
|
|
45 wp4=$wp/centos4
|
|
46 rp=/usr/src/redhat
|
112
|
47 mv -f $BALL $wp
|
|
48 scp $target:$rp/SRPMS/$NAME-$VER*rpm $wp
|
107
|
49 scp $target:$rp/RPMS/i386/$NAME-$VER*rpm $wp4
|
|
50 (cd $web; chown --recursive web:web *; ls -alR)
|
|
51 rpm -ql -p $wp4/$NAME-$VER*6.rpm
|
|
52 fi
|
|
53 else
|
|
54 tail -10 $distlog
|
|
55 fi
|
|
56 chown --recursive carl:carl *
|