annotate package @ 66:32f771bc9c1c

remove redundant requires from the spec file
author Carl Byington <carl@five-ten-sg.com>
date Tue, 26 Feb 2008 17:36:57 -0800
parents b4f025d95441
children
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
61
b4f025d95441 bump the version number in configure.in
Carl Byington <carl@five-ten-sg.com>
parents: 60
diff changeset
13 oldone=$web/packages/$BALL
b4f025d95441 bump the version number in configure.in
Carl Byington <carl@five-ten-sg.com>
parents: 60
diff changeset
14
b4f025d95441 bump the version number in configure.in
Carl Byington <carl@five-ten-sg.com>
parents: 60
diff changeset
15 if [ -f $oldone ]; then
b4f025d95441 bump the version number in configure.in
Carl Byington <carl@five-ten-sg.com>
parents: 60
diff changeset
16 echo "$oldone already exists, did you update the version in configure.in?"
b4f025d95441 bump the version number in configure.in
Carl Byington <carl@five-ten-sg.com>
parents: 60
diff changeset
17 exit 0
b4f025d95441 bump the version number in configure.in
Carl Byington <carl@five-ten-sg.com>
parents: 60
diff changeset
18 fi
18
69ab1d8b3293 switch to automake/autoconf
carl
parents: 15
diff changeset
19
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
20 # check for uncommitted changes
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
21 a=$(hg status)
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
22 if [ -n "$a" ]; then
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
23 hg status
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
24 echo "fix those first with 'hg commit'"
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
25 exit 0
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
26 fi
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
27
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
28 # 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
29 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
30 if [ $? -ne 0 ]; then
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
31 hg outgoing $repo
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
32 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
33 exit 0
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
34 fi
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
35
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
36 # 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
37 orig=$(pwd)
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
38 pack=$orig/../$NAME-package
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
39 [ -d "$pack" ] && rm -rf "$pack"
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
40 mkdir "$pack"
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
41 cd "$pack"
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
42 hg clone $repo
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
43 cd $NAME
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
44
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
45 # build the package
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
46 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
47 chown --recursive root:root *
18
69ab1d8b3293 switch to automake/autoconf
carl
parents: 15
diff changeset
48 make -f *cvs
69ab1d8b3293 switch to automake/autoconf
carl
parents: 15
diff changeset
49 ./configure >/dev/null
69ab1d8b3293 switch to automake/autoconf
carl
parents: 15
diff changeset
50 (cd xml; make; make distclean)
24
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
51 cp -a html/*html $web
18
69ab1d8b3293 switch to automake/autoconf
carl
parents: 15
diff changeset
52 make distcheck >$distlog 2>&1
69ab1d8b3293 switch to automake/autoconf
carl
parents: 15
diff changeset
53
24
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
54 if [ $? -eq 0 ]; then
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
55 if [ -f $BALL ]; then
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
56 # expand locally to see the tarball
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
57 rm -rf junk
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
58 mkdir junk
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
59 cd junk
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
60 tar xfz ../$BALL
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
61 cd $NAME-$VER
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
62 ./configure >/dev/null
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
63 make >/dev/null
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
64 cd ..
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
65 cd ..
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
66
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
67 # build rpm on target
31
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
68 target5=pmg2
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
69 scp $BALL $target5:/tmp
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
70 ssh $target5 "cd /tmp; rpmbuild -ta $BALL"
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
71
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
72 # build rpm on target
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
73 target4=host62
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
74 scp $BALL $target4:/tmp
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
75 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
76
24
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
77 # add packages to the web site
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
78 wp=$web/packages
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
79 wp4=$wp/centos4
31
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
80 wp5=$wp/centos5
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
81 mkdir -p $wp4 $wp5
24
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
82 rp=/usr/src/redhat
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
83 mv -f $BALL $wp
31
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
84 scp $target4:$rp/SRPMS/$NAME-$VER*rpm $wp
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
85 scp $target4:$rp/RPMS/i386/$NAME-$VER*rpm $wp4
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
86 scp $target5:$rp/RPMS/i386/$NAME-$VER*rpm $wp5
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
87 (cd $web; chown --recursive web:web *; ls -alR)
24
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
88 rpm -ql -p $wp4/$NAME-$VER*6.rpm
31
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 29
diff changeset
89 rpm -ql -p $wp5/$NAME-$VER*6.rpm
24
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
90 fi
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
91 else
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
92 tail -10 $distlog
f4643b609bdf switch to automake/autoconf
carl
parents: 18
diff changeset
93 fi
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
94
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
95 # throw away the packaging directory
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
96 cd "$pack/.."
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
97 rm -rf $NAME-package
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 32
diff changeset
98 cd "$orig"