From dec6b4651ec0c7289e0d526de6cae50a8a0bb293 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 16 Jan 2010 00:04:40 +0100 Subject: [PATCH] shutils/build_funcs: "custom-install" pkgs can use do_build() func. That means that you can now build "custom-install" build_style packages in two stages, one for building and one for installation. --HG-- extra : convert_revision : 4fd76075a1a0bd173854272437c6ca3b263a6f62 --- xbps-src/shutils/build_funcs.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/xbps-src/shutils/build_funcs.sh b/xbps-src/shutils/build_funcs.sh index 57d6b2093d1..76660029730 100644 --- a/xbps-src/shutils/build_funcs.sh +++ b/xbps-src/shutils/build_funcs.sh @@ -34,12 +34,10 @@ build_src_phase() [ -z $pkgparam ] && [ -z $pkgname -o -z $version ] && return 1 # - # Skip this phase for: meta-template, only-install, custom-install - # style builds. + # Skip this phase for meta-template and only-install style builds. # [ "$build_style" = "meta-template" -o \ - "$build_style" = "only-install" -o \ - "$build_style" = "custom-install" ] && return 0 + "$build_style" = "only-install" ] && return 0 [ ! -d $wrksrc ] && msg_error "unexistent build directory [$wrksrc]" @@ -66,11 +64,15 @@ build_src_phase() msg_normal "Running build phase for $pkg." - # - # Build package via make. - # - ${make_cmd} ${makejobs} ${make_build_args} ${make_build_target} - [ $? -ne 0 ] && msg_error "building $pkg (build phase)." + if [ "$build_style" = "custom-install" ]; then + run_func do_build || msg_error "do_build stage failed!" + else + # + # Build package via make. + # + ${make_cmd} ${makejobs} ${make_build_args} ${make_build_target} + [ $? -ne 0 ] && msg_error "building $pkg (build phase)." + fi # Run post_build func. run_func post_build || msg_error "post_build stage failed!"