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) 114afe7cf5SGlen Barber# release: Invokes real-release, vm-release, and cloudware-release targets 124afe7cf5SGlen Barber# real-release: Build all media and FTP distribution area 134afe7cf5SGlen Barber# vm-release: Build all virtual machine image targets 144afe7cf5SGlen Barber# cloudware-release: Build all cloud hosting provider targets 152d4ff62fSGlen Barber# install: Invokes the release-install and vm-install targets 162d4ff62fSGlen Barber# release-install: Copies all release installation media into ${DESTDIR} 172d4ff62fSGlen Barber# vm-install: Copies all virtual machine images into ${DESTDIR} 18bd668f6fSPoul-Henning Kamp# 1912ad0bb1SNathan Whitehorn# Variables affecting the build process: 2012ad0bb1SNathan Whitehorn# WORLDDIR: location of src tree -- must have built world and default kernel 2112ad0bb1SNathan Whitehorn# (by default, the directory above this one) 2212ad0bb1SNathan Whitehorn# PORTSDIR: location of ports tree to distribute (default: /usr/ports) 2312ad0bb1SNathan Whitehorn# DOCDIR: location of doc tree (default: /usr/doc) 241b8a3e1dSDevin Teske# XTRADIR: xtra-bits-dir argument for <arch>/mkisoimages.sh 259d22cb2eSHiroki Sato# NOPKG: if set, do not distribute third-party packages 2612ad0bb1SNathan Whitehorn# NOPORTS: if set, do not distribute ports tree 2712ad0bb1SNathan Whitehorn# NOSRC: if set, do not distribute source tree 2812ad0bb1SNathan Whitehorn# NODOC: if set, do not generate release documentation 29f7f650c7SGlen Barber# WITH_DVD: if set, generate dvd1.iso 3055af5cf1SGlen Barber# WITH_COMPRESSED_IMAGES: if set, compress installation images with xz(1) 31cbc0e08aSGlen Barber# (uncompressed images are not removed) 32a68d274bSGlen Barber# WITH_VMIMAGES: if set, build virtual machine images with the release 33a9278c16SGlen Barber# WITH_COMPRESSED_VMIMAGES: if set, compress virtual machine disk images 34a9278c16SGlen Barber# with xz(1) (extremely time consuming) 352d4ff62fSGlen Barber# WITH_CLOUDWARE: if set, build cloud hosting disk images with the release 3612ad0bb1SNathan Whitehorn# TARGET/TARGET_ARCH: architecture of built release 37b03ddec9SJohn Baldwin# 38ab0e9cdcSPoul-Henning Kamp 3912ad0bb1SNathan WhitehornWORLDDIR?= ${.CURDIR}/.. 4012ad0bb1SNathan WhitehornPORTSDIR?= /usr/ports 4112ad0bb1SNathan WhitehornDOCDIR?= /usr/doc 4212ad0bb1SNathan WhitehornRELNOTES_LANG?= en_US.ISO8859-1 43fff8eb57SJohn Baldwin 44464485c8SHiroki Sato.if !defined(TARGET) || empty(TARGET) 45464485c8SHiroki SatoTARGET= ${MACHINE} 46464485c8SHiroki Sato.endif 47464485c8SHiroki Sato.if !defined(TARGET_ARCH) || empty(TARGET_ARCH) 480bd47e83SNathan Whitehorn.if ${TARGET} == ${MACHINE} 49464485c8SHiroki SatoTARGET_ARCH= ${MACHINE_ARCH} 508f1f55e9SRuslan Ermilov.else 51464485c8SHiroki SatoTARGET_ARCH= ${TARGET} 52464485c8SHiroki Sato.endif 538f1f55e9SRuslan Ermilov.endif 5412ad0bb1SNathan WhitehornIMAKE= ${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} 55876acefaSHiroki SatoDISTDIR= dist 568f1f55e9SRuslan Ermilov 57de17cbccSHiroki Sato# Define OSRELEASE by using newvars.sh 58de17cbccSHiroki Sato.if !defined(OSRELEASE) || empty(OSRELEASE) 59de17cbccSHiroki Sato.for _V in TYPE BRANCH REVISION 60de17cbccSHiroki Sato${_V}!= eval $$(awk '/^${_V}=/{print}' ${.CURDIR}/../sys/conf/newvers.sh); echo $$${_V} 61de17cbccSHiroki Sato.endfor 62de17cbccSHiroki Sato.for _V in ${TARGET_ARCH} 63de17cbccSHiroki Sato.if !empty(TARGET:M${_V}) 64de17cbccSHiroki SatoOSRELEASE= ${TYPE}-${REVISION}-${BRANCH}-${TARGET} 65745ca085SGlen BarberVOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET} 66de17cbccSHiroki Sato.else 67de17cbccSHiroki SatoOSRELEASE= ${TYPE}-${REVISION}-${BRANCH}-${TARGET}-${TARGET_ARCH} 68745ca085SGlen BarberVOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH} 69de17cbccSHiroki Sato.endif 70de17cbccSHiroki Sato.endfor 71de17cbccSHiroki Sato.endif 72de17cbccSHiroki Sato 7369c7d069SGlen Barber.if !defined(VOLUME_LABEL) || empty(VOLUME_LABEL) 7469c7d069SGlen BarberVOLUME_LABEL= FreeBSD_Install 7569c7d069SGlen Barber.endif 76ac23f460SGlen Barber 7712ad0bb1SNathan Whitehorn.if !exists(${DOCDIR}) 7812ad0bb1SNathan WhitehornNODOC= true 7912ad0bb1SNathan Whitehorn.endif 8012ad0bb1SNathan Whitehorn.if !exists(${PORTSDIR}) 8112ad0bb1SNathan WhitehornNOPORTS= true 82dd1a1b3dSJoerg Wunsch.endif 83dd1a1b3dSJoerg Wunsch 8412ad0bb1SNathan WhitehornEXTRA_PACKAGES= 856daa108fSRuslan Ermilov.if !defined(NOPORTS) 8612ad0bb1SNathan WhitehornEXTRA_PACKAGES+= ports.txz 876daa108fSRuslan Ermilov.endif 884731faa3SJordan K. Hubbard.if !defined(NOSRC) 8912ad0bb1SNathan WhitehornEXTRA_PACKAGES+= src.txz 902e3a1557SKen Smith.endif 91a1b193b5SJohn Baldwin.if !defined(NODOC) 9212ad0bb1SNathan WhitehornEXTRA_PACKAGES+= reldoc 93b2200964SJohn Baldwin.endif 94b2200964SJohn Baldwin 9512ad0bb1SNathan WhitehornRELEASE_TARGETS= ftp 96876acefaSHiroki SatoIMAGES= 9712ad0bb1SNathan Whitehorn.if exists(${.CURDIR}/${TARGET}/mkisoimages.sh) 9812ad0bb1SNathan WhitehornRELEASE_TARGETS+= cdrom 998cec99b6SGlen BarberIMAGES+= disc1.iso bootonly.iso 100d8824524SGlen Barber. if defined(WITH_DVD) && !empty(WITH_DVD) 101dc244562SGlen BarberRELEASE_TARGETS+= dvdrom 102dc244562SGlen BarberIMAGES+= dvd1.iso 103dc244562SGlen Barber. endif 1046daa108fSRuslan Ermilov.endif 10512ad0bb1SNathan Whitehorn.if exists(${.CURDIR}/${TARGET}/make-memstick.sh) 1063c334738SGlen BarberRELEASE_TARGETS+= memstick.img 107a9da1707SGlen BarberRELEASE_TARGETS+= mini-memstick.img 1083c334738SGlen BarberIMAGES+= memstick.img 109a9da1707SGlen BarberIMAGES+= mini-memstick.img 110e738d1eaSJohn Baldwin.endif 111e738d1eaSJohn Baldwin 112a55e34ebSGlen BarberCLEANFILES= packagesystem *.txz MANIFEST release ${IMAGES} 1130c535991SGlen Barber.if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) 1140c535991SGlen Barber. for I in ${IMAGES} 11555af5cf1SGlen BarberCLEANFILES+= ${I}.xz 1160c535991SGlen Barber. endfor 1170c535991SGlen Barber.endif 118cd15d7f3SGlen Barber.if defined(WITH_DVD) && !empty(WITH_DVD) 119cd15d7f3SGlen BarberCLEANFILES+= pkg-stage 120cd15d7f3SGlen Barber.endif 121a55e34ebSGlen BarberCLEANDIRS= dist ftp disc1 bootonly dvd 12213b0219aSGlen Barber.if !defined(NODOC) 12313b0219aSGlen BarberCLEANDIRS+= reldoc rdoc 12413b0219aSGlen Barber.endif 12546b13263SHiroki Satobeforeclean: 12646b13263SHiroki Sato chflags -R noschg . 1278eb4e096SRuslan Ermilov.include <bsd.obj.mk> 12846b13263SHiroki Satoclean: beforeclean 12912ad0bb1SNathan Whitehorn 13012ad0bb1SNathan Whitehornbase.txz: 131876acefaSHiroki Sato mkdir -p ${DISTDIR} 132876acefaSHiroki Sato cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${.OBJDIR}/${DISTDIR} 13312ad0bb1SNathan Whitehorn# Set up mergemaster root database 134672d7ddbSSean Bruno sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \ 13554a03abbSBryan Drewery "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} ${.MAKE.JOBS:D-j${.MAKE.JOBS}}" \ 13654a03abbSBryan Drewery -D "${.OBJDIR}/${DISTDIR}/base" 137e9120a25SGlen Barber etcupdate extract -B -M "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" \ 138d6d73d47SJohn Hay -s ${WORLDDIR} -d "${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate" 139bfc3bab8SNathan Whitehorn# Package all components 140876acefaSHiroki Sato cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR} 141876acefaSHiroki Sato mv ${DISTDIR}/*.txz . 14212ad0bb1SNathan Whitehorn 14312ad0bb1SNathan Whitehornkernel.txz: 144876acefaSHiroki Sato mkdir -p ${DISTDIR} 145876acefaSHiroki Sato cd ${WORLDDIR} && ${IMAKE} distributekernel packagekernel DISTDIR=${.OBJDIR}/${DISTDIR} 146876acefaSHiroki Sato mv ${DISTDIR}/kernel*.txz . 14712ad0bb1SNathan Whitehorn 14812ad0bb1SNathan Whitehornsrc.txz: 149876acefaSHiroki Sato mkdir -p ${DISTDIR}/usr 15012ad0bb1SNathan Whitehorn ln -fs ${WORLDDIR} ${DISTDIR}/usr/src 151bd9cab6fSRui Paulo cd ${DISTDIR} && tar cLvf - --exclude .svn --exclude .zfs \ 152bd9cab6fSRui Paulo --exclude .git --exclude @ --exclude usr/src/release/dist usr/src | \ 153bd9cab6fSRui Paulo ${XZ_CMD} > ${.OBJDIR}/src.txz 15412ad0bb1SNathan Whitehorn 15512ad0bb1SNathan Whitehornports.txz: 156876acefaSHiroki Sato mkdir -p ${DISTDIR}/usr 15712ad0bb1SNathan Whitehorn ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports 158bd9cab6fSRui Paulo cd ${DISTDIR} && tar cLvf - \ 15923659c9dSGlen Barber --exclude .git --exclude .svn \ 16012ad0bb1SNathan Whitehorn --exclude usr/ports/distfiles --exclude usr/ports/packages \ 161bd9cab6fSRui Paulo --exclude 'usr/ports/INDEX*' --exclude work usr/ports | \ 162bd9cab6fSRui Paulo ${XZ_CMD} > ${.OBJDIR}/ports.txz 16312ad0bb1SNathan Whitehorn 16412ad0bb1SNathan Whitehornreldoc: 1657ea06b02SGlen Barber cd ${DOCDIR}/en_US.ISO8859-1/htdocs/releases/${REVISION}R && \ 166496a6851SGlen Barber env MAN4DIR=${WORLDDIR}/share/man/man4 \ 167496a6851SGlen Barber ${MAKE} all install clean "FORMATS=html txt" \ 168496a6851SGlen Barber INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${.OBJDIR}/rdoc \ 169496a6851SGlen Barber WEBDIR=${DOCDIR} DESTDIR=${.OBJDIR}/rdoc 170876acefaSHiroki Sato mkdir -p reldoc 17112ad0bb1SNathan Whitehorn.for i in hardware readme relnotes errata 172496a6851SGlen Barber ln -f ${.OBJDIR}/rdoc/${i:tl}.txt \ 1737ea06b02SGlen Barber reldoc/${i:tu}.TXT 174496a6851SGlen Barber ln -f ${.OBJDIR}/rdoc/${i:tl}.html \ 175496a6851SGlen Barber reldoc/${i:tu}.HTML 17612ad0bb1SNathan Whitehorn.endfor 177496a6851SGlen Barber cp ${.OBJDIR}/rdoc/docbook.css \ 178496a6851SGlen Barber reldoc/ 17912ad0bb1SNathan Whitehorn 180a55e34ebSGlen Barberdisc1: packagesystem 18112ad0bb1SNathan Whitehorn# Install system 182a55e34ebSGlen Barber mkdir -p ${.TARGET} 1836e352319SNathan Whitehorn cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ 1844c0ef5dbSNathan Whitehorn DESTDIR=${.OBJDIR}/${.TARGET} MK_AMD=no MK_AT=no \ 1854c0ef5dbSNathan Whitehorn MK_INSTALLLIB=no MK_LIB32=no MK_MAIL=no \ 1864c0ef5dbSNathan Whitehorn MK_NCP=no MK_TOOLCHAIN=no MK_PROFILE=no \ 1874c0ef5dbSNathan Whitehorn MK_RESCUE=no MK_DICT=no \ 188*2502c66bSRoger Pau Monné MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no \ 189*2502c66bSRoger Pau Monné -DDB_FROM_SRC 19012ad0bb1SNathan Whitehorn# Copy distfiles 191a55e34ebSGlen Barber mkdir -p ${.TARGET}/usr/freebsd-dist 19288343186SGlen Barber for dist in MANIFEST $$(ls *.txz | grep -vE -- '(base|lib32)-dbg'); \ 193a55e34ebSGlen Barber do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ 194ffc6fb79SGlen Barber done 19512ad0bb1SNathan Whitehorn# Copy documentation, if generated 19612ad0bb1SNathan Whitehorn.if !defined(NODOC) 197a55e34ebSGlen Barber cp reldoc/* ${.TARGET} 19812ad0bb1SNathan Whitehorn.endif 19912ad0bb1SNathan Whitehorn# Set up installation environment 200a55e34ebSGlen Barber ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf 201a55e34ebSGlen Barber echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf 202a55e34ebSGlen Barber echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf 203a55e34ebSGlen Barber echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf 204a55e34ebSGlen Barber echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf 205a55e34ebSGlen Barber cp ${.CURDIR}/rc.local ${.TARGET}/etc 206876acefaSHiroki Sato touch ${.TARGET} 20712ad0bb1SNathan Whitehorn 20846c413feSNathan Whitehornbootonly: packagesystem 20946c413feSNathan Whitehorn# Install system 210a55e34ebSGlen Barber mkdir -p ${.TARGET} 21146c413feSNathan Whitehorn cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ 212a55e34ebSGlen Barber DESTDIR=${.OBJDIR}/${.TARGET} MK_AMD=no MK_AT=no \ 213738919c0SBaptiste Daroussin MK_GAMES=no \ 214ba7bd912SGlen Barber MK_INSTALLLIB=no MK_LIB32=no MK_MAIL=no \ 215ba7bd912SGlen Barber MK_NCP=no MK_TOOLCHAIN=no MK_PROFILE=no \ 21601d57ec0SBryan Drewery MK_RESCUE=no MK_DICT=no \ 217*2502c66bSRoger Pau Monné MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no \ 218*2502c66bSRoger Pau Monné -DDB_FROM_SRC 21946c413feSNathan Whitehorn# Copy manifest only (no distfiles) to get checksums 220a55e34ebSGlen Barber mkdir -p ${.TARGET}/usr/freebsd-dist 221a55e34ebSGlen Barber cp MANIFEST ${.TARGET}/usr/freebsd-dist 22246c413feSNathan Whitehorn# Copy documentation, if generated 22346c413feSNathan Whitehorn.if !defined(NODOC) 224a55e34ebSGlen Barber cp reldoc/* ${.TARGET} 22546c413feSNathan Whitehorn.endif 22646c413feSNathan Whitehorn# Set up installation environment 227a55e34ebSGlen Barber ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf 228a55e34ebSGlen Barber echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf 229a55e34ebSGlen Barber echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf 230a55e34ebSGlen Barber echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf 231a55e34ebSGlen Barber echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf 232a55e34ebSGlen Barber cp ${.CURDIR}/rc.local ${.TARGET}/etc 23346c413feSNathan Whitehorn 234a55e34ebSGlen Barberdvd: packagesystem 235dc244562SGlen Barber# Install system 236dc244562SGlen Barber mkdir -p ${.TARGET} 237dc244562SGlen Barber cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ 238ba7bd912SGlen Barber DESTDIR=${.OBJDIR}/${.TARGET} MK_RESCUE=no MK_KERNEL_SYMBOLS=no \ 239*2502c66bSRoger Pau Monné MK_TESTS=no MK_DEBUG_FILES=no \ 240*2502c66bSRoger Pau Monné -DDB_FROM_SRC 241dc244562SGlen Barber# Copy distfiles 242dc244562SGlen Barber mkdir -p ${.TARGET}/usr/freebsd-dist 24388343186SGlen Barber for dist in MANIFEST $$(ls *.txz | grep -v -- '(base|lib32)-dbg'); \ 244ffc6fb79SGlen Barber do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ 245ffc6fb79SGlen Barber done 246dc244562SGlen Barber# Copy documentation, if generated 247dc244562SGlen Barber.if !defined(NODOC) 248dc244562SGlen Barber cp reldoc/* ${.TARGET} 249dc244562SGlen Barber.endif 250dc244562SGlen Barber# Set up installation environment 251dc244562SGlen Barber ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf 252dc244562SGlen Barber echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf 253dc244562SGlen Barber echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf 25473e46dbaSGlen Barber echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf 2557f100614SGlen Barber echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf 256dc244562SGlen Barber cp ${.CURDIR}/rc.local ${.TARGET}/etc 257dc244562SGlen Barber touch ${.TARGET} 258dc244562SGlen Barber 2598cec99b6SGlen Barberrelease.iso: disc1.iso 260a55e34ebSGlen Barberdisc1.iso: disc1 2611b8a3e1dSDevin Teske sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ${.TARGET} disc1 ${XTRADIR} 26212ad0bb1SNathan Whitehorn 263dc244562SGlen Barberdvd1.iso: dvd pkg-stage 2641b8a3e1dSDevin Teske sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ${.TARGET} dvd ${XTRADIR} 265dc244562SGlen Barber 26646c413feSNathan Whitehornbootonly.iso: bootonly 2671b8a3e1dSDevin Teske sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ${.TARGET} bootonly ${XTRADIR} 26846c413feSNathan Whitehorn 269cb95a96bSGlen Barbermemstick: memstick.img 270a55e34ebSGlen Barbermemstick.img: disc1 271a55e34ebSGlen Barber sh ${.CURDIR}/${TARGET}/make-memstick.sh disc1 ${.TARGET} 27212ad0bb1SNathan Whitehorn 273a9da1707SGlen Barbermini-memstick: mini-memstick.img 274a55e34ebSGlen Barbermini-memstick.img: bootonly 275a9da1707SGlen Barber sh ${.CURDIR}/${TARGET}/make-memstick.sh bootonly ${.TARGET} 276a9da1707SGlen Barber 27712ad0bb1SNathan Whitehornpackagesystem: base.txz kernel.txz ${EXTRA_PACKAGES} 278876acefaSHiroki Sato sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST 279299a8b95SNathan Whitehorn touch ${.TARGET} 28012ad0bb1SNathan Whitehorn 281dc244562SGlen Barberpkg-stage: 2828f229143SGlen Barber.if !defined(NOPKG) || empty(NOPKG) 283fefd0439SGlen Barber env PORTSDIR=${PORTSDIR} REPOS_DIR=${.CURDIR}/pkg_repos/ \ 2846f50c4eaSGlen Barber sh ${.CURDIR}/scripts/pkg-stage.sh 2850d0e89b7SGlen Barber mkdir -p ${.OBJDIR}/dvd/packages/repos/ 2860d0e89b7SGlen Barber cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \ 2870d0e89b7SGlen Barber ${.OBJDIR}/dvd/packages/repos/ 288dc244562SGlen Barber.endif 2890d0e89b7SGlen Barber touch ${.TARGET} 290dc244562SGlen Barber 2918cec99b6SGlen Barbercdrom: disc1.iso bootonly.iso 292dc244562SGlen Barberdvdrom: dvd1.iso 29312ad0bb1SNathan Whitehornftp: packagesystem 294299a8b95SNathan Whitehorn rm -rf ftp 295876acefaSHiroki Sato mkdir -p ftp 296299a8b95SNathan Whitehorn cp *.txz MANIFEST ftp 29712ad0bb1SNathan Whitehorn 2984afe7cf5SGlen Barberrelease: real-release vm-release cloudware-release 299fdbd473cSGlen Barber ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} release-done 300fdbd473cSGlen Barber true 301fdbd473cSGlen Barber 302fdbd473cSGlen Barberrelease-done: 303fdbd473cSGlen Barber touch release 3044afe7cf5SGlen Barber 3054afe7cf5SGlen Barberreal-release: 3060bd47e83SNathan Whitehorn ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj 3070bd47e83SNathan Whitehorn ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} 30812ad0bb1SNathan Whitehorn 30932a4dda8SGlen Barberinstall: release-install vm-install 3102d4ff62fSGlen Barber 3112d4ff62fSGlen Barberrelease-install: 312876acefaSHiroki Sato.if defined(DESTDIR) && !empty(DESTDIR) 313876acefaSHiroki Sato mkdir -p ${DESTDIR} 314876acefaSHiroki Sato.endif 315de17cbccSHiroki Sato cp -a ftp ${DESTDIR}/ 316de17cbccSHiroki Sato.for I in ${IMAGES} 317de17cbccSHiroki Sato cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I} 318510f3303SGlen Barber. if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) 319bd9cab6fSRui Paulo ${XZ_CMD} -k ${DESTDIR}/${OSRELEASE}-${I} 320cbc0e08aSGlen Barber. endif 321de17cbccSHiroki Sato.endfor 32234187a08SGlen Barber cd ${DESTDIR} && sha512 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA512 323de17cbccSHiroki Sato cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 324a68d274bSGlen Barber 3256513e474SGlen Barber.include "${.CURDIR}/Makefile.vm" 326