1# 2# 3# 4# Makefile for building OCI container images. 5# 6 7.if defined(WITH_OCIIMAGES) && !empty(WITH_OCIIMAGES) 8OCI_IMAGES= static dynamic minimal 9.endif 10 11oci-install: 12.if defined(WITH_OCIIMAGES) && !empty(WITH_OCIIMAGES) 13 mkdir -p ${DESTDIR}/ociimages 14. for _IMG in ${OCI_IMAGES} 15 cp -p ${.OBJDIR}/container-image-${_IMG}.txz ${DESTDIR}/ociimages 16. endfor 17.endif 18 19OCI_TARGETS= 20OCI_DEPS_static= 21OCI_DEPS_dynamic= container-image-static.txz 22OCI_DEPS_minimal= container-image-dynamic.txz 23 24.for _IMG in ${OCI_IMAGES} 25OCI_TARGETS+= container-image-${_IMG}.txz 26container-image-${_IMG}.txz: ${OCI_DEPS_${_IMG}} 27 # Adjust PATH so that we run pwd_mkdb from the bootstrap tools 28 env PATH=${OBJTOP}/tmp/legacy/bin:${PATH:Q} \ 29 sh ${.CURDIR}/scripts/make-oci-image.sh ${.CURDIR} ${REVISION} ${BRANCH} ${TARGET_ARCH} ${_IMG} 30 skopeo copy \ 31 containers-storage:localhost/freebsd${REVISION:R}-${_IMG}:latest \ 32 oci-archive:${.OBJDIR}/container-image-${_IMG}.tar:freebsd${REVISION:R}-${_IMG}:${REVISION}-${BRANCH}-${TARGET_ARCH} 33 ${XZ_CMD} < ${.OBJDIR}/container-image-${_IMG}.tar > ${.OBJDIR}/container-image-${_IMG}.txz 34.endfor 35 36oci-release: ${OCI_TARGETS} 37