3 # vim: set ts=4 sw=4 et:
6 # $1 - pkgname [REQUIRED]
7 # $2 - path to local repository [REQUIRED]
8 # $3 - cross-target [OPTIONAL]
10 if [ $# -lt 2 -o $# -gt 3 ]; then
11 echo "${0##*/}: invalid number of arguments: pkgname repository [cross-target]"
19 for f
in $XBPS_SHUTILSDIR/*.sh
; do
23 setup_pkg
"$PKGNAME" $XBPS_CROSS_BUILD
25 for f
in $XBPS_COMMONDIR/environment
/pkg
/*.sh
; do
29 if [ "$sourcepkg" != "$PKGNAME" ]; then
30 # Source all subpkg environment setup snippets.
31 for f
in ${XBPS_COMMONDIR}/environment
/setup-subpkg
/*.sh
; do
39 if [ -s $XBPS_MASTERDIR/.xbps_chroot_init
]; then
40 export XBPS_ARCH
=$
(<$XBPS_MASTERDIR/.xbps_chroot_init
)
44 run_pkg_hooks
"do-pkg"
47 run_pkg_hooks post-pkg