pkgbase: Add the possibility to choose the output dir

The output dir is set to ${REPODIR}/${PKG_ABI}/${PKG_VERSION} now.
Add the possibility to specify the last componant and set it by default
to ${PKG_VERSION} as before.
This is useful for tests and also for building packages with the same
PKG_VERSION provided to check differences.
This commit is contained in:
Emmanuel Vadot 2020-08-06 16:14:43 +00:00
parent d0327929ab
commit 70fc0cc387

View File

@ -1789,6 +1789,7 @@ KSTAGEDIR?= ${OBJTOP}/kernelstage
REPODIR?= ${OBJROOT}repo REPODIR?= ${OBJROOT}repo
PKG_FORMAT?= txz PKG_FORMAT?= txz
PKGSIGNKEY?= # empty PKGSIGNKEY?= # empty
PKG_OUTPUT_DIR?= ${PKG_VERSION}
.ORDER: stage-packages create-packages .ORDER: stage-packages create-packages
.ORDER: create-packages create-world-packages .ORDER: create-packages create-world-packages
@ -1883,7 +1884,7 @@ create-world-package-${pkgname}: .PHONY
create -f ${PKG_FORMAT} -M ${WSTAGEDIR}/${pkgname}.ucl \ create -f ${PKG_FORMAT} -M ${WSTAGEDIR}/${pkgname}.ucl \
-p ${WSTAGEDIR}/${pkgname}.plist \ -p ${WSTAGEDIR}/${pkgname}.plist \
-r ${WSTAGEDIR} \ -r ${WSTAGEDIR} \
-o ${REPODIR}/${PKG_ABI}/${PKG_VERSION} -o ${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR}
.endfor .endfor
_default_flavor= -default _default_flavor= -default
@ -1916,7 +1917,7 @@ create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap
-M ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl \ -M ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl \
-p ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.plist \ -p ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.plist \
-r ${KSTAGEDIR}/${DISTDIR} \ -r ${KSTAGEDIR}/${DISTDIR} \
-o ${REPODIR}/${PKG_ABI}/${PKG_VERSION} -o ${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR}
. endfor . endfor
.endif .endif
.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes"
@ -1949,7 +1950,7 @@ create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_kerne
-M ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl \ -M ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl \
-p ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.plist \ -p ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.plist \
-r ${KSTAGEDIR}/kernel.${_kernel} \ -r ${KSTAGEDIR}/kernel.${_kernel} \
-o ${REPODIR}/${PKG_ABI}/${PKG_VERSION} -o ${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR}
. endfor . endfor
. endif . endif
. endfor . endfor
@ -1965,7 +1966,7 @@ sign-packages: _pkgbootstrap .PHONY
${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname config ABI)/${PKG_VERSION} \ ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname config ABI)/${PKG_VERSION} \
${PKGSIGNKEY} ; \ ${PKGSIGNKEY} ; \
cd ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname config ABI); \ cd ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname config ABI); \
ln -s ${PKG_VERSION} latest ln -s ${PKG_OUTPUT_DIR} latest
# #
# #