From 274321e7fefd8fdb430352e5de000f28bcf4cca1 Mon Sep 17 00:00:00 2001 From: "Tom G. Christensen" Date: Sat, 12 Mar 2005 12:51:52 +0000 Subject: [PATCH] Make generic_build and generic_install able to descend into a subdir inside the sourcedir before doing their thing. --- buildpkg.functions | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/buildpkg.functions b/buildpkg.functions index d2b7ff7..91dc419 100644 --- a/buildpkg.functions +++ b/buildpkg.functions @@ -589,10 +589,10 @@ generic_prep() } # generic_build(): Take the necessary steps to build already prepared source -# params: none +# params: $1 = dir to descend to *inside* "source" - optional generic_build() { - setdir source + setdir ${srcdir}/${topsrcdir}/$1 ./configure $(_upls $configure_args) if [ $? -ne 0 ]; then @@ -605,12 +605,13 @@ generic_build() } # generic_install(): Install already built source -# params: $1 = destvar +# params: $1 = destvar [$2 = dir to descend to *inside* "source"] # destvar is the variable that make should override to install into the staging # area. default is DESTDIR, possible common alternatives are prefix and PREFIX # If shortroot=1 then we know that the install won't automatically create # $prefix inside the stagedir so we have to do it first and add $prefix # to the $destvar= argument +# If $2 is specified then we will descend into that subdir before attempting the install generic_install() { local dest="$stagedir" @@ -625,7 +626,7 @@ generic_install() dest="${stagedir}${prefix}" ${MKDIR} -p "$dest" fi - setdir source + setdir ${srcdir}/${topsrcdir}/$2 $MAKE_PROG $destvar=$dest install if [ $? -ne 0 ]; then error $E_BAD_MAKE generic_install