freebsd-skq/release/scripts/make-pkg-package.sh
matthew cb2ad1eb5f Revert r309339, thus re-instating r309314
The original problem with conflicting definitions of ${PKG_CMD} was
solved by r427523 in ports (see https://reviews.freebsd.org/D8677), so
this should be safe now.

Reviewed by:	gjb
Approved by:	gjb
Differential Revision:	https://reviews.freebsd.org/D8120
2016-12-16 23:05:47 +00:00

27 lines
973 B
Bash
Executable File

#!/bin/sh
#
# $FreeBSD$
#
# Simulate the build environment.
eval $(make -C ${SRCDIR} TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} buildenvvars)
export WRKDIRPREFIX=/tmp/ports.${TARGET}
export WSTAGEDIR=${WSTAGEDIR}
export REPODIR=${REPODIR}
export PKG_CMD=${PKG_CMD}
export PKG_VERSION=${PKG_VERSION}
export WRKDIR=$(make -C ${PORTSDIR}/ports-mgmt/pkg -V WRKDIR)
make -C ${PORTSDIR}/ports-mgmt/pkg TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
CONFIGURE_ARGS="--host=$(uname -m)-portbld-freebsd${REVISION}" \
stage create-manifest
${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh \
create -v -m ${WRKDIR}/.metadir/ \
-r ${WRKDIR}/stage \
-p ${WRKDIR}/.PLIST.mktmp \
-o ${REPODIR}/$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION}
mkdir -p ${REPODIR}/$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION}/Latest/
cd ${REPODIR}/$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION}/Latest/ && \
ln -s ../pkg-*.txz