xref: /freebsd/release/scripts/make-pkg-package.sh (revision 51e235148a4becba94e824a44bd69687644a7f56)
1#!/bin/sh
2#
3#
4
5# Simulate the build environment.
6eval $(make -C ${SRCDIR} TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} buildenvvars)
7export WRKDIRPREFIX=/tmp/ports.${TARGET}
8export WSTAGEDIR=${WSTAGEDIR}
9export REPODIR=${REPODIR}
10export PKG_CMD=${PKG_CMD}
11export PKG_VERSION=${PKG_VERSION}
12export WRKDIR=$(make -C ${PORTSDIR}/ports-mgmt/pkg -V WRKDIR)
13
14make -C ${PORTSDIR}/ports-mgmt/pkg TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
15	CONFIGURE_ARGS="--host=$(uname -m)-portbld-freebsd${REVISION}" \
16	stage create-manifest
17
18${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh \
19	create -v -m ${WRKDIR}/.metadir/ \
20	-r ${WRKDIR}/stage \
21	-p ${WRKDIR}/.PLIST.mktmp \
22	-o ${REPODIR}/$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION}
23mkdir -p ${REPODIR}/$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION}/Latest/
24cd ${REPODIR}/$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION}/Latest/ && \
25	ln -s ../pkg-*.txz
26