Index: trunk/tools/vanquish/vanquish |
— | — | @@ -14,13 +14,26 @@ |
15 | 15 | exit 1 |
16 | 16 | } |
17 | 17 | |
| 18 | +tryrun() { |
| 19 | + if [ -x $ROOT/rc.$1 ]; then |
| 20 | + echo "+ rc.$1 ..." |
| 21 | + $ROOT/rc.$1 $TMPDIR/install || errexit "$0: failed to run rc.$1" |
| 22 | + fi |
| 23 | +} |
| 24 | + |
18 | 25 | gnubuild() { |
| 26 | + tryrun preconfigure |
19 | 27 | CC=cc CXX=CC CFLAGS="-xO3 $pkg_cflags" \ |
20 | 28 | CPPFLAGS="-I/opt/wmf/include $pkg_cppflags" \ |
21 | 29 | LDFLAGS="-L/opt/wmf/lib -R/opt/wmf/lib $pkg_ldflags" \ |
22 | 30 | $pkg_confprog --prefix=/opt/wmf ${=pkg_confargs} || errexit "$0: configure failed" |
| 31 | + tryrun postconfigure |
| 32 | + tryrun prebuild |
23 | 33 | gmake DESTDIR=$TMPDIR/install || errexit "$0: build failed" |
| 34 | + tryrun postbuild |
| 35 | + tryrun preinstall |
24 | 36 | gmake DESTDIR=$TMPDIR/install install || errexit "$0: install failed" |
| 37 | + tryrun postinstall |
25 | 38 | } |
26 | 39 | |
27 | 40 | if ! [ $# = 1 ]; then |
— | — | @@ -77,7 +90,7 @@ |
78 | 91 | [ -z "$pkg_src" ] && errexit "$0: $INFO: no src given" |
79 | 92 | [ -z "$pkg_srcdir" ] && errexit "$0: $INFO: no srcdir given" |
80 | 93 | |
81 | | -echo "+ extract $pkg_src..." >&2 |
| 94 | +echo "+ extract $pkg_src ..." >&2 |
82 | 95 | if [ "$pkg_src[-4,$#pkg_src]" = ".bz2" -o "$pkg_src[-5,$#pkg_src]" = ".tbz2" ]; then |
83 | 96 | { bzip2 -dc $ROOT/$pkg_src | gtar xf - } || errexit "$0: cannot extract" |
84 | 97 | else |
— | — | @@ -87,7 +100,7 @@ |
88 | 101 | cd $pkg_srcdir || errexit "$0: cannot chdir" |
89 | 102 | |
90 | 103 | for patch in ${=pkg_patches}; do |
91 | | - echo "+ apply $patch..." >&2 |
| 104 | + echo "+ apply $patch ..." >&2 |
92 | 105 | /usr/local/bin/patch -p1 <$ROOT/$patch || errexit "$0: cannot apply $patch" |
93 | 106 | done |
94 | 107 | |