annotate package @ 59:7d5c637aaafb

General cleanup and code fixes. Use autoscan to cleanup our autoconf system. Use autoconf to detect when we need to use our XGetopt files and other header files. Decode BCC field. Fix missing LE32_CPU byte swapping for FILETIME types.
author Carl Byington <carl@five-ten-sg.com>
date Thu, 14 Feb 2008 14:55:32 -0800
parents c03974357771
children 97b7706bdda2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12
3f627519a92d properly ignore (second block zero) errors. that will just drop some unknown attachments, but the rest of the data is still found
carl
parents:
diff changeset
1 #!/bin/bash
3f627519a92d properly ignore (second block zero) errors. that will just drop some unknown attachments, but the rest of the data is still found
carl
parents:
diff changeset
2
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
3 find . -name '*~' | while read a; do rm -f "$a"; done
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
4
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
5 # setup environment
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
6 T=`grep AC_INIT configure.in | cut -d'(' -f2`
18
69ab1d8b3293 switch to automake/autoconf
carl
parents: 15
diff changeset
7 NAME=`echo $T | cut -d, -f1`
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
8 VER=`echo $T | cut -d, -f2`
18
69ab1d8b3293 switch to automake/autoconf
carl
parents: 15
diff changeset
9 BALL=$NAME-$VER.tar.gz
69ab1d8b3293 switch to automake/autoconf
carl
parents: 15
diff changeset
10 web=/home/httpd/html/510sg/$NAME
69ab1d8b3293 switch to automake/autoconf
carl
parents: 15
diff changeset
11 distlog=/tmp/distcheck
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
12 repo=/usr/hg-repository/$NAME
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
13 exit
18
69ab1d8b3293 switch to automake/autoconf
carl
parents: 15
diff changeset
14
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
15 # check for uncommitted changes
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
16 a=$(hg status)
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
17 if [ -n "$a" ]; then
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
18 hg status
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
19 echo "fix those first with 'hg commit'"
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
20 exit 0
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
21 fi
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
22
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
23 # check for changesets pending push to global repository
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
24 hg outgoing $repo | grep 'no changes found' >/dev/null
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
25 if [ $? -ne 0 ]; then
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
26 hg outgoing $repo
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
27 echo "fix those first with 'hg push $repo'"
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
28 exit 0
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
29 fi
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
30
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
31 # get a new clean copy from source control
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
32 orig=$(pwd)
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
33 pack=$orig/../$NAME-package
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
34 [ -d "$pack" ] && rm -rf "$pack"
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
35 mkdir "$pack"
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
36 cd "$pack"
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
37 hg clone $repo
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
38 cd $NAME
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
39
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
40 # build the package
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
41 mkdir -p $web
12
3f627519a92d properly ignore (second block zero) errors. that will just drop some unknown attachments, but the rest of the data is still found
carl
parents:
diff changeset
42 chown --recursive root:root *
18
69ab1d8b3293 switch to automake/autoconf
carl
parents: 15
diff changeset
43 make -f *cvs
69ab1d8b3293 switch to automake/autoconf
carl
parents: 15
diff changeset
44 ./configure >/dev/null
69ab1d8b3293 switch to automake/autoconf
carl
parents: 15
diff changeset
45 (cd xml; make; make distclean)
24
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
46 cp -a html/*html $web
18
69ab1d8b3293 switch to automake/autoconf
carl
parents: 15
diff changeset
47 make distcheck >$distlog 2>&1
69ab1d8b3293 switch to automake/autoconf
carl
parents: 15
diff changeset
48
24
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
49 if [ $? -eq 0 ]; then
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
50 if [ -f $BALL ]; then
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
51 # expand locally to see the tarball
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
52 rm -rf junk
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
53 mkdir junk
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
54 cd junk
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
55 tar xfz ../$BALL
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
56 cd $NAME-$VER
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
57 ./configure >/dev/null
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
58 make >/dev/null
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
59 cd ..
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
60 cd ..
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
61
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
62 # build rpm on target
31
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
63 target5=pmg2
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
64 scp $BALL $target5:/tmp
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
65 ssh $target5 "cd /tmp; rpmbuild -ta $BALL"
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
66
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
67 # build rpm on target
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
68 target4=host62
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
69 scp $BALL $target4:/tmp
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
70 ssh $target4 "cd /tmp; rpmbuild -ta $BALL"
12
3f627519a92d properly ignore (second block zero) errors. that will just drop some unknown attachments, but the rest of the data is still found
carl
parents:
diff changeset
71
24
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
72 # add packages to the web site
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
73 wp=$web/packages
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
74 wp4=$wp/centos4
31
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
75 wp5=$wp/centos5
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
76 mkdir -p $wp4 $wp5
24
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
77 rp=/usr/src/redhat
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
78 mv -f $BALL $wp
31
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
79 scp $target4:$rp/SRPMS/$NAME-$VER*rpm $wp
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
80 scp $target4:$rp/RPMS/i386/$NAME-$VER*rpm $wp4
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
81 scp $target5:$rp/RPMS/i386/$NAME-$VER*rpm $wp5
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
82 (cd $web; chown --recursive web:web *; ls -alR)
24
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
83 rpm -ql -p $wp4/$NAME-$VER*6.rpm
31
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
84 rpm -ql -p $wp5/$NAME-$VER*6.rpm
24
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
85 fi
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
86 else
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
87 tail -10 $distlog
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
88 fi
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
89 chown --recursive carl:carl *
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
90
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
91 # throw away the packaging directory
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
92 cd "$pack/.."
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
93 rm -rf $NAME-package
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
94 cd "$orig"