annotate package @ 198:fbcf2733fe79

always rebuild from clean source control tip, rather than from working directory
author Carl Byington <carl@five-ten-sg.com>
date Sat, 02 Feb 2008 11:58:46 -0800
parents 8f4a9a37d4d9
children d1ef12ab18b6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
107
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
1 #!/bin/bash
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
2
192
8f4a9a37d4d9 delay autowhitelisting to avoid out of office reply bots
carl
parents: 152
diff changeset
3 find . -name '*~' | while read a; do rm -f "$a"; done
8f4a9a37d4d9 delay autowhitelisting to avoid out of office reply bots
carl
parents: 152
diff changeset
4
198
fbcf2733fe79 always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents: 192
diff changeset
5
fbcf2733fe79 always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents: 192
diff changeset
6 # get a new clean copy from source control
fbcf2733fe79 always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents: 192
diff changeset
7 orig=$(pwd)
fbcf2733fe79 always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents: 192
diff changeset
8 pack=$orig/../dnsbl-package
fbcf2733fe79 always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents: 192
diff changeset
9 [ -d "$pack" ] && rm -rf "$pack"
fbcf2733fe79 always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents: 192
diff changeset
10 mkdir "$pack"
fbcf2733fe79 always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents: 192
diff changeset
11 cd "$pack"
fbcf2733fe79 always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents: 192
diff changeset
12 hg clone /usr/hg-repository/dnsbl
fbcf2733fe79 always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents: 192
diff changeset
13 cd dnsbl
fbcf2733fe79 always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents: 192
diff changeset
14
fbcf2733fe79 always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents: 192
diff changeset
15
fbcf2733fe79 always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents: 192
diff changeset
16 # build the dnsbl package
148
9330b8d6a56b add documentation fixes, allow env_from target of inherit
carl
parents: 117
diff changeset
17 T=`grep AC_INIT configure.in | cut -d'(' -f2`
107
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
18 NAME=`echo $T | cut -d, -f1`
148
9330b8d6a56b add documentation fixes, allow env_from target of inherit
carl
parents: 117
diff changeset
19 VER=`echo $T | cut -d, -f2`
107
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
20 BALL=$NAME-$VER.tar.gz
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
21 web=/home/httpd/html/510sg/$NAME
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
22 distlog=/tmp/distcheck
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
23
117
aa07452e641b uribl patch from Jeff Evans <jeffe@tricab.com>
carl
parents: 113
diff changeset
24 mkdir -p $web
107
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
25 chown --recursive root:root *
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
26 make -f *cvs
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
27 ./configure >/dev/null
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
28 (cd xml; make; make distclean)
113
a893afee4b80 move to autoconf/automake/docbook
carl
parents: 112
diff changeset
29 cp -a html/*html $web
107
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
30 make distcheck >$distlog 2>&1
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
31 if [ $? -eq 0 ]; then
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
32 if [ -f $BALL ]; then
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
33 # expand locally to see the tarball
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
34 rm -rf junk
113
a893afee4b80 move to autoconf/automake/docbook
carl
parents: 112
diff changeset
35 mkdir junk
a893afee4b80 move to autoconf/automake/docbook
carl
parents: 112
diff changeset
36 cd junk
a893afee4b80 move to autoconf/automake/docbook
carl
parents: 112
diff changeset
37 tar xfz ../$BALL
a893afee4b80 move to autoconf/automake/docbook
carl
parents: 112
diff changeset
38 cd $NAME-$VER
a893afee4b80 move to autoconf/automake/docbook
carl
parents: 112
diff changeset
39 ./configure >/dev/null
a893afee4b80 move to autoconf/automake/docbook
carl
parents: 112
diff changeset
40 make >/dev/null
112
96b2eb7f25f5 move to autoconf/automake/docbook
carl
parents: 111
diff changeset
41 ## make install >/dev/null
96b2eb7f25f5 move to autoconf/automake/docbook
carl
parents: 111
diff changeset
42 ## if [ -f /etc/rc.d/init.d/$NAME ]; then
96b2eb7f25f5 move to autoconf/automake/docbook
carl
parents: 111
diff changeset
43 ## /etc/rc.d/init.d/$NAME stop
96b2eb7f25f5 move to autoconf/automake/docbook
carl
parents: 111
diff changeset
44 ## fi
96b2eb7f25f5 move to autoconf/automake/docbook
carl
parents: 111
diff changeset
45 ## make chkconfig
96b2eb7f25f5 move to autoconf/automake/docbook
carl
parents: 111
diff changeset
46 ## if [ -f /etc/rc.d/init.d/$NAME ]; then
96b2eb7f25f5 move to autoconf/automake/docbook
carl
parents: 111
diff changeset
47 ## chkconfig $NAME on
96b2eb7f25f5 move to autoconf/automake/docbook
carl
parents: 111
diff changeset
48 ## /etc/rc.d/init.d/$NAME start
96b2eb7f25f5 move to autoconf/automake/docbook
carl
parents: 111
diff changeset
49 ## fi
113
a893afee4b80 move to autoconf/automake/docbook
carl
parents: 112
diff changeset
50 cd ..
a893afee4b80 move to autoconf/automake/docbook
carl
parents: 112
diff changeset
51 cd ..
107
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
52
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
53 # build rpm on target
152
c7fc218686f5 gpl3, block mail to recipients that cannot reply
carl
parents: 148
diff changeset
54 target5=pmg2
c7fc218686f5 gpl3, block mail to recipients that cannot reply
carl
parents: 148
diff changeset
55 scp $BALL $target5:/tmp
c7fc218686f5 gpl3, block mail to recipients that cannot reply
carl
parents: 148
diff changeset
56 ssh $target5 "cd /tmp; rpmbuild -ta $BALL"
c7fc218686f5 gpl3, block mail to recipients that cannot reply
carl
parents: 148
diff changeset
57
c7fc218686f5 gpl3, block mail to recipients that cannot reply
carl
parents: 148
diff changeset
58 # build rpm on target
c7fc218686f5 gpl3, block mail to recipients that cannot reply
carl
parents: 148
diff changeset
59 target4=host62
c7fc218686f5 gpl3, block mail to recipients that cannot reply
carl
parents: 148
diff changeset
60 scp $BALL $target4:/tmp
c7fc218686f5 gpl3, block mail to recipients that cannot reply
carl
parents: 148
diff changeset
61 ssh $target4 "cd /tmp; rpmbuild -ta $BALL"
107
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
62
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
63 # add packages to the web site
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
64 wp=$web/packages
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
65 wp4=$wp/centos4
152
c7fc218686f5 gpl3, block mail to recipients that cannot reply
carl
parents: 148
diff changeset
66 wp5=$wp/centos5
c7fc218686f5 gpl3, block mail to recipients that cannot reply
carl
parents: 148
diff changeset
67 mkdir -p $wp4 $wp5
107
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
68 rp=/usr/src/redhat
112
96b2eb7f25f5 move to autoconf/automake/docbook
carl
parents: 111
diff changeset
69 mv -f $BALL $wp
152
c7fc218686f5 gpl3, block mail to recipients that cannot reply
carl
parents: 148
diff changeset
70 scp $target4:$rp/SRPMS/$NAME-$VER*rpm $wp
c7fc218686f5 gpl3, block mail to recipients that cannot reply
carl
parents: 148
diff changeset
71 scp $target4:$rp/RPMS/i386/$NAME-$VER*rpm $wp4
c7fc218686f5 gpl3, block mail to recipients that cannot reply
carl
parents: 148
diff changeset
72 scp $target5:$rp/RPMS/i386/$NAME-$VER*rpm $wp5
107
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
73 (cd $web; chown --recursive web:web *; ls -alR)
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
74 rpm -ql -p $wp4/$NAME-$VER*6.rpm
152
c7fc218686f5 gpl3, block mail to recipients that cannot reply
carl
parents: 148
diff changeset
75 rpm -ql -p $wp5/$NAME-$VER*6.rpm
107
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
76 fi
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
77 else
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
78 tail -10 $distlog
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
79 fi
eeaaecda4acc move to autoconf/automake/docbook
carl
parents:
diff changeset
80 chown --recursive carl:carl *
198
fbcf2733fe79 always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents: 192
diff changeset
81
fbcf2733fe79 always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents: 192
diff changeset
82
fbcf2733fe79 always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents: 192
diff changeset
83 # throw away the packaging directory
fbcf2733fe79 always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents: 192
diff changeset
84 cd "$pack/.."
fbcf2733fe79 always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents: 192
diff changeset
85 rm -rf dnsbl-package
fbcf2733fe79 always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents: 192
diff changeset
86 cd "$orig"