Mercurial > dnsbl
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 |
rev | line source |
---|---|
107 | 1 #!/bin/bash |
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 | 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 | 20 BALL=$NAME-$VER.tar.gz |
21 web=/home/httpd/html/510sg/$NAME | |
22 distlog=/tmp/distcheck | |
23 | |
117 | 24 mkdir -p $web |
107 | 25 chown --recursive root:root * |
26 make -f *cvs | |
27 ./configure >/dev/null | |
28 (cd xml; make; make distclean) | |
113 | 29 cp -a html/*html $web |
107 | 30 make distcheck >$distlog 2>&1 |
31 if [ $? -eq 0 ]; then | |
32 if [ -f $BALL ]; then | |
33 # expand locally to see the tarball | |
34 rm -rf junk | |
113 | 35 mkdir junk |
36 cd junk | |
37 tar xfz ../$BALL | |
38 cd $NAME-$VER | |
39 ./configure >/dev/null | |
40 make >/dev/null | |
112 | 41 ## make install >/dev/null |
42 ## if [ -f /etc/rc.d/init.d/$NAME ]; then | |
43 ## /etc/rc.d/init.d/$NAME stop | |
44 ## fi | |
45 ## make chkconfig | |
46 ## if [ -f /etc/rc.d/init.d/$NAME ]; then | |
47 ## chkconfig $NAME on | |
48 ## /etc/rc.d/init.d/$NAME start | |
49 ## fi | |
113 | 50 cd .. |
51 cd .. | |
107 | 52 |
53 # build rpm on target | |
152 | 54 target5=pmg2 |
55 scp $BALL $target5:/tmp | |
56 ssh $target5 "cd /tmp; rpmbuild -ta $BALL" | |
57 | |
58 # build rpm on target | |
59 target4=host62 | |
60 scp $BALL $target4:/tmp | |
61 ssh $target4 "cd /tmp; rpmbuild -ta $BALL" | |
107 | 62 |
63 # add packages to the web site | |
64 wp=$web/packages | |
65 wp4=$wp/centos4 | |
152 | 66 wp5=$wp/centos5 |
67 mkdir -p $wp4 $wp5 | |
107 | 68 rp=/usr/src/redhat |
112 | 69 mv -f $BALL $wp |
152 | 70 scp $target4:$rp/SRPMS/$NAME-$VER*rpm $wp |
71 scp $target4:$rp/RPMS/i386/$NAME-$VER*rpm $wp4 | |
72 scp $target5:$rp/RPMS/i386/$NAME-$VER*rpm $wp5 | |
107 | 73 (cd $web; chown --recursive web:web *; ls -alR) |
74 rpm -ql -p $wp4/$NAME-$VER*6.rpm | |
152 | 75 rpm -ql -p $wp5/$NAME-$VER*6.rpm |
107 | 76 fi |
77 else | |
78 tail -10 $distlog | |
79 fi | |
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" |