Path: blob/main/release/scripts/make-pkg-package.sh
101476 views
#!/bin/sh12# Simulate the build environment. Note that we need to unset some variables3# which are set in the src tree since they have different (unwanted) effects4# in the ports tree.5SRC_PKG_VERSION=${PKG_VERSION}6PKG_ABI=$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)7unset PKG_VERSION8unset MAKEFLAGS9unset PKGBASE10# Ports interprets CROSS_TOOLCHAIN differently from src, and having this set11# breaks the package-pkg build. For now, forcibly unset this and hope ports12# can find a working compiler.13if [ -n "$CROSS_TOOLCHAIN" ]; then14printf >&2 '%s: WARNING: CROSS_TOOLCHAIN will be ignored for the pkg build.\n' "$0"15unset CROSS_TOOLCHAIN16fi17export WRKDIRPREFIX=/tmp/ports.${TARGET}18export DISTDIR=/tmp/distfiles19export WRKDIR=$(make -C ${PORTSDIR}/ports-mgmt/pkg I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=YES -V WRKDIR)2021make -C ${PORTSDIR}/ports-mgmt/pkg TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \22CONFIGURE_ARGS="--host=$(uname -m)-portbld-freebsd${REVISION} --prefix=${LOCALBASE}" \23I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=YES \24BATCH=YES stage create-manifest2526${PKG_CMD} -o ABI=${PKG_ABI} \27create -v -m ${WRKDIR}/.metadir.pkg/ \28-r ${WRKDIR}/stage \29-p ${WRKDIR}/.PLIST.mktmp \30-o ${REPODIR}/${PKG_ABI}/${SRC_PKG_VERSION}313233