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 938046db8bSGlen Barber. if !defined(SVN) || empty(SVN) 948046db8bSGlen Barber. for S in svn svnlite 958046db8bSGlen Barber. for D in /usr/local/bin /usr/bin 968046db8bSGlen Barber. if(exists(${D}/${S})) 978046db8bSGlen BarberSVN?= ${D}/${S} 988046db8bSGlen Barber. endif 998046db8bSGlen Barber. endfor 1008046db8bSGlen Barber. endfor 1018046db8bSGlen Barber. endif 102b2200964SJohn Baldwin.endif 103b2200964SJohn Baldwin 10412ad0bb1SNathan WhitehornRELEASE_TARGETS= ftp 105876acefaSHiroki SatoIMAGES= 10612ad0bb1SNathan Whitehorn.if exists(${.CURDIR}/${TARGET}/mkisoimages.sh) 10712ad0bb1SNathan WhitehornRELEASE_TARGETS+= cdrom 1088cec99b6SGlen BarberIMAGES+= disc1.iso bootonly.iso 109d8824524SGlen Barber. if defined(WITH_DVD) && !empty(WITH_DVD) 110dc244562SGlen BarberRELEASE_TARGETS+= dvdrom 111dc244562SGlen BarberIMAGES+= dvd1.iso 112dc244562SGlen Barber. endif 1136daa108fSRuslan Ermilov.endif 11412ad0bb1SNathan Whitehorn.if exists(${.CURDIR}/${TARGET}/make-memstick.sh) 1153c334738SGlen BarberRELEASE_TARGETS+= memstick.img 116a9da1707SGlen BarberRELEASE_TARGETS+= mini-memstick.img 1173c334738SGlen BarberIMAGES+= memstick.img 118a9da1707SGlen BarberIMAGES+= mini-memstick.img 119e738d1eaSJohn Baldwin.endif 120e738d1eaSJohn Baldwin 121a55e34ebSGlen BarberCLEANFILES= packagesystem *.txz MANIFEST release ${IMAGES} 1220c535991SGlen Barber.if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) 1230c535991SGlen Barber. for I in ${IMAGES} 12455af5cf1SGlen BarberCLEANFILES+= ${I}.xz 1250c535991SGlen Barber. endfor 1260c535991SGlen Barber.endif 127cd15d7f3SGlen Barber.if defined(WITH_DVD) && !empty(WITH_DVD) 128cd15d7f3SGlen BarberCLEANFILES+= pkg-stage 129cd15d7f3SGlen Barber.endif 130a55e34ebSGlen BarberCLEANDIRS= dist ftp disc1 bootonly dvd 13113b0219aSGlen Barber.if !defined(NODOC) 13213b0219aSGlen BarberCLEANDIRS+= reldoc rdoc 13313b0219aSGlen Barber.endif 13446b13263SHiroki Satobeforeclean: 13546b13263SHiroki Sato chflags -R noschg . 1368eb4e096SRuslan Ermilov.include <bsd.obj.mk> 13746b13263SHiroki Satoclean: beforeclean 13812ad0bb1SNathan Whitehorn 13912ad0bb1SNathan Whitehornbase.txz: 140876acefaSHiroki Sato mkdir -p ${DISTDIR} 141876acefaSHiroki Sato cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${.OBJDIR}/${DISTDIR} 14212ad0bb1SNathan Whitehorn# Set up mergemaster root database 143672d7ddbSSean Bruno sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \ 14454a03abbSBryan Drewery "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} ${.MAKE.JOBS:D-j${.MAKE.JOBS}}" \ 14554a03abbSBryan Drewery -D "${.OBJDIR}/${DISTDIR}/base" 146e9120a25SGlen Barber etcupdate extract -B -M "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" \ 147d6d73d47SJohn Hay -s ${WORLDDIR} -d "${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate" 148bfc3bab8SNathan Whitehorn# Package all components 149876acefaSHiroki Sato cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR} 150876acefaSHiroki Sato mv ${DISTDIR}/*.txz . 15112ad0bb1SNathan Whitehorn 15212ad0bb1SNathan Whitehornkernel.txz: 153876acefaSHiroki Sato mkdir -p ${DISTDIR} 154876acefaSHiroki Sato cd ${WORLDDIR} && ${IMAKE} distributekernel packagekernel DISTDIR=${.OBJDIR}/${DISTDIR} 155876acefaSHiroki Sato mv ${DISTDIR}/kernel*.txz . 15612ad0bb1SNathan Whitehorn 15712ad0bb1SNathan Whitehornsrc.txz: 158876acefaSHiroki Sato mkdir -p ${DISTDIR}/usr 15912ad0bb1SNathan Whitehorn ln -fs ${WORLDDIR} ${DISTDIR}/usr/src 160bd9cab6fSRui Paulo cd ${DISTDIR} && tar cLvf - --exclude .svn --exclude .zfs \ 161bd9cab6fSRui Paulo --exclude .git --exclude @ --exclude usr/src/release/dist usr/src | \ 162bd9cab6fSRui Paulo ${XZ_CMD} > ${.OBJDIR}/src.txz 16312ad0bb1SNathan Whitehorn 16412ad0bb1SNathan Whitehornports.txz: 165876acefaSHiroki Sato mkdir -p ${DISTDIR}/usr 16612ad0bb1SNathan Whitehorn ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports 167bd9cab6fSRui Paulo cd ${DISTDIR} && tar cLvf - \ 16823659c9dSGlen Barber --exclude .git --exclude .svn \ 16912ad0bb1SNathan Whitehorn --exclude usr/ports/distfiles --exclude usr/ports/packages \ 170bd9cab6fSRui Paulo --exclude 'usr/ports/INDEX*' --exclude work usr/ports | \ 171bd9cab6fSRui Paulo ${XZ_CMD} > ${.OBJDIR}/ports.txz 17212ad0bb1SNathan Whitehorn 17312ad0bb1SNathan Whitehornreldoc: 1747ea06b02SGlen Barber cd ${DOCDIR}/en_US.ISO8859-1/htdocs/releases/${REVISION}R && \ 175496a6851SGlen Barber env MAN4DIR=${WORLDDIR}/share/man/man4 \ 1768046db8bSGlen Barber SVN=${SVN} \ 1770434c14cSGlen Barber _BRANCH=${BRANCH} \ 178496a6851SGlen Barber ${MAKE} all install clean "FORMATS=html txt" \ 179496a6851SGlen Barber INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${.OBJDIR}/rdoc \ 180496a6851SGlen Barber WEBDIR=${DOCDIR} DESTDIR=${.OBJDIR}/rdoc 181876acefaSHiroki Sato mkdir -p reldoc 18212ad0bb1SNathan Whitehorn.for i in hardware readme relnotes errata 183496a6851SGlen Barber ln -f ${.OBJDIR}/rdoc/${i:tl}.txt \ 1847ea06b02SGlen Barber reldoc/${i:tu}.TXT 185496a6851SGlen Barber ln -f ${.OBJDIR}/rdoc/${i:tl}.html \ 186496a6851SGlen Barber reldoc/${i:tu}.HTML 18712ad0bb1SNathan Whitehorn.endfor 188496a6851SGlen Barber cp ${.OBJDIR}/rdoc/docbook.css \ 189496a6851SGlen Barber reldoc/ 19012ad0bb1SNathan Whitehorn 191a55e34ebSGlen Barberdisc1: packagesystem 19212ad0bb1SNathan Whitehorn# Install system 193a55e34ebSGlen Barber mkdir -p ${.TARGET} 1946e352319SNathan Whitehorn cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ 1954c0ef5dbSNathan Whitehorn DESTDIR=${.OBJDIR}/${.TARGET} MK_AMD=no MK_AT=no \ 1964c0ef5dbSNathan Whitehorn MK_INSTALLLIB=no MK_LIB32=no MK_MAIL=no \ 197*eacff37aSEd Maste MK_TOOLCHAIN=no MK_PROFILE=no \ 1984c0ef5dbSNathan Whitehorn MK_RESCUE=no MK_DICT=no \ 1992502c66bSRoger Pau Monné MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no \ 2002502c66bSRoger Pau Monné -DDB_FROM_SRC 20112ad0bb1SNathan Whitehorn# Copy distfiles 202a55e34ebSGlen Barber mkdir -p ${.TARGET}/usr/freebsd-dist 20388343186SGlen Barber for dist in MANIFEST $$(ls *.txz | grep -vE -- '(base|lib32)-dbg'); \ 204a55e34ebSGlen Barber do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ 205ffc6fb79SGlen Barber done 20612ad0bb1SNathan Whitehorn# Copy documentation, if generated 20712ad0bb1SNathan Whitehorn.if !defined(NODOC) 208a55e34ebSGlen Barber cp reldoc/* ${.TARGET} 20912ad0bb1SNathan Whitehorn.endif 21012ad0bb1SNathan Whitehorn# Set up installation environment 211a55e34ebSGlen Barber ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf 212a55e34ebSGlen Barber echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf 213a55e34ebSGlen Barber echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf 2148c14a409SGlen Barber echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf 215a55e34ebSGlen Barber echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf 2166e49372eSKyle Evans echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf 217a55e34ebSGlen Barber cp ${.CURDIR}/rc.local ${.TARGET}/etc 218876acefaSHiroki Sato touch ${.TARGET} 21912ad0bb1SNathan Whitehorn 22046c413feSNathan Whitehornbootonly: packagesystem 22146c413feSNathan Whitehorn# Install system 222a55e34ebSGlen Barber mkdir -p ${.TARGET} 22346c413feSNathan Whitehorn cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ 224a55e34ebSGlen Barber DESTDIR=${.OBJDIR}/${.TARGET} MK_AMD=no MK_AT=no \ 225738919c0SBaptiste Daroussin MK_GAMES=no \ 226ba7bd912SGlen Barber MK_INSTALLLIB=no MK_LIB32=no MK_MAIL=no \ 227*eacff37aSEd Maste MK_TOOLCHAIN=no MK_PROFILE=no \ 22801d57ec0SBryan Drewery MK_RESCUE=no MK_DICT=no \ 2292502c66bSRoger Pau Monné MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no \ 2302502c66bSRoger Pau Monné -DDB_FROM_SRC 23146c413feSNathan Whitehorn# Copy manifest only (no distfiles) to get checksums 232a55e34ebSGlen Barber mkdir -p ${.TARGET}/usr/freebsd-dist 233a55e34ebSGlen Barber cp MANIFEST ${.TARGET}/usr/freebsd-dist 23446c413feSNathan Whitehorn# Copy documentation, if generated 23546c413feSNathan Whitehorn.if !defined(NODOC) 236a55e34ebSGlen Barber cp reldoc/* ${.TARGET} 23746c413feSNathan Whitehorn.endif 23846c413feSNathan Whitehorn# Set up installation environment 239a55e34ebSGlen Barber ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf 240a55e34ebSGlen Barber echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf 241a55e34ebSGlen Barber echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf 2428c14a409SGlen Barber echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf 243a55e34ebSGlen Barber echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf 2446e49372eSKyle Evans echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf 245a55e34ebSGlen Barber cp ${.CURDIR}/rc.local ${.TARGET}/etc 24646c413feSNathan Whitehorn 247a55e34ebSGlen Barberdvd: packagesystem 248dc244562SGlen Barber# Install system 249dc244562SGlen Barber mkdir -p ${.TARGET} 250dc244562SGlen Barber cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ 251ba7bd912SGlen Barber DESTDIR=${.OBJDIR}/${.TARGET} MK_RESCUE=no MK_KERNEL_SYMBOLS=no \ 2522502c66bSRoger Pau Monné MK_TESTS=no MK_DEBUG_FILES=no \ 2532502c66bSRoger Pau Monné -DDB_FROM_SRC 254dc244562SGlen Barber# Copy distfiles 255dc244562SGlen Barber mkdir -p ${.TARGET}/usr/freebsd-dist 25688343186SGlen Barber for dist in MANIFEST $$(ls *.txz | grep -v -- '(base|lib32)-dbg'); \ 257ffc6fb79SGlen Barber do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ 258ffc6fb79SGlen Barber done 259dc244562SGlen Barber# Copy documentation, if generated 260dc244562SGlen Barber.if !defined(NODOC) 261dc244562SGlen Barber cp reldoc/* ${.TARGET} 262dc244562SGlen Barber.endif 263dc244562SGlen Barber# Set up installation environment 264dc244562SGlen Barber ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf 265dc244562SGlen Barber echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf 266dc244562SGlen Barber echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf 2678c14a409SGlen Barber echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf 2687f100614SGlen Barber echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf 2696e49372eSKyle Evans echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf 270dc244562SGlen Barber cp ${.CURDIR}/rc.local ${.TARGET}/etc 271dc244562SGlen Barber touch ${.TARGET} 272dc244562SGlen Barber 2738cec99b6SGlen Barberrelease.iso: disc1.iso 274a55e34ebSGlen Barberdisc1.iso: disc1 2751b8a3e1dSDevin Teske sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ${.TARGET} disc1 ${XTRADIR} 27612ad0bb1SNathan Whitehorn 277dc244562SGlen Barberdvd1.iso: dvd pkg-stage 2781b8a3e1dSDevin Teske sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ${.TARGET} dvd ${XTRADIR} 279dc244562SGlen Barber 28046c413feSNathan Whitehornbootonly.iso: bootonly 2811b8a3e1dSDevin Teske sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ${.TARGET} bootonly ${XTRADIR} 28246c413feSNathan Whitehorn 283cb95a96bSGlen Barbermemstick: memstick.img 284a55e34ebSGlen Barbermemstick.img: disc1 285a55e34ebSGlen Barber sh ${.CURDIR}/${TARGET}/make-memstick.sh disc1 ${.TARGET} 28612ad0bb1SNathan Whitehorn 287a9da1707SGlen Barbermini-memstick: mini-memstick.img 288a55e34ebSGlen Barbermini-memstick.img: bootonly 289a9da1707SGlen Barber sh ${.CURDIR}/${TARGET}/make-memstick.sh bootonly ${.TARGET} 290a9da1707SGlen Barber 29112ad0bb1SNathan Whitehornpackagesystem: base.txz kernel.txz ${EXTRA_PACKAGES} 292876acefaSHiroki Sato sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST 293299a8b95SNathan Whitehorn touch ${.TARGET} 29412ad0bb1SNathan Whitehorn 295dc244562SGlen Barberpkg-stage: 2968f229143SGlen Barber.if !defined(NOPKG) || empty(NOPKG) 297fefd0439SGlen Barber env PORTSDIR=${PORTSDIR} REPOS_DIR=${.CURDIR}/pkg_repos/ \ 2986f50c4eaSGlen Barber sh ${.CURDIR}/scripts/pkg-stage.sh 2990d0e89b7SGlen Barber mkdir -p ${.OBJDIR}/dvd/packages/repos/ 3000d0e89b7SGlen Barber cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \ 3010d0e89b7SGlen Barber ${.OBJDIR}/dvd/packages/repos/ 302dc244562SGlen Barber.endif 3030d0e89b7SGlen Barber touch ${.TARGET} 304dc244562SGlen Barber 3058cec99b6SGlen Barbercdrom: disc1.iso bootonly.iso 306dc244562SGlen Barberdvdrom: dvd1.iso 30712ad0bb1SNathan Whitehornftp: packagesystem 308299a8b95SNathan Whitehorn rm -rf ftp 309876acefaSHiroki Sato mkdir -p ftp 310299a8b95SNathan Whitehorn cp *.txz MANIFEST ftp 31112ad0bb1SNathan Whitehorn 3124afe7cf5SGlen Barberrelease: real-release vm-release cloudware-release 313fdbd473cSGlen Barber ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} release-done 314fdbd473cSGlen Barber true 315fdbd473cSGlen Barber 316fdbd473cSGlen Barberrelease-done: 317fdbd473cSGlen Barber touch release 3184afe7cf5SGlen Barber 3194afe7cf5SGlen Barberreal-release: 3200bd47e83SNathan Whitehorn ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj 3210bd47e83SNathan Whitehorn ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} 32212ad0bb1SNathan Whitehorn 32332a4dda8SGlen Barberinstall: release-install vm-install 3242d4ff62fSGlen Barber 3252d4ff62fSGlen Barberrelease-install: 326876acefaSHiroki Sato.if defined(DESTDIR) && !empty(DESTDIR) 327876acefaSHiroki Sato mkdir -p ${DESTDIR} 328876acefaSHiroki Sato.endif 329de17cbccSHiroki Sato cp -a ftp ${DESTDIR}/ 330de17cbccSHiroki Sato.for I in ${IMAGES} 331de17cbccSHiroki Sato cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I} 332510f3303SGlen Barber. if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) 333bd9cab6fSRui Paulo ${XZ_CMD} -k ${DESTDIR}/${OSRELEASE}-${I} 334cbc0e08aSGlen Barber. endif 335de17cbccSHiroki Sato.endfor 33634187a08SGlen Barber cd ${DESTDIR} && sha512 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA512 337de17cbccSHiroki Sato cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 338a68d274bSGlen Barber 3396513e474SGlen Barber.include "${.CURDIR}/Makefile.vm" 340