Mercurial > libpst
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 |
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 | 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 | 9 BALL=$NAME-$VER.tar.gz |
10 web=/home/httpd/html/510sg/$NAME | |
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 | 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 | 43 make -f *cvs |
44 ./configure >/dev/null | |
45 (cd xml; make; make distclean) | |
24 | 46 cp -a html/*html $web |
18 | 47 make distcheck >$distlog 2>&1 |
48 | |
24 | 49 if [ $? -eq 0 ]; then |
50 if [ -f $BALL ]; then | |
51 # expand locally to see the tarball | |
52 rm -rf junk | |
53 mkdir junk | |
54 cd junk | |
55 tar xfz ../$BALL | |
56 cd $NAME-$VER | |
57 ./configure >/dev/null | |
58 make >/dev/null | |
59 cd .. | |
60 cd .. | |
61 | |
62 # build rpm on target | |
31 | 63 target5=pmg2 |
64 scp $BALL $target5:/tmp | |
65 ssh $target5 "cd /tmp; rpmbuild -ta $BALL" | |
66 | |
67 # build rpm on target | |
68 target4=host62 | |
69 scp $BALL $target4:/tmp | |
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 | 72 # add packages to the web site |
73 wp=$web/packages | |
74 wp4=$wp/centos4 | |
31 | 75 wp5=$wp/centos5 |
76 mkdir -p $wp4 $wp5 | |
24 | 77 rp=/usr/src/redhat |
78 mv -f $BALL $wp | |
31 | 79 scp $target4:$rp/SRPMS/$NAME-$VER*rpm $wp |
80 scp $target4:$rp/RPMS/i386/$NAME-$VER*rpm $wp4 | |
81 scp $target5:$rp/RPMS/i386/$NAME-$VER*rpm $wp5 | |
82 (cd $web; chown --recursive web:web *; ls -alR) | |
24 | 83 rpm -ql -p $wp4/$NAME-$VER*6.rpm |
31 | 84 rpm -ql -p $wp5/$NAME-$VER*6.rpm |
24 | 85 fi |
86 else | |
87 tail -10 $distlog | |
88 fi | |
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" |