10202c140SRodney W. Grimes# 212ad0bb1SNathan Whitehorn# Makefile for building releases and release media. 3bd668f6fSPoul-Henning Kamp# 412ad0bb1SNathan Whitehorn# User-driven targets: 58cec99b6SGlen Barber# cdrom: Builds release CD-ROM media (disc1.iso) 65d27274aSGlen Barber# dvdrom: Builds release DVD-ROM media (dvd1.iso) 73c334738SGlen Barber# memstick: Builds memory stick image (memstick.img) 8a9da1707SGlen Barber# mini-memstick: Builds minimal memory stick image (mini-memstick.img) 912ad0bb1SNathan Whitehorn# ftp: Sets up FTP distribution area (ftp) 104afe7cf5SGlen Barber# release: Invokes real-release, vm-release, and cloudware-release targets 114afe7cf5SGlen Barber# real-release: Build all media and FTP distribution area 124afe7cf5SGlen Barber# vm-release: Build all virtual machine image targets 134afe7cf5SGlen Barber# cloudware-release: Build all cloud hosting provider targets 142d4ff62fSGlen Barber# install: Invokes the release-install and vm-install targets 152d4ff62fSGlen Barber# release-install: Copies all release installation media into ${DESTDIR} 162d4ff62fSGlen Barber# vm-install: Copies all virtual machine images into ${DESTDIR} 17bd668f6fSPoul-Henning Kamp# 1812ad0bb1SNathan Whitehorn# Variables affecting the build process: 1912ad0bb1SNathan Whitehorn# WORLDDIR: location of src tree -- must have built world and default kernel 2012ad0bb1SNathan Whitehorn# (by default, the directory above this one) 2112ad0bb1SNathan Whitehorn# PORTSDIR: location of ports tree to distribute (default: /usr/ports) 221b8a3e1dSDevin Teske# XTRADIR: xtra-bits-dir argument for <arch>/mkisoimages.sh 239d22cb2eSHiroki Sato# NOPKG: if set, do not distribute third-party packages 2412ad0bb1SNathan Whitehorn# NOPORTS: if set, do not distribute ports tree 2512ad0bb1SNathan Whitehorn# NOSRC: if set, do not distribute source tree 26f7f650c7SGlen Barber# WITH_DVD: if set, generate dvd1.iso 2755af5cf1SGlen Barber# WITH_COMPRESSED_IMAGES: if set, compress installation images with xz(1) 28cbc0e08aSGlen Barber# (uncompressed images are not removed) 29a68d274bSGlen Barber# WITH_VMIMAGES: if set, build virtual machine images with the release 30a9278c16SGlen Barber# WITH_COMPRESSED_VMIMAGES: if set, compress virtual machine disk images 31a9278c16SGlen Barber# with xz(1) (extremely time consuming) 322d4ff62fSGlen Barber# WITH_CLOUDWARE: if set, build cloud hosting disk images with the release 3312ad0bb1SNathan Whitehorn# TARGET/TARGET_ARCH: architecture of built release 34b03ddec9SJohn Baldwin# 35ab0e9cdcSPoul-Henning Kamp 3612ad0bb1SNathan WhitehornWORLDDIR?= ${.CURDIR}/.. 3712ad0bb1SNathan WhitehornPORTSDIR?= /usr/ports 38fff8eb57SJohn Baldwin 396853d893SJessica Clarke.include "${WORLDDIR}/share/mk/bsd.compat.pre.mk" 406853d893SJessica Clarke 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 5408f1325dSGlen Barber# Define OSRELEASE by using newvers.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(${PORTSDIR}) 7512ad0bb1SNathan WhitehornNOPORTS= true 76dd1a1b3dSJoerg Wunsch.endif 77dd1a1b3dSJoerg Wunsch 782e9b8c8cSEd MasteDISTRIBUTIONS= base.txz kernel.txz 796daa108fSRuslan Ermilov.if !defined(NOPORTS) 802e9b8c8cSEd MasteDISTRIBUTIONS+= ports.txz 816daa108fSRuslan Ermilov.endif 824731faa3SJordan K. Hubbard.if !defined(NOSRC) 832e9b8c8cSEd MasteDISTRIBUTIONS+= src.txz 842e3a1557SKen Smith.endif 85b2200964SJohn Baldwin 8612ad0bb1SNathan WhitehornRELEASE_TARGETS= ftp 87876acefaSHiroki SatoIMAGES= 8812ad0bb1SNathan Whitehorn.if exists(${.CURDIR}/${TARGET}/mkisoimages.sh) 8912ad0bb1SNathan WhitehornRELEASE_TARGETS+= cdrom 908cec99b6SGlen BarberIMAGES+= disc1.iso bootonly.iso 91d8824524SGlen Barber. if defined(WITH_DVD) && !empty(WITH_DVD) 92dc244562SGlen BarberRELEASE_TARGETS+= dvdrom 93dc244562SGlen BarberIMAGES+= dvd1.iso 94dc244562SGlen Barber. endif 956daa108fSRuslan Ermilov.endif 9612ad0bb1SNathan Whitehorn.if exists(${.CURDIR}/${TARGET}/make-memstick.sh) 973c334738SGlen BarberRELEASE_TARGETS+= memstick.img 98a9da1707SGlen BarberRELEASE_TARGETS+= mini-memstick.img 993c334738SGlen BarberIMAGES+= memstick.img 100a9da1707SGlen BarberIMAGES+= mini-memstick.img 101e738d1eaSJohn Baldwin.endif 102e738d1eaSJohn Baldwin 103a55e34ebSGlen BarberCLEANFILES= packagesystem *.txz MANIFEST release ${IMAGES} 1040c535991SGlen Barber.if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) 1050c535991SGlen Barber. for I in ${IMAGES} 10655af5cf1SGlen BarberCLEANFILES+= ${I}.xz 1070c535991SGlen Barber. endfor 1080c535991SGlen Barber.endif 109cd15d7f3SGlen Barber.if defined(WITH_DVD) && !empty(WITH_DVD) 110cd15d7f3SGlen BarberCLEANFILES+= pkg-stage 111cd15d7f3SGlen Barber.endif 112a55e34ebSGlen BarberCLEANDIRS= dist ftp disc1 bootonly dvd 11346b13263SHiroki Satobeforeclean: 11446b13263SHiroki Sato chflags -R noschg . 1158eb4e096SRuslan Ermilov.include <bsd.obj.mk> 11646b13263SHiroki Satoclean: beforeclean 11712ad0bb1SNathan Whitehorn 11812ad0bb1SNathan Whitehornbase.txz: 119876acefaSHiroki Sato mkdir -p ${DISTDIR} 12093e4813bSColin Percival ( cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${.OBJDIR}/${DISTDIR} ) 1218ee478dfSEd Maste # Bootstrap etcupdate(8) database. 122e9ba25aaSJessica Clarke sh ${WORLDDIR}/usr.sbin/etcupdate/etcupdate.sh extract -B \ 123f3772439SJessica Clarke -m "${MAKE}" -M "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" \ 124f36b5d8aSJessica Clarke -s ${WORLDDIR} -d "${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate" \ 125f36b5d8aSJessica Clarke ${NO_ROOT:D-N} 126f36b5d8aSJessica Clarke.if defined(NO_ROOT) 127f36b5d8aSJessica Clarke echo "./var/db/etcupdate type=dir uname=root gname=wheel mode=0755" >> ${.OBJDIR}/${DISTDIR}/base.meta 128f36b5d8aSJessica Clarke sed -n 's,^\.,./var/db/etcupdate/current,p' ${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate/current/METALOG \ 129f36b5d8aSJessica Clarke >> ${.OBJDIR}/${DISTDIR}/base.meta 130f36b5d8aSJessica Clarke rm ${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate/current/METALOG 13113cb0041SJessica Clarke.endif 132bfc3bab8SNathan Whitehorn# Package all components 13393e4813bSColin Percival ( cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR} ) 134876acefaSHiroki Sato mv ${DISTDIR}/*.txz . 13512ad0bb1SNathan Whitehorn 13612ad0bb1SNathan Whitehornkernel.txz: 137876acefaSHiroki Sato mkdir -p ${DISTDIR} 138*65c603edSColin Percival ( cd ${WORLDDIR} && ${IMAKE} distributekernel DISTDIR=${.OBJDIR}/${DISTDIR} ) 139*65c603edSColin Percival ( cd ${WORLDDIR} && ${IMAKE} packagekernel DISTDIR=${.OBJDIR}/${DISTDIR} ) 140876acefaSHiroki Sato mv ${DISTDIR}/kernel*.txz . 14112ad0bb1SNathan Whitehorn 14212ad0bb1SNathan Whitehornsrc.txz: 143876acefaSHiroki Sato mkdir -p ${DISTDIR}/usr 14412ad0bb1SNathan Whitehorn ln -fs ${WORLDDIR} ${DISTDIR}/usr/src 14593e4813bSColin Percival ( cd ${DISTDIR} && ${TAR_CMD} cLvf - --exclude .svn --exclude .zfs \ 146bd9cab6fSRui Paulo --exclude .git --exclude @ --exclude usr/src/release/dist usr/src | \ 14793e4813bSColin Percival ${XZ_CMD} > ${.OBJDIR}/src.txz ) 14812ad0bb1SNathan Whitehorn 14912ad0bb1SNathan Whitehornports.txz: 150876acefaSHiroki Sato mkdir -p ${DISTDIR}/usr 15112ad0bb1SNathan Whitehorn ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports 15293e4813bSColin Percival ( cd ${DISTDIR} && ${TAR_CMD} cLvf - \ 15323659c9dSGlen Barber --exclude .git --exclude .svn \ 15412ad0bb1SNathan Whitehorn --exclude usr/ports/distfiles --exclude usr/ports/packages \ 155bd9cab6fSRui Paulo --exclude 'usr/ports/INDEX*' --exclude work usr/ports | \ 15693e4813bSColin Percival ${XZ_CMD} > ${.OBJDIR}/ports.txz ) 15712ad0bb1SNathan Whitehorn 158a55e34ebSGlen Barberdisc1: packagesystem 15912ad0bb1SNathan Whitehorn# Install system 160a55e34ebSGlen Barber mkdir -p ${.TARGET} 16193e4813bSColin Percival ( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \ 16213f7dbe8SEd Maste DESTDIR=${.OBJDIR}/${.TARGET} MK_AT=no \ 1636853d893SJessica Clarke MK_INSTALLLIB=no MK_MAIL=no \ 16432a79e85SJessica Clarke ${_ALL_LIBCOMPATS:@v@MK_LIB$v=no@} \ 165eacff37aSEd Maste MK_TOOLCHAIN=no MK_PROFILE=no \ 1664c0ef5dbSNathan Whitehorn MK_RESCUE=no MK_DICT=no \ 1672502c66bSRoger Pau Monné MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no \ 16893e4813bSColin Percival -DDB_FROM_SRC ) 16912ad0bb1SNathan Whitehorn# Copy distfiles 170a55e34ebSGlen Barber mkdir -p ${.TARGET}/usr/freebsd-dist 1716853d893SJessica Clarke for dist in MANIFEST $$(ls *.txz | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ 172a55e34ebSGlen Barber do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ 173ffc6fb79SGlen Barber done 17413cb0041SJessica Clarke.if defined(NO_ROOT) 17513cb0041SJessica Clarke echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG 1766853d893SJessica Clarke for dist in MANIFEST $$(ls *.txz | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ 17713cb0041SJessica Clarke do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ 17813cb0041SJessica Clarke done 17913cb0041SJessica Clarke.endif 18012ad0bb1SNathan Whitehorn# Set up installation environment 181a55e34ebSGlen Barber ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf 182a55e34ebSGlen Barber echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf 183a55e34ebSGlen Barber echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf 1848c14a409SGlen Barber echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf 185a55e34ebSGlen Barber echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf 1866e49372eSKyle Evans echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf 1872a90c47aSJessica Clarke echo loader_menu_multi_user_prompt=\"Installer\" >> ${.TARGET}/boot/loader.conf 188a55e34ebSGlen Barber cp ${.CURDIR}/rc.local ${.TARGET}/etc 18913cb0041SJessica Clarke.if defined(NO_ROOT) 19013cb0041SJessica Clarke echo "./etc/resolv.conf type=link uname=root gname=wheel mode=0644 link=/tmp/bsdinstall_etc/resolv.conf" >> ${.TARGET}/METALOG 19113cb0041SJessica Clarke echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 19213cb0041SJessica Clarke echo "./etc/sysctl.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 19313cb0041SJessica Clarke echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 19413cb0041SJessica Clarke echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 19513cb0041SJessica Clarke.endif 196876acefaSHiroki Sato touch ${.TARGET} 19712ad0bb1SNathan Whitehorn 19846c413feSNathan Whitehornbootonly: packagesystem 19946c413feSNathan Whitehorn# Install system 200a55e34ebSGlen Barber mkdir -p ${.TARGET} 20193e4813bSColin Percival ( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \ 20213f7dbe8SEd Maste DESTDIR=${.OBJDIR}/${.TARGET} MK_AT=no \ 203738919c0SBaptiste Daroussin MK_GAMES=no \ 2046853d893SJessica Clarke MK_INSTALLLIB=no MK_MAIL=no \ 20532a79e85SJessica Clarke ${_ALL_LIBCOMPATS:@v@MK_LIB$v=no@} \ 206eacff37aSEd Maste MK_TOOLCHAIN=no MK_PROFILE=no \ 20701d57ec0SBryan Drewery MK_RESCUE=no MK_DICT=no \ 2082502c66bSRoger Pau Monné MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no \ 20993e4813bSColin Percival -DDB_FROM_SRC ) 21046c413feSNathan Whitehorn# Copy manifest only (no distfiles) to get checksums 211a55e34ebSGlen Barber mkdir -p ${.TARGET}/usr/freebsd-dist 212a55e34ebSGlen Barber cp MANIFEST ${.TARGET}/usr/freebsd-dist 21313cb0041SJessica Clarke.if defined(NO_ROOT) 21413cb0041SJessica Clarke echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG 21513cb0041SJessica Clarke echo "./usr/freebsd-dist/MANIFEST type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 21613cb0041SJessica Clarke.endif 21746c413feSNathan Whitehorn# Set up installation environment 218a55e34ebSGlen Barber ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf 219a55e34ebSGlen Barber echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf 220a55e34ebSGlen Barber echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf 2218c14a409SGlen Barber echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf 222a55e34ebSGlen Barber echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf 2236e49372eSKyle Evans echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf 2242a90c47aSJessica Clarke echo loader_menu_multi_user_prompt=\"Installer\" >> ${.TARGET}/boot/loader.conf 225a55e34ebSGlen Barber cp ${.CURDIR}/rc.local ${.TARGET}/etc 22613cb0041SJessica Clarke.if defined(NO_ROOT) 22713cb0041SJessica Clarke echo "./etc/resolv.conf type=link uname=root gname=wheel mode=0644 link=/tmp/bsdinstall_etc/resolv.conf" >> ${.TARGET}/METALOG 22813cb0041SJessica Clarke echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 22913cb0041SJessica Clarke echo "./etc/sysctl.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 23013cb0041SJessica Clarke echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 23113cb0041SJessica Clarke echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 23213cb0041SJessica Clarke.endif 23346c413feSNathan Whitehorn 234a55e34ebSGlen Barberdvd: packagesystem 235dc244562SGlen Barber# Install system 236dc244562SGlen Barber mkdir -p ${.TARGET} 23793e4813bSColin Percival ( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \ 238ba7bd912SGlen Barber DESTDIR=${.OBJDIR}/${.TARGET} MK_RESCUE=no MK_KERNEL_SYMBOLS=no \ 2392502c66bSRoger Pau Monné MK_TESTS=no MK_DEBUG_FILES=no \ 24093e4813bSColin Percival -DDB_FROM_SRC ) 241dc244562SGlen Barber# Copy distfiles 242dc244562SGlen Barber mkdir -p ${.TARGET}/usr/freebsd-dist 2436853d893SJessica Clarke for dist in MANIFEST $$(ls *.txz | grep -v -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ 244ffc6fb79SGlen Barber do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ 245ffc6fb79SGlen Barber done 24613cb0041SJessica Clarke.if defined(NO_ROOT) 24713cb0041SJessica Clarke echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG 2486853d893SJessica Clarke for dist in MANIFEST $$(ls *.txz | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ 24913cb0041SJessica Clarke do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ 25013cb0041SJessica Clarke done 25113cb0041SJessica Clarke.endif 252dc244562SGlen Barber# Set up installation environment 253dc244562SGlen Barber ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf 254dc244562SGlen Barber echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf 255dc244562SGlen Barber echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf 2568c14a409SGlen Barber echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf 2577f100614SGlen Barber echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf 2586e49372eSKyle Evans echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf 2592a90c47aSJessica Clarke echo loader_menu_multi_user_prompt=\"Installer\" >> ${.TARGET}/boot/loader.conf 260dc244562SGlen Barber cp ${.CURDIR}/rc.local ${.TARGET}/etc 26113cb0041SJessica Clarke.if defined(NO_ROOT) 26213cb0041SJessica Clarke echo "./etc/resolv.conf type=link uname=root gname=wheel mode=0644 link=/tmp/bsdinstall_etc/resolv.conf" >> ${.TARGET}/METALOG 26313cb0041SJessica Clarke echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 26413cb0041SJessica Clarke echo "./etc/sysctl.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 26513cb0041SJessica Clarke echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 26613cb0041SJessica Clarke echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 26713cb0041SJessica Clarke.endif 268dc244562SGlen Barber touch ${.TARGET} 269dc244562SGlen Barber 2708cec99b6SGlen Barberrelease.iso: disc1.iso 271a55e34ebSGlen Barberdisc1.iso: disc1 27213cb0041SJessica Clarke cd disc1 && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ../${.TARGET} .${NO_ROOT:D/METALOG} ${XTRADIR} 27312ad0bb1SNathan Whitehorn 274dc244562SGlen Barberdvd1.iso: dvd pkg-stage 27513cb0041SJessica Clarke cd dvd && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ../${.TARGET} .${NO_ROOT:D/METALOG} ${XTRADIR} 276dc244562SGlen Barber 27746c413feSNathan Whitehornbootonly.iso: bootonly 27813cb0041SJessica Clarke cd bootonly && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ../${.TARGET} .${NO_ROOT:D/METALOG} ${XTRADIR} 27946c413feSNathan Whitehorn 280cb95a96bSGlen Barbermemstick: memstick.img 281a55e34ebSGlen Barbermemstick.img: disc1 28213cb0041SJessica Clarke cd disc1 && sh ${.CURDIR}/${TARGET}/make-memstick.sh .${NO_ROOT:D/METALOG} ../${.TARGET} 28312ad0bb1SNathan Whitehorn 284a9da1707SGlen Barbermini-memstick: mini-memstick.img 285a55e34ebSGlen Barbermini-memstick.img: bootonly 28613cb0041SJessica Clarke cd bootonly && sh ${.CURDIR}/${TARGET}/make-memstick.sh .${NO_ROOT:D/METALOG} ../${.TARGET} 287a9da1707SGlen Barber 2882e9b8c8cSEd Mastepackagesystem: ${DISTRIBUTIONS} 289876acefaSHiroki Sato sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST 290299a8b95SNathan Whitehorn touch ${.TARGET} 29112ad0bb1SNathan Whitehorn 292dc244562SGlen Barberpkg-stage: 29313cb0041SJessica Clarke# TODO: Support for -DNO_ROOT 2948f229143SGlen Barber.if !defined(NOPKG) || empty(NOPKG) 295fefd0439SGlen Barber env PORTSDIR=${PORTSDIR} REPOS_DIR=${.CURDIR}/pkg_repos/ \ 2966f50c4eaSGlen Barber sh ${.CURDIR}/scripts/pkg-stage.sh 2970d0e89b7SGlen Barber mkdir -p ${.OBJDIR}/dvd/packages/repos/ 2980d0e89b7SGlen Barber cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \ 2990d0e89b7SGlen Barber ${.OBJDIR}/dvd/packages/repos/ 300dc244562SGlen Barber.endif 3010d0e89b7SGlen Barber touch ${.TARGET} 302dc244562SGlen Barber 3038cec99b6SGlen Barbercdrom: disc1.iso bootonly.iso 304dc244562SGlen Barberdvdrom: dvd1.iso 30512ad0bb1SNathan Whitehornftp: packagesystem 306299a8b95SNathan Whitehorn rm -rf ftp 307876acefaSHiroki Sato mkdir -p ftp 308299a8b95SNathan Whitehorn cp *.txz MANIFEST ftp 30912ad0bb1SNathan Whitehorn 3104afe7cf5SGlen Barberrelease: real-release vm-release cloudware-release 311fdbd473cSGlen Barber ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} release-done 312fdbd473cSGlen Barber true 313fdbd473cSGlen Barber 314fdbd473cSGlen Barberrelease-done: 315fdbd473cSGlen Barber touch release 3164afe7cf5SGlen Barber 3174afe7cf5SGlen Barberreal-release: 3180bd47e83SNathan Whitehorn ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj 3190bd47e83SNathan Whitehorn ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} 32012ad0bb1SNathan Whitehorn 32132a4dda8SGlen Barberinstall: release-install vm-install 3222d4ff62fSGlen Barber 3232d4ff62fSGlen Barberrelease-install: 324876acefaSHiroki Sato.if defined(DESTDIR) && !empty(DESTDIR) 325876acefaSHiroki Sato mkdir -p ${DESTDIR} 326876acefaSHiroki Sato.endif 327de17cbccSHiroki Sato cp -a ftp ${DESTDIR}/ 3283083b412SMitchell Horne.if !empty(IMAGES) 329de17cbccSHiroki Sato.for I in ${IMAGES} 330de17cbccSHiroki Sato cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I} 331510f3303SGlen Barber. if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) 332bd9cab6fSRui Paulo ${XZ_CMD} -k ${DESTDIR}/${OSRELEASE}-${I} 333cbc0e08aSGlen Barber. endif 334de17cbccSHiroki Sato.endfor 33593e4813bSColin Percival ( cd ${DESTDIR} && sha512 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA512 ) 33693e4813bSColin Percival ( cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 ) 3373083b412SMitchell Horne.endif 338a68d274bSGlen Barber 33929b282f3SGlen Barber.include "${.CURDIR}/Makefile.inc1" 3406513e474SGlen Barber.include "${.CURDIR}/Makefile.vm" 341