xbps-src: revamped build_style.
By default now it's assumed that if $build_style is not set, the template uses 'custom-install' build, .e.g do_{build,configure,install}. If it's set, a helper with the same name with .sh extension will be sourced to set do_{build,configure,install} phases. The exception is "meta-template" which currently it must be set via build_style, probably will change in the future.
This commit is contained in:
parent
31452a3a22
commit
90204b7b28
9 changed files with 86 additions and 123 deletions
26
xbps-src/helpers/gnu-makefile.sh
Normal file
26
xbps-src/helpers/gnu-makefile.sh
Normal file
|
@ -0,0 +1,26 @@
|
|||
#
|
||||
# This helper is for templates using GNU Makefiles.
|
||||
#
|
||||
do_build() {
|
||||
if [ -z "$make_cmd" ]; then
|
||||
make_cmd=make
|
||||
fi
|
||||
if [ -n "$XBPS_MAKEJOBS" -a -z "$disable_parallel_build" ]; then
|
||||
makejobs="-j$XBPS_MAKEJOBS"
|
||||
fi
|
||||
${make_cmd} ${makejobs} ${make_build_args} ${make_build_target}
|
||||
}
|
||||
|
||||
do_install() {
|
||||
local target
|
||||
|
||||
if [ -z "$make_install_target" ]; then
|
||||
target="DESTDIR=${DESTDIR} install"
|
||||
else
|
||||
target="${make_install_target}"
|
||||
fi
|
||||
if [ -z "$make_cmd" ]; then
|
||||
make_cmd=make
|
||||
fi
|
||||
${make_cmd} ${make_install_args} ${target}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue