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 sh ${.CURDIR}/scripts/make-oci-image.sh ${.CURDIR} ${REVISION} ${BRANCH} ${TARGET_ARCH} ${_IMG} 28 skopeo copy \ 29 containers-storage:localhost/freebsd${REVISION:R}-${_IMG}:latest \ 30 oci-archive:${.OBJDIR}/container-image-${_IMG}.tar:freebsd${REVISION:R}-${_IMG}:${REVISION}-${BRANCH}-${TARGET_ARCH} 31 ${XZ_CMD} < ${.OBJDIR}/container-image-${_IMG}.tar > ${.OBJDIR}/container-image-${_IMG}.txz 32.endfor 33 34oci-release: ${OCI_TARGETS} 35