xref: /freebsd/release/Makefile (revision 2d4ff62f0094f8635ffad8d72dbc2f89e234e8fd)
197d92980SPeter Wemm# $FreeBSD$
20202c140SRodney W. Grimes#
312ad0bb1SNathan Whitehorn# Makefile for building releases and release media.
4bd668f6fSPoul-Henning Kamp#
512ad0bb1SNathan Whitehorn# User-driven targets:
68cec99b6SGlen Barber#  cdrom: Builds release CD-ROM media (disc1.iso)
75d27274aSGlen Barber#  dvdrom: Builds release DVD-ROM media (dvd1.iso)
83c334738SGlen Barber#  memstick: Builds memory stick image (memstick.img)
9a9da1707SGlen Barber#  mini-memstick: Builds minimal memory stick image (mini-memstick.img)
1012ad0bb1SNathan Whitehorn#  ftp: Sets up FTP distribution area (ftp)
1112ad0bb1SNathan Whitehorn#  release: Build all media and FTP distribution area
12*2d4ff62fSGlen Barber#  install: Invokes the release-install and vm-install targets
13*2d4ff62fSGlen Barber#  release-install: Copies all release installation media into ${DESTDIR}
14*2d4ff62fSGlen Barber#  vm-install: Copies all virtual machine images into ${DESTDIR}
15bd668f6fSPoul-Henning Kamp#
1612ad0bb1SNathan Whitehorn# Variables affecting the build process:
1712ad0bb1SNathan Whitehorn#  WORLDDIR: location of src tree -- must have built world and default kernel
1812ad0bb1SNathan Whitehorn#            (by default, the directory above this one)
1912ad0bb1SNathan Whitehorn#  PORTSDIR: location of ports tree to distribute (default: /usr/ports)
2012ad0bb1SNathan Whitehorn#  DOCDIR:   location of doc tree (default: /usr/doc)
219d22cb2eSHiroki Sato#  NOPKG:    if set, do not distribute third-party packages
2212ad0bb1SNathan Whitehorn#  NOPORTS:  if set, do not distribute ports tree
2312ad0bb1SNathan Whitehorn#  NOSRC:    if set, do not distribute source tree
2412ad0bb1SNathan Whitehorn#  NODOC:    if set, do not generate release documentation
25f7f650c7SGlen Barber#  WITH_DVD: if set, generate dvd1.iso
2655af5cf1SGlen Barber#  WITH_COMPRESSED_IMAGES: if set, compress installation images with xz(1)
27cbc0e08aSGlen Barber#		(uncompressed images are not removed)
28a68d274bSGlen Barber#  WITH_VMIMAGES: if set, build virtual machine images with the release
29a9278c16SGlen Barber#  WITH_COMPRESSED_VMIMAGES: if set, compress virtual machine disk images
30a9278c16SGlen Barber#  		with xz(1) (extremely time consuming)
31*2d4ff62fSGlen Barber#  WITH_CLOUDWARE: if set, build cloud hosting disk images with the release
3212ad0bb1SNathan Whitehorn#  TARGET/TARGET_ARCH: architecture of built release
33b03ddec9SJohn Baldwin#
34ab0e9cdcSPoul-Henning Kamp
3512ad0bb1SNathan WhitehornWORLDDIR?=	${.CURDIR}/..
3612ad0bb1SNathan WhitehornPORTSDIR?=	/usr/ports
3712ad0bb1SNathan WhitehornDOCDIR?=	/usr/doc
3812ad0bb1SNathan WhitehornRELNOTES_LANG?= en_US.ISO8859-1
393b485e46SGlen BarberXZCMD?=		/usr/bin/xz
40fff8eb57SJohn Baldwin
41464485c8SHiroki Sato.if !defined(TARGET) || empty(TARGET)
42464485c8SHiroki SatoTARGET=		${MACHINE}
43464485c8SHiroki Sato.endif
44464485c8SHiroki Sato.if !defined(TARGET_ARCH) || empty(TARGET_ARCH)
450bd47e83SNathan Whitehorn.if ${TARGET} == ${MACHINE}
46464485c8SHiroki SatoTARGET_ARCH=	${MACHINE_ARCH}
478f1f55e9SRuslan Ermilov.else
48464485c8SHiroki SatoTARGET_ARCH=	${TARGET}
49464485c8SHiroki Sato.endif
508f1f55e9SRuslan Ermilov.endif
5112ad0bb1SNathan WhitehornIMAKE=		${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}
52876acefaSHiroki SatoDISTDIR=	dist
538f1f55e9SRuslan Ermilov
54de17cbccSHiroki Sato# Define OSRELEASE by using newvars.sh
55de17cbccSHiroki Sato.if !defined(OSRELEASE) || empty(OSRELEASE)
56de17cbccSHiroki Sato.for _V in TYPE BRANCH REVISION
57de17cbccSHiroki Sato${_V}!=	eval $$(awk '/^${_V}=/{print}' ${.CURDIR}/../sys/conf/newvers.sh); echo $$${_V}
58de17cbccSHiroki Sato.endfor
59de17cbccSHiroki Sato.for _V in ${TARGET_ARCH}
60de17cbccSHiroki Sato.if !empty(TARGET:M${_V})
61de17cbccSHiroki SatoOSRELEASE=	${TYPE}-${REVISION}-${BRANCH}-${TARGET}
62745ca085SGlen BarberVOLUME_LABEL=	${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET}
63de17cbccSHiroki Sato.else
64de17cbccSHiroki SatoOSRELEASE=	${TYPE}-${REVISION}-${BRANCH}-${TARGET}-${TARGET_ARCH}
65745ca085SGlen BarberVOLUME_LABEL=	${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH}
66de17cbccSHiroki Sato.endif
67de17cbccSHiroki Sato.endfor
68de17cbccSHiroki Sato.endif
69de17cbccSHiroki Sato
7069c7d069SGlen Barber.if !defined(VOLUME_LABEL) || empty(VOLUME_LABEL)
7169c7d069SGlen BarberVOLUME_LABEL=	FreeBSD_Install
7269c7d069SGlen Barber.endif
73ac23f460SGlen Barber
7412ad0bb1SNathan Whitehorn.if !exists(${DOCDIR})
7512ad0bb1SNathan WhitehornNODOC= true
7612ad0bb1SNathan Whitehorn.endif
7712ad0bb1SNathan Whitehorn.if !exists(${PORTSDIR})
7812ad0bb1SNathan WhitehornNOPORTS= true
79dd1a1b3dSJoerg Wunsch.endif
80dd1a1b3dSJoerg Wunsch
8112ad0bb1SNathan WhitehornEXTRA_PACKAGES=
826daa108fSRuslan Ermilov.if !defined(NOPORTS)
8312ad0bb1SNathan WhitehornEXTRA_PACKAGES+= ports.txz
846daa108fSRuslan Ermilov.endif
854731faa3SJordan K. Hubbard.if !defined(NOSRC)
8612ad0bb1SNathan WhitehornEXTRA_PACKAGES+= src.txz
872e3a1557SKen Smith.endif
88a1b193b5SJohn Baldwin.if !defined(NODOC)
8912ad0bb1SNathan WhitehornEXTRA_PACKAGES+= reldoc
90b2200964SJohn Baldwin.endif
91b2200964SJohn Baldwin
9212ad0bb1SNathan WhitehornRELEASE_TARGETS= ftp
93876acefaSHiroki SatoIMAGES=
9412ad0bb1SNathan Whitehorn.if exists(${.CURDIR}/${TARGET}/mkisoimages.sh)
9512ad0bb1SNathan WhitehornRELEASE_TARGETS+= cdrom
968cec99b6SGlen BarberIMAGES+=	disc1.iso bootonly.iso
97d8824524SGlen Barber. if defined(WITH_DVD) && !empty(WITH_DVD)
98dc244562SGlen BarberRELEASE_TARGETS+= dvdrom
99dc244562SGlen BarberIMAGES+=	dvd1.iso
100dc244562SGlen Barber. endif
1016daa108fSRuslan Ermilov.endif
10212ad0bb1SNathan Whitehorn.if exists(${.CURDIR}/${TARGET}/make-memstick.sh)
1033c334738SGlen BarberRELEASE_TARGETS+= memstick.img
104a9da1707SGlen BarberRELEASE_TARGETS+= mini-memstick.img
1053c334738SGlen BarberIMAGES+=	memstick.img
106a9da1707SGlen BarberIMAGES+=	mini-memstick.img
107e738d1eaSJohn Baldwin.endif
108e738d1eaSJohn Baldwin
10946b13263SHiroki SatoCLEANFILES=	packagesystem *.txz MANIFEST system ${IMAGES}
1100c535991SGlen Barber.if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES)
1110c535991SGlen Barber. for I in ${IMAGES}
11255af5cf1SGlen BarberCLEANFILES+=	${I}.xz
1130c535991SGlen Barber. endfor
1140c535991SGlen Barber.endif
115cd15d7f3SGlen Barber.if defined(WITH_DVD) && !empty(WITH_DVD)
116cd15d7f3SGlen BarberCLEANFILES+=	pkg-stage
117cd15d7f3SGlen Barber.endif
11846b13263SHiroki SatoCLEANDIRS=	dist ftp release bootonly dvd
11946b13263SHiroki Satobeforeclean:
12046b13263SHiroki Sato	chflags -R noschg .
1218eb4e096SRuslan Ermilov.include <bsd.obj.mk>
12246b13263SHiroki Satoclean: beforeclean
12312ad0bb1SNathan Whitehorn
12412ad0bb1SNathan Whitehornbase.txz:
125876acefaSHiroki Sato	mkdir -p ${DISTDIR}
126876acefaSHiroki Sato	cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${.OBJDIR}/${DISTDIR}
12712ad0bb1SNathan Whitehorn# Set up mergemaster root database
128672d7ddbSSean Bruno	sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \
129876acefaSHiroki Sato	    "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" -D "${.OBJDIR}/${DISTDIR}/base"
130e9120a25SGlen Barber	etcupdate extract -B -M "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" \
131d6d73d47SJohn Hay	    -s ${WORLDDIR} -d "${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate"
132bfc3bab8SNathan Whitehorn# Package all components
133876acefaSHiroki Sato	cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR}
134876acefaSHiroki Sato	mv ${DISTDIR}/*.txz .
13512ad0bb1SNathan Whitehorn
13612ad0bb1SNathan Whitehornkernel.txz:
137876acefaSHiroki Sato	mkdir -p ${DISTDIR}
138876acefaSHiroki Sato	cd ${WORLDDIR} && ${IMAKE} distributekernel packagekernel DISTDIR=${.OBJDIR}/${DISTDIR}
139876acefaSHiroki Sato	mv ${DISTDIR}/kernel*.txz .
14012ad0bb1SNathan Whitehorn
14112ad0bb1SNathan Whitehornsrc.txz:
142876acefaSHiroki Sato	mkdir -p ${DISTDIR}/usr
14312ad0bb1SNathan Whitehorn	ln -fs ${WORLDDIR} ${DISTDIR}/usr/src
1449f5907dbSGlen Barber	cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/src.txz --exclude .svn --exclude .zfs \
14523659c9dSGlen Barber	    --exclude .git --exclude @ --exclude usr/src/release/dist usr/src
14612ad0bb1SNathan Whitehorn
14712ad0bb1SNathan Whitehornports.txz:
148876acefaSHiroki Sato	mkdir -p ${DISTDIR}/usr
14912ad0bb1SNathan Whitehorn	ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports
15012ad0bb1SNathan Whitehorn	cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/ports.txz \
15123659c9dSGlen Barber	    --exclude .git --exclude .svn \
15212ad0bb1SNathan Whitehorn	    --exclude usr/ports/distfiles --exclude usr/ports/packages \
15312ad0bb1SNathan Whitehorn	    --exclude 'usr/ports/INDEX*' --exclude work usr/ports
15412ad0bb1SNathan Whitehorn
15512ad0bb1SNathan Whitehornreldoc:
15612ad0bb1SNathan Whitehorn	cd ${.CURDIR}/doc && ${MAKE} all install clean 'FORMATS=html txt' \
15712ad0bb1SNathan Whitehorn	    INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${.OBJDIR}/rdoc
158876acefaSHiroki Sato	mkdir -p reldoc
15912ad0bb1SNathan Whitehorn.for i in hardware readme relnotes errata
16053089271STijl Coosemans	ln -f rdoc/${RELNOTES_LANG}/${i}/article.txt reldoc/${i:tu}.TXT
16153089271STijl Coosemans	ln -f rdoc/${RELNOTES_LANG}/${i}/article.html reldoc/${i:tu}.HTM
16212ad0bb1SNathan Whitehorn.endfor
163876acefaSHiroki Sato	cp rdoc/${RELNOTES_LANG}/readme/docbook.css reldoc
16412ad0bb1SNathan Whitehorn
16512ad0bb1SNathan Whitehornsystem: packagesystem
16612ad0bb1SNathan Whitehorn# Install system
167876acefaSHiroki Sato	mkdir -p release
1686e352319SNathan Whitehorn	cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \
169ba7bd912SGlen Barber		DESTDIR=${.OBJDIR}/release MK_RESCUE=no MK_KERNEL_SYMBOLS=no \
170ffc6fb79SGlen Barber		MK_PROFILE=no MK_SENDMAIL=no MK_TESTS=no MK_LIB32=no \
171ffc6fb79SGlen Barber		MK_DEBUG_FILES=no
17212ad0bb1SNathan Whitehorn# Copy distfiles
173876acefaSHiroki Sato	mkdir -p release/usr/freebsd-dist
174ffc6fb79SGlen Barber	for dist in MANIFEST $$(ls *.txz | grep -v -- '-dbg'); \
175ffc6fb79SGlen Barber	    do cp $${dist} release/usr/freebsd-dist; \
176ffc6fb79SGlen Barber	done
17712ad0bb1SNathan Whitehorn# Copy documentation, if generated
17812ad0bb1SNathan Whitehorn.if !defined(NODOC)
179876acefaSHiroki Sato	cp reldoc/* release
18012ad0bb1SNathan Whitehorn.endif
18112ad0bb1SNathan Whitehorn# Set up installation environment
182de17cbccSHiroki Sato	ln -fs /tmp/bsdinstall_etc/resolv.conf release/etc/resolv.conf
183876acefaSHiroki Sato	echo sendmail_enable=\"NONE\" > release/etc/rc.conf
184876acefaSHiroki Sato	echo hostid_enable=\"NO\" >> release/etc/rc.conf
18573e46dbaSGlen Barber	echo debug.witness.trace=0 >> release/etc/sysctl.conf
1867f100614SGlen Barber	echo vfs.mountroot.timeout=\"10\" >> release/boot/loader.conf
187876acefaSHiroki Sato	cp ${.CURDIR}/rc.local release/etc
188876acefaSHiroki Sato	touch ${.TARGET}
18912ad0bb1SNathan Whitehorn
19046c413feSNathan Whitehornbootonly: packagesystem
19146c413feSNathan Whitehorn# Install system
192876acefaSHiroki Sato	mkdir -p bootonly
19346c413feSNathan Whitehorn	cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \
194ba7bd912SGlen Barber	    DESTDIR=${.OBJDIR}/bootonly MK_AMD=no MK_AT=no \
195ba7bd912SGlen Barber	    MK_GAMES=no MK_GROFF=no \
196ba7bd912SGlen Barber	    MK_INSTALLLIB=no MK_LIB32=no MK_MAIL=no \
197ba7bd912SGlen Barber	    MK_NCP=no MK_TOOLCHAIN=no MK_PROFILE=no \
198ba7bd912SGlen Barber	    MK_INSTALLIB=no MK_RESCUE=no MK_DICT=no \
199ffc6fb79SGlen Barber	    MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no
20046c413feSNathan Whitehorn# Copy manifest only (no distfiles) to get checksums
201876acefaSHiroki Sato	mkdir -p bootonly/usr/freebsd-dist
202876acefaSHiroki Sato	cp MANIFEST bootonly/usr/freebsd-dist
20346c413feSNathan Whitehorn# Copy documentation, if generated
20446c413feSNathan Whitehorn.if !defined(NODOC)
205876acefaSHiroki Sato	cp reldoc/* bootonly
20646c413feSNathan Whitehorn.endif
20746c413feSNathan Whitehorn# Set up installation environment
208de17cbccSHiroki Sato	ln -fs /tmp/bsdinstall_etc/resolv.conf bootonly/etc/resolv.conf
209876acefaSHiroki Sato	echo sendmail_enable=\"NONE\" > bootonly/etc/rc.conf
210876acefaSHiroki Sato	echo hostid_enable=\"NO\" >> bootonly/etc/rc.conf
21173e46dbaSGlen Barber	echo debug.witness.trace=0 >> bootonly/etc/sysctl.conf
2127f100614SGlen Barber	echo vfs.mountroot.timeout=\"10\" >> bootonly/boot/loader.conf
213876acefaSHiroki Sato	cp ${.CURDIR}/rc.local bootonly/etc
21446c413feSNathan Whitehorn
215dc244562SGlen Barberdvd:
216dc244562SGlen Barber# Install system
217dc244562SGlen Barber	mkdir -p ${.TARGET}
218dc244562SGlen Barber	cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \
219ba7bd912SGlen Barber		DESTDIR=${.OBJDIR}/${.TARGET} MK_RESCUE=no MK_KERNEL_SYMBOLS=no \
220ffc6fb79SGlen Barber		MK_TESTS=no MK_DEBUG_FILES=no
221dc244562SGlen Barber# Copy distfiles
222dc244562SGlen Barber	mkdir -p ${.TARGET}/usr/freebsd-dist
223ffc6fb79SGlen Barber	for dist in MANIFEST $$(ls *.txz | grep -v -- '-dbg'); \
224ffc6fb79SGlen Barber	    do cp $${dist} ${.TARGET}/usr/freebsd-dist; \
225ffc6fb79SGlen Barber	done
226dc244562SGlen Barber# Copy documentation, if generated
227dc244562SGlen Barber.if !defined(NODOC)
228dc244562SGlen Barber	cp reldoc/* ${.TARGET}
229dc244562SGlen Barber.endif
230dc244562SGlen Barber# Set up installation environment
231dc244562SGlen Barber	ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf
232dc244562SGlen Barber	echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf
233dc244562SGlen Barber	echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf
23473e46dbaSGlen Barber	echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf
2357f100614SGlen Barber	echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf
236dc244562SGlen Barber	cp ${.CURDIR}/rc.local ${.TARGET}/etc
237dc244562SGlen Barber	touch ${.TARGET}
238dc244562SGlen Barber
2398cec99b6SGlen Barberrelease.iso: disc1.iso
2408cec99b6SGlen Barberdisc1.iso: system
241ac23f460SGlen Barber	sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ${.TARGET} release
24212ad0bb1SNathan Whitehorn
243dc244562SGlen Barberdvd1.iso: dvd pkg-stage
244ac23f460SGlen Barber	sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ${.TARGET} dvd
245dc244562SGlen Barber
24646c413feSNathan Whitehornbootonly.iso: bootonly
247ac23f460SGlen Barber	sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ${.TARGET} bootonly
24846c413feSNathan Whitehorn
249cb95a96bSGlen Barbermemstick: memstick.img
2503c334738SGlen Barbermemstick.img: system
251876acefaSHiroki Sato	sh ${.CURDIR}/${TARGET}/make-memstick.sh release ${.TARGET}
25212ad0bb1SNathan Whitehorn
253a9da1707SGlen Barbermini-memstick: mini-memstick.img
254a9da1707SGlen Barbermini-memstick.img: system
255a9da1707SGlen Barber	sh ${.CURDIR}/${TARGET}/make-memstick.sh bootonly ${.TARGET}
256a9da1707SGlen Barber
25712ad0bb1SNathan Whitehornpackagesystem: base.txz kernel.txz ${EXTRA_PACKAGES}
258876acefaSHiroki Sato	sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST
259299a8b95SNathan Whitehorn	touch ${.TARGET}
26012ad0bb1SNathan Whitehorn
261dc244562SGlen Barberpkg-stage:
2626f50c4eaSGlen Barber.if !defined(NOPKG)
2636f50c4eaSGlen Barber	env REPOS_DIR=${.CURDIR}/pkg_repos/ \
2646f50c4eaSGlen Barber		sh ${.CURDIR}/scripts/pkg-stage.sh
2650d0e89b7SGlen Barber	mkdir -p ${.OBJDIR}/dvd/packages/repos/
2660d0e89b7SGlen Barber	cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \
2670d0e89b7SGlen Barber		${.OBJDIR}/dvd/packages/repos/
268dc244562SGlen Barber.endif
2690d0e89b7SGlen Barber	touch ${.TARGET}
270dc244562SGlen Barber
2718cec99b6SGlen Barbercdrom: disc1.iso bootonly.iso
272dc244562SGlen Barberdvdrom: dvd1.iso
27312ad0bb1SNathan Whitehornftp: packagesystem
274299a8b95SNathan Whitehorn	rm -rf ftp
275876acefaSHiroki Sato	mkdir -p ftp
276299a8b95SNathan Whitehorn	cp *.txz MANIFEST ftp
27712ad0bb1SNathan Whitehorn
2780bd47e83SNathan Whitehornrelease:
2790bd47e83SNathan Whitehorn	${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj
2800bd47e83SNathan Whitehorn	${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS}
2814e187d25SGlen Barber.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES)
2824e187d25SGlen Barber	${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${VMTARGETS}
2834e187d25SGlen Barber.endif
284d08ce983SGlen Barber.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE)
285d08ce983SGlen Barber	${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${CLOUDTARGETS}
286d08ce983SGlen Barber.endif
28712ad0bb1SNathan Whitehorn
288*2d4ff62fSGlen Barberinstall:	release-install vm-install
289*2d4ff62fSGlen Barber
290*2d4ff62fSGlen Barberrelease-install:
291876acefaSHiroki Sato.if defined(DESTDIR) && !empty(DESTDIR)
292876acefaSHiroki Sato	mkdir -p ${DESTDIR}
293876acefaSHiroki Sato.endif
294de17cbccSHiroki Sato	cp -a ftp ${DESTDIR}/
295de17cbccSHiroki Sato.for I in ${IMAGES}
296de17cbccSHiroki Sato	cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I}
297510f3303SGlen Barber. if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES)
2983b485e46SGlen Barber	${XZCMD} -k ${DESTDIR}/${OSRELEASE}-${I}
299cbc0e08aSGlen Barber. endif
300de17cbccSHiroki Sato.endfor
301de17cbccSHiroki Sato	cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256
302de17cbccSHiroki Sato	cd ${DESTDIR} && md5 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.MD5
303a68d274bSGlen Barber
3046513e474SGlen Barber.include "${.CURDIR}/Makefile.vm"
305