xbps-src: use XBPS_LIBEXECDIR and XBPS_SHAREDIR in all scripts that need substs.
This commit is contained in:
parent
dd4feb7b41
commit
c011a2749b
5 changed files with 13 additions and 24 deletions
|
@ -55,7 +55,7 @@ mount_chroot_fs()
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
[ ! -d ${blah} ] && echo "failed." && continue
|
[ ! -d ${blah} ] && echo "failed." && continue
|
||||||
@@XBPS_INSTALL_LIBEXECDIR@@/capmount \
|
${XBPS_LIBEXECDIR}/capmount \
|
||||||
${dowrite} ${blah} ${MASTERDIR}/${f} \
|
${dowrite} ${blah} ${MASTERDIR}/${f} \
|
||||||
2>/dev/null
|
2>/dev/null
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
|
@ -85,7 +85,7 @@ umount_chroot_fs()
|
||||||
echo ${cnt} > ${MASTERDIR}/.${fs}_mount_bind_done
|
echo ${cnt} > ${MASTERDIR}/.${fs}_mount_bind_done
|
||||||
else
|
else
|
||||||
echo -n "=> Unmounting ${fs} from chroot... "
|
echo -n "=> Unmounting ${fs} from chroot... "
|
||||||
@@XBPS_INSTALL_LIBEXECDIR@@/capumount \
|
${XBPS_LIBEXECDIR}/capumount \
|
||||||
${MASTERDIR} ${fs} 2>/dev/null
|
${MASTERDIR} ${fs} 2>/dev/null
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
rm -f ${MASTERDIR}/.${fs}_mount_bind_done
|
rm -f ${MASTERDIR}/.${fs}_mount_bind_done
|
||||||
|
|
|
@ -28,23 +28,13 @@ PKG_TMPLNAME="$1"
|
||||||
|
|
||||||
if [ -n "${CONFIG_FILE}" -a -r "${CONFIG_FILE}" ]; then
|
if [ -n "${CONFIG_FILE}" -a -r "${CONFIG_FILE}" ]; then
|
||||||
. ${CONFIG_FILE}
|
. ${CONFIG_FILE}
|
||||||
else
|
|
||||||
if [ -n "$IN_CHROOT" ]; then
|
|
||||||
. /usr/local/etc/xbps-src.conf
|
|
||||||
else
|
|
||||||
. @@XBPS_INSTALL_ETCDIR@@/xbps-src.conf
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${MASTERDIR}" ]; then
|
if [ -n "${MASTERDIR}" ]; then
|
||||||
export XBPS_MASTERDIR="${MASTERDIR}"
|
export XBPS_MASTERDIR="${MASTERDIR}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$IN_CHROOT" ]; then
|
. ${XBPS_SHAREDIR}/shutils/init_funcs.sh
|
||||||
. /usr/local/share/xbps-src/shutils/init_funcs.sh
|
|
||||||
else
|
|
||||||
. @@XBPS_INSTALL_SHAREDIR@@/shutils/init_funcs.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
set_defvars
|
set_defvars
|
||||||
|
|
||||||
|
|
|
@ -26,16 +26,18 @@
|
||||||
_mount()
|
_mount()
|
||||||
{
|
{
|
||||||
MASTERDIR="${XBPS_MASTERDIR}" DISTRIBUTIONDIR="${XBPS_DISTRIBUTIONDIR}" \
|
MASTERDIR="${XBPS_MASTERDIR}" DISTRIBUTIONDIR="${XBPS_DISTRIBUTIONDIR}" \
|
||||||
HOSTDIR="${XBPS_HOSTDIR}" ${SUDO_CMD} \
|
HOSTDIR="${XBPS_HOSTDIR}" XBPS_ETCDIR="${XBPS_ETCDIR}" \
|
||||||
@@XBPS_INSTALL_LIBEXECDIR@@/chroot-helper mount
|
XBPS_SHAREDIR="${XBPS_SHAREDIR}" ${SUDO_CMD} \
|
||||||
|
${XBPS_LIBEXECDIR}/chroot-helper mount
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
_umount()
|
_umount()
|
||||||
{
|
{
|
||||||
MASTERDIR="${XBPS_MASTERDIR}" DISTRIBUTIONDIR="${XBPS_DISTRIBUTIONDIR}" \
|
MASTERDIR="${XBPS_MASTERDIR}" DISTRIBUTIONDIR="${XBPS_DISTRIBUTIONDIR}" \
|
||||||
HOSTDIR="${XBPS_HOSTDIR}" ${SUDO_CMD} \
|
HOSTDIR="${XBPS_HOSTDIR}" XBPS_ETCDIR="${XBPS_ETCDIR}" \
|
||||||
@@XBPS_INSTALL_LIBEXECDIR@@/chroot-helper umount
|
XBPS_SHAREDIR="${XBPS_SHAREDIR}" ${SUDO_CMD} \
|
||||||
|
${XBPS_LIBEXECDIR}/chroot-helper umount
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -129,19 +129,14 @@ install_pkg()
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$IN_CHROOT" ]; then
|
|
||||||
DOINST_HELPER=/usr/local/libexec/doinst-helper
|
|
||||||
else
|
|
||||||
DOINST_HELPER=@@XBPS_INSTALL_LIBEXECDIR@@/doinst-helper
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install pkg into destdir.
|
# Install pkg into destdir.
|
||||||
env XBPS_MACHINE=${XBPS_MACHINE} wrksrc=${wrksrc} \
|
env XBPS_MACHINE=${XBPS_MACHINE} wrksrc=${wrksrc} \
|
||||||
MASTERDIR="${XBPS_MASTERDIR}" \
|
MASTERDIR="${XBPS_MASTERDIR}" \
|
||||||
BOOTSTRAP_PKG_REBUILD=$BOOTSTRAP_PKG_REBUILD \
|
BOOTSTRAP_PKG_REBUILD=$BOOTSTRAP_PKG_REBUILD \
|
||||||
CONFIG_FILE=${XBPS_CONFIG_FILE} \
|
CONFIG_FILE=${XBPS_CONFIG_FILE} \
|
||||||
${FAKEROOT_CMD} ${FAKEROOT_CMD_ARGS} \
|
${FAKEROOT_CMD} ${FAKEROOT_CMD_ARGS} \
|
||||||
${DOINST_HELPER} ${curpkgn} || return $?
|
${XBPS_LIBEXECDIR}/doinst-helper ${curpkgn} \
|
||||||
|
|| return $?
|
||||||
|
|
||||||
# Strip binaries/libraries.
|
# Strip binaries/libraries.
|
||||||
strip_files
|
strip_files
|
||||||
|
|
|
@ -28,9 +28,11 @@ readonly XBPS_SRC_BUILD_VERSION=20111118
|
||||||
if [ -n "$IN_CHROOT" ]; then
|
if [ -n "$IN_CHROOT" ]; then
|
||||||
export XBPS_ETCDIR=/usr/local/etc/xbps
|
export XBPS_ETCDIR=/usr/local/etc/xbps
|
||||||
export XBPS_SHAREDIR=/usr/local/share/xbps-src
|
export XBPS_SHAREDIR=/usr/local/share/xbps-src
|
||||||
|
export XBPS_LIBEXECDIR=/usr/local/libexec
|
||||||
else
|
else
|
||||||
export XBPS_ETCDIR=@@XBPS_INSTALL_ETCDIR@@
|
export XBPS_ETCDIR=@@XBPS_INSTALL_ETCDIR@@
|
||||||
export XBPS_SHAREDIR=@@XBPS_INSTALL_SHAREDIR@@
|
export XBPS_SHAREDIR=@@XBPS_INSTALL_SHAREDIR@@
|
||||||
|
export XBPS_LIBEXECDIR=@@XBPS_INSTALL_LIBEXECDIR@@
|
||||||
fi
|
fi
|
||||||
|
|
||||||
XBPS_CONFIG_FILE=${XBPS_ETCDIR}/xbps-src.conf
|
XBPS_CONFIG_FILE=${XBPS_ETCDIR}/xbps-src.conf
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue