|
1 | 1 | #!/bin/sh |
2 | 2 |
|
3 | | -case "`uname -m 2>/dev/null`" in |
4 | | -x86_64) |
5 | | - USE_PIC=YesPlease |
6 | | - export USE_PIC |
7 | | - ;; |
8 | | -esac |
9 | | - |
10 | 3 | : ${J='-l 4 -j'} |
11 | 4 | G=/pub/software/scm/git && |
12 | 5 |
|
13 | | -# (cd $HOME/git 2>/dev/null || cd $HOME/git.git || exit ) && |
14 | | -make clean >/dev/null 2>&1 && |
15 | | -git reset --hard && |
16 | | -make clean >/dev/null 2>&1 && |
17 | | -git checkout master && |
18 | | -make clean >/dev/null 2>&1 && |
| 6 | +HERE=$(git symbolic-ref HEAD) || exit 1 |
| 7 | +THIS=$(git describe HEAD) |
19 | 8 |
|
20 | | -case "$(asciidoc --version 2>&1)" in |
21 | | -asciidoc' 8'.*) |
22 | | - ASCIIDOC8=YesPlease |
23 | | - export ASCIIDOC8 ;; |
24 | | -esac |
25 | | - |
26 | | -case "$1" in |
| 9 | +rm -f version |
| 10 | +case `hostname` in |
| 11 | +hera.kernel.org) |
| 12 | + narch='x86_64 i386' |
| 13 | + arch=x86_64 ;; |
| 14 | +wing-fc*|fc*.siamese.dyndns.org) |
| 15 | + eval $(rpm --showrc | sed -ne ' |
| 16 | + s/^-14: dist[ ]*\./dist=/p |
| 17 | + s/^-14: _build_arch[ ]*/arch=/p |
| 18 | + ') && |
| 19 | + test -n "$dist" && test -n "$arch" || exit 1 |
| 20 | + ;; |
| 21 | +*) echo >&2 "What are you talking about???" |
| 22 | + exit 1 ;; |
| 23 | +esac && |
| 24 | +: >./:all.log && |
| 25 | +echo "* Building $THIS" && |
| 26 | +make $J git >./:all.log 2>&1 && |
| 27 | +V=`./git --version | sed -e 's/git version //'` && |
| 28 | +make rpm >>./:all.log 2>&1 && |
| 29 | +case "$narch" in |
27 | 30 | '') |
28 | | - echo "* Building all" |
29 | | - : ${branches='next master maint pu'} |
30 | | - nstalled=install |
31 | | - for branch in $branches |
| 31 | + # This is not the primary build machine. |
| 32 | + status=$? |
| 33 | + case "$status" in |
| 34 | + 0) |
| 35 | + echo >&2 "Done -- move RPMS to the master machine." |
| 36 | + ( |
| 37 | + cd "$HOME/rpms/" && |
| 38 | + tar cf "TARBALL/$V.$arch.$dist.tar" \ |
| 39 | + RPMS/$arch/*-$V-*.$dist.$arch.rpm && |
| 40 | + ls -ld $HOME/rpms/TARBALL/$V.$arch.$dist.tar |
| 41 | + ) && |
| 42 | + make clean |
| 43 | + ;; |
| 44 | + ?) |
| 45 | + echo >&2 "Failed with status $status" |
| 46 | + ;; |
| 47 | + esac |
| 48 | + exit $status ;; |
| 49 | +*) |
| 50 | + make dist-doc >>./:all.log 2>&1 && |
| 51 | + ln -f git-$V.tar.gz $G/. && |
| 52 | + ln -f git-htmldocs-$V.tar.gz git-manpages-$V.tar.gz $G/. |
| 53 | + ;; |
| 54 | +esac >>./:all.log 2>&1 && |
| 55 | +case "$V" in |
| 56 | +*.rc[0-9]* | *-rc[0-9]*) |
| 57 | + mkdir -p $G/testing && |
| 58 | + for a in $narch |
32 | 59 | do |
33 | | - if git rev-parse --verify refs/heads/$branch 2>/dev/null |
34 | | - then |
35 | | - echo "** $branch **" && |
36 | | - git checkout $branch && |
37 | | - make $J $nstalled && |
38 | | - make test && |
39 | | - make clean && |
40 | | - nstalled=all || exit $? |
41 | | - else |
42 | | - echo |
43 | | - echo "* NO $branch" |
44 | | - echo |
45 | | - fi |
46 | | - done >:all.log 2>&1 |
| 60 | + for rr in $HOME/rpms/RPMS/$a/*-$V-*.$a.rpm |
| 61 | + do |
| 62 | + test -f "$rr" || continue |
| 63 | + ln -f "$rr" $G/testing/. |
| 64 | + done |
| 65 | + done && |
| 66 | + ln -f $HOME/rpms/SRPMS/git-$V-*.src.rpm $G/testing/. |
47 | 67 | ;; |
48 | | - |
49 | | -maint | maint-* | master) |
50 | | - rm -f version |
51 | | - case `hostname` in |
52 | | - hera.kernel.org) |
53 | | - narch='x86_64 i386' |
54 | | - arch=x86_64 ;; |
55 | | - wing-fc*|fc*.siamese.dyndns.org) |
56 | | - arch=i386 ;; |
57 | | - *) echo >&2 "What are you talking about???" |
58 | | - exit 1 ;; |
59 | | - esac && |
60 | | - : >./:all.log && |
61 | | - echo "* Building $1" && |
62 | | - git checkout "$1" && |
63 | | - make $J git >./:all.log 2>&1 && |
64 | | - V=`./git --version | sed -e 's/git version //'` && |
65 | | - make rpm >>./:all.log 2>&1 && |
66 | | - case "$narch" in |
67 | | - '') |
68 | | - # This is not the primary build machine. |
69 | | - status=$? |
70 | | - case "$status" in |
71 | | - 0) |
72 | | - echo >&2 "Done -- move RPMS to the master machine." |
73 | | - ( |
74 | | - cd "$HOME/rpms/" && |
75 | | - tar cf "TARBALL/$V.$arch.tar" \ |
76 | | - RPMS/$arch/*-$V-*.$arch.rpm && |
77 | | - ls -ld $HOME/rpms/TARBALL/$V.$arch.tar |
78 | | - ) |
79 | | - make clean |
80 | | - ;; |
81 | | - ?) |
82 | | - echo >&2 "Failed with status $status" |
83 | | - ;; |
84 | | - esac |
85 | | - exit $status ;; |
86 | | - *) |
87 | | - make dist-doc >>./:all.log 2>&1 && |
88 | | - ln -f git-$V.tar.gz $G/. && |
89 | | - ln -f git-htmldocs-$V.tar.gz git-manpages-$V.tar.gz $G/. |
90 | | - ;; |
91 | | - esac >>./:all.log 2>&1 && |
92 | | - case "$V" in |
93 | | - *.rc[0-9]* | *-rc[0-9]*) |
94 | | - mkdir -p $G/testing && |
95 | | - for a in $narch |
| 68 | +*) |
| 69 | + mkdir -p $G/RPMS/$arch $G/RPMS/SRPMS && |
| 70 | + for a in $narch |
| 71 | + do |
| 72 | + mkdir -p "$G/RPMS/$a" && |
| 73 | + for rr in $HOME/rpms/RPMS/$a/*-$V-*.$a.rpm |
96 | 74 | do |
97 | | - for rr in $HOME/rpms/RPMS/$a/*-$V-*.$a.rpm |
98 | | - do |
99 | | - test -f "$rr" || continue |
100 | | - ln -f "$rr" $G/testing/. |
101 | | - done |
102 | | - done && |
103 | | - ln -f $HOME/rpms/SRPMS/git-$V-*.src.rpm $G/testing/. |
104 | | - ;; |
105 | | - *) |
106 | | - mkdir -p $G/RPMS/$arch $G/RPMS/SRPMS && |
| 75 | + test -f "$rr" || continue |
| 76 | + ln -f "$rr" $G/RPMS/$a/. |
| 77 | + done |
| 78 | + done && |
| 79 | + ln -f $HOME/rpms/SRPMS/git-$V-*.src.rpm $G/RPMS/SRPMS/. && |
| 80 | + { |
| 81 | + # I do not know how it exits, and I do not care much. |
107 | 82 | for a in $narch |
108 | 83 | do |
109 | | - mkdir -p "$G/RPMS/$a" && |
110 | | - for rr in $HOME/rpms/RPMS/$a/*-$V-*.$a.rpm |
111 | | - do |
112 | | - test -f "$rr" || continue |
113 | | - ln -f "$rr" $G/RPMS/$a/. |
114 | | - done |
115 | | - done && |
116 | | - ln -f $HOME/rpms/SRPMS/git-$V-*.src.rpm $G/RPMS/SRPMS/. && |
117 | | - { |
118 | | - # I do not know how it exits, and I do not care much. |
119 | | - for a in $narch |
120 | | - do |
121 | | - /usr/local/bin/yummy $G/RPMS/$a |
122 | | - done |
123 | | - /usr/local/bin/yummy $G/RPMS/SRPMS |
124 | | - : |
125 | | - } >>./:all.log 2>&1 ;; |
126 | | - esac && |
127 | | - make clean && |
128 | | - |
129 | | - : ;; |
130 | | -esac || exit $? |
131 | | - |
132 | | -git checkout master |
| 84 | + /usr/local/bin/yummy $G/RPMS/$a |
| 85 | + done |
| 86 | + /usr/local/bin/yummy $G/RPMS/SRPMS |
| 87 | + : |
| 88 | + } >>./:all.log 2>&1 ;; |
| 89 | +esac && |
| 90 | +make clean |
0 commit comments