- Support 'dir' command in pkgdef

- New metainstalldir for when topdir needs to be / (like prngd, openssh)
- Allow make install to be skipped in generic_install
This commit is contained in:
Tom G. Christensen
2004-07-26 18:40:12 +00:00
parent 9994bcd1e5
commit de2bd7d63b
2 changed files with 70 additions and 24 deletions

View File

@@ -83,6 +83,7 @@ srcfiles=$buildpkgbase/srcfiles
topinstalldir=/usr/local
prefix=$topinstalldir
metainstalldir=$topinstalldir
# Keep this in hard-quotes to delay expansion
configure_args='--prefix=$prefix --disable-nls'
@@ -91,6 +92,7 @@ configure_args='--prefix=$prefix --disable-nls'
_docdir=share/doc
# Other relative dirs
_bindir=bin
_sbindir=sbin
_libdir=lib
_sharedir=share
_mandir=man
@@ -119,6 +121,10 @@ dostrip_shared=1 # default to stripping shared objects during the install stage
dostrip_static=1 # default to stripping static archives during the install stage
shortroot=0 # Deep or shallow stagedir?
# This is meant to aid custom install functions that wants
# to skip the clean stage & make install parts of generic_install
custom_install=0
# Distfiles should be named like this
# <name>-<version>-<pkgver>.sb-<os>-<cpu>-<pkgdirdesig>
# ie: libmad-0.14.2b-1.sb-sol5.8-sparcv9-local
@@ -496,7 +502,7 @@ generic_build()
if [ $? -ne 0 ]; then
error $E_BAD_CONFIG generic_build
fi
$MAKE_PROG
$MAKE_PROG
if [ $? -ne 0 ]; then
error $E_BAD_MAKE generic_build
fi
@@ -513,11 +519,13 @@ generic_install()
if [ "$arg1" != "x" ]; then
destvar=$arg1 # $1 was defined
fi
clean stage
setdir source
$MAKE_PROG $destvar=$stagedir install
if [ $? -ne 0 ]; then
error $E_BAD_MAKE generic_install
if [ "$custom_install" -eq 0 ]; then
clean stage
setdir source
$MAKE_PROG $destvar=$stagedir install
if [ $? -ne 0 ]; then
error $E_BAD_MAKE generic_install
fi
fi
if [ $dostrip -eq 1 ]; then
do_strip