comparison package @ 107:eeaaecda4acc

move to autoconf/automake/docbook
author carl
date Sun, 18 Dec 2005 09:50:25 -0800
parents
children 1c7677042b78
comparison
equal deleted inserted replaced
106:2fbeeb4ced73 107:eeaaecda4acc
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 # make $BALL
11 chown --recursive root:root *
12 make -f *cvs
13 ./configure >/dev/null
14 (cd xml; make; make distclean)
15 cp -a html/*html $web
16 make distcheck >$distlog 2>&1
17 if [ $? -eq 0 ]; then
18 if [ -f $BALL ]; then
19 # expand locally to see the tarball
20 rm -rf junk
21 mkdir junk
22 cd junk
23 tar xfz ../$BALL
24 cd $NAME-$VER
25 ./configure >/dev/null
26 make >/dev/null
27 make install >/dev/null
28 if [ -f /etc/rc.d/init.d/$NAME ]; then
29 /etc/rc.d/init.d/$NAME stop
30 fi
31 make chkconfig
32 cd ..
33 cd ..
34
35 # build rpm on target
36 target=host62
37 scp $BALL $target:/tmp
38 ssh $target "cd /tmp; rpmbuild -ta $BALL >/dev/null 2>&1"
39
40 # add packages to the web site
41 wp=$web/packages
42 wp4=$wp/centos4
43 rp=/usr/src/redhat
44 cp -a $BALL $wp
45 scp $target:$rp/SRPMS/$NAME-$VER*rpm $wp4
46 scp $target:$rp/RPMS/i386/$NAME-$VER*rpm $wp4
47 (cd $web; chown --recursive web:web *; ls -alR)
48 rpm -ql -p $wp4/$NAME-$VER*6.rpm
49 fi
50 else
51 tail -10 $distlog
52 fi
53 chown --recursive carl:carl *