3 # vim: set ts=4 sw=4 et:
6 # $1 - pkgname [REQUIRED]
7 # $2 - cross target [OPTIONAL]
9 if [ $# -lt 1 -o $# -gt 2 ]; then
10 echo "${0##*/}: invalid number of arguments: pkgname [cross-target]"
17 for f
in $XBPS_SHUTILSDIR/*.sh
; do
21 setup_pkg
"$PKGNAME" $XBPS_CROSS_BUILD
23 for f
in $XBPS_COMMONDIR/environment
/install
/*.sh
; do
28 XBPS_PREPKG_DONE
="${XBPS_STATEDIR}/${PKGNAME}_${XBPS_CROSS_BUILD}_prepkg_done"
30 if [ -z "$XBPS_BUILD_FORCEMODE" -a -f $XBPS_PREPKG_DONE ]; then
34 # If it's a subpkg execute the pkg_install() function.
35 if [ "$sourcepkg" != "$PKGNAME" ]; then
36 # Source all subpkg environment setup snippets.
37 for f
in ${XBPS_COMMONDIR}/environment
/setup-subpkg
/*.sh
; do
45 source_file
$XBPS_COMMONDIR/environment
/build-style
/${build_style}.sh
46 setup_pkg_depends
$pkgname ||
exit 1
49 touch -f $XBPS_PREPKG_DONE