r19066 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r19065‎ | r19066 | r19067 >
Date:17:32, 10 January 2007
Author:river
Status:old
Tags:
Comment:
allow .info to run scripts during build
Modified paths:
  • /trunk/tools/vanquish/vanquish (modified) (history)

Diff [purge]

Index: trunk/tools/vanquish/vanquish
@@ -14,13 +14,26 @@
1515 exit 1
1616 }
1717
 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+
1825 gnubuild() {
 26+ tryrun preconfigure
1927 CC=cc CXX=CC CFLAGS="-xO3 $pkg_cflags" \
2028 CPPFLAGS="-I/opt/wmf/include $pkg_cppflags" \
2129 LDFLAGS="-L/opt/wmf/lib -R/opt/wmf/lib $pkg_ldflags" \
2230 $pkg_confprog --prefix=/opt/wmf ${=pkg_confargs} || errexit "$0: configure failed"
 31+ tryrun postconfigure
 32+ tryrun prebuild
2333 gmake DESTDIR=$TMPDIR/install || errexit "$0: build failed"
 34+ tryrun postbuild
 35+ tryrun preinstall
2436 gmake DESTDIR=$TMPDIR/install install || errexit "$0: install failed"
 37+ tryrun postinstall
2538 }
2639
2740 if ! [ $# = 1 ]; then
@@ -77,7 +90,7 @@
7891 [ -z "$pkg_src" ] && errexit "$0: $INFO: no src given"
7992 [ -z "$pkg_srcdir" ] && errexit "$0: $INFO: no srcdir given"
8093
81 -echo "+ extract $pkg_src..." >&2
 94+echo "+ extract $pkg_src ..." >&2
8295 if [ "$pkg_src[-4,$#pkg_src]" = ".bz2" -o "$pkg_src[-5,$#pkg_src]" = ".tbz2" ]; then
8396 { bzip2 -dc $ROOT/$pkg_src | gtar xf - } || errexit "$0: cannot extract"
8497 else
@@ -87,7 +100,7 @@
88101 cd $pkg_srcdir || errexit "$0: cannot chdir"
89102
90103 for patch in ${=pkg_patches}; do
91 - echo "+ apply $patch..." >&2
 104+ echo "+ apply $patch ..." >&2
92105 /usr/local/bin/patch -p1 <$ROOT/$patch || errexit "$0: cannot apply $patch"
93106 done
94107