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) 10*d03c82c2SDoug Rabson# release: Invokes real-release, vm-release, cloudware-release and oci-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 14*d03c82c2SDoug Rabson# oci-release: Build all OCI container images 15*d03c82c2SDoug Rabson# install: Invokes the release-install, vm-install and oci-install targets 162d4ff62fSGlen Barber# release-install: Copies all release installation media into ${DESTDIR} 172d4ff62fSGlen Barber# vm-install: Copies all virtual machine images into ${DESTDIR} 184771c2e9SColin Percival# cloud-install: Copies non-uploaded cloud images into ${DESTDIR} 19*d03c82c2SDoug Rabson# oci-install: Copies all OCI container images into ${DESTDIR} 20bd668f6fSPoul-Henning Kamp# 2112ad0bb1SNathan Whitehorn# Variables affecting the build process: 2212ad0bb1SNathan Whitehorn# WORLDDIR: location of src tree -- must have built world and default kernel 2312ad0bb1SNathan Whitehorn# (by default, the directory above this one) 2412ad0bb1SNathan Whitehorn# PORTSDIR: location of ports tree to distribute (default: /usr/ports) 251b8a3e1dSDevin Teske# XTRADIR: xtra-bits-dir argument for <arch>/mkisoimages.sh 269d22cb2eSHiroki Sato# NOPKG: if set, do not distribute third-party packages 2712ad0bb1SNathan Whitehorn# NOPORTS: if set, do not distribute ports tree 2812ad0bb1SNathan Whitehorn# NOSRC: if set, do not distribute source tree 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 41fff8eb57SJohn Baldwin 426853d893SJessica Clarke.include "${WORLDDIR}/share/mk/bsd.compat.pre.mk" 436853d893SJessica Clarke 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 5708f1325dSGlen Barber# Define OSRELEASE by using newvers.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(${PORTSDIR}) 7812ad0bb1SNathan WhitehornNOPORTS= true 79dd1a1b3dSJoerg Wunsch.endif 80dd1a1b3dSJoerg Wunsch 812e9b8c8cSEd MasteDISTRIBUTIONS= base.txz kernel.txz 826daa108fSRuslan Ermilov.if !defined(NOPORTS) 832e9b8c8cSEd MasteDISTRIBUTIONS+= ports.txz 846daa108fSRuslan Ermilov.endif 854731faa3SJordan K. Hubbard.if !defined(NOSRC) 862e9b8c8cSEd MasteDISTRIBUTIONS+= src.txz 872e3a1557SKen Smith.endif 88b2200964SJohn Baldwin 8912ad0bb1SNathan WhitehornRELEASE_TARGETS= ftp 90876acefaSHiroki SatoIMAGES= 9112ad0bb1SNathan Whitehorn.if exists(${.CURDIR}/${TARGET}/mkisoimages.sh) 9212ad0bb1SNathan WhitehornRELEASE_TARGETS+= cdrom 938cec99b6SGlen BarberIMAGES+= disc1.iso bootonly.iso 94d8824524SGlen Barber. if defined(WITH_DVD) && !empty(WITH_DVD) 95dc244562SGlen BarberRELEASE_TARGETS+= dvdrom 96dc244562SGlen BarberIMAGES+= dvd1.iso 97dc244562SGlen Barber. endif 986daa108fSRuslan Ermilov.endif 9912ad0bb1SNathan Whitehorn.if exists(${.CURDIR}/${TARGET}/make-memstick.sh) 1003c334738SGlen BarberRELEASE_TARGETS+= memstick.img 101a9da1707SGlen BarberRELEASE_TARGETS+= mini-memstick.img 1023c334738SGlen BarberIMAGES+= memstick.img 103a9da1707SGlen BarberIMAGES+= mini-memstick.img 104e738d1eaSJohn Baldwin.endif 105e738d1eaSJohn Baldwin 106a55e34ebSGlen BarberCLEANFILES= packagesystem *.txz MANIFEST release ${IMAGES} 1070c535991SGlen Barber.if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) 1080c535991SGlen Barber. for I in ${IMAGES} 10955af5cf1SGlen BarberCLEANFILES+= ${I}.xz 1100c535991SGlen Barber. endfor 1110c535991SGlen Barber.endif 112cd15d7f3SGlen Barber.if defined(WITH_DVD) && !empty(WITH_DVD) 113cd15d7f3SGlen BarberCLEANFILES+= pkg-stage 114cd15d7f3SGlen Barber.endif 115a1bff973SColin PercivalCLEANDIRS= dist ftp disc1 disc1-disc1 disc1-memstick bootonly bootonly-bootonly bootonly-memstick dvd 11646b13263SHiroki Satobeforeclean: 11746b13263SHiroki Sato chflags -R noschg . 1188eb4e096SRuslan Ermilov.include <bsd.obj.mk> 11946b13263SHiroki Satoclean: beforeclean 12012ad0bb1SNathan Whitehorn 12112ad0bb1SNathan Whitehornbase.txz: 122876acefaSHiroki Sato mkdir -p ${DISTDIR} 12393e4813bSColin Percival ( cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${.OBJDIR}/${DISTDIR} ) 1248ee478dfSEd Maste # Bootstrap etcupdate(8) database. 125e9ba25aaSJessica Clarke sh ${WORLDDIR}/usr.sbin/etcupdate/etcupdate.sh extract -B \ 126f3772439SJessica Clarke -m "${MAKE}" -M "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" \ 127f36b5d8aSJessica Clarke -s ${WORLDDIR} -d "${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate" \ 128e972e408SGordon Tetlow -L /dev/null ${NO_ROOT:D-N} 129f36b5d8aSJessica Clarke.if defined(NO_ROOT) 130f36b5d8aSJessica Clarke echo "./var/db/etcupdate type=dir uname=root gname=wheel mode=0755" >> ${.OBJDIR}/${DISTDIR}/base.meta 131f36b5d8aSJessica Clarke sed -n 's,^\.,./var/db/etcupdate/current,p' ${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate/current/METALOG \ 132f36b5d8aSJessica Clarke >> ${.OBJDIR}/${DISTDIR}/base.meta 133f36b5d8aSJessica Clarke rm ${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate/current/METALOG 13413cb0041SJessica Clarke.endif 135bfc3bab8SNathan Whitehorn# Package all components 13693e4813bSColin Percival ( cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR} ) 137876acefaSHiroki Sato mv ${DISTDIR}/*.txz . 13812ad0bb1SNathan Whitehorn 13912ad0bb1SNathan Whitehornkernel.txz: 140876acefaSHiroki Sato mkdir -p ${DISTDIR} 14165c603edSColin Percival ( cd ${WORLDDIR} && ${IMAKE} distributekernel DISTDIR=${.OBJDIR}/${DISTDIR} ) 14265c603edSColin Percival ( cd ${WORLDDIR} && ${IMAKE} packagekernel DISTDIR=${.OBJDIR}/${DISTDIR} ) 143876acefaSHiroki Sato mv ${DISTDIR}/kernel*.txz . 14412ad0bb1SNathan Whitehorn 14512ad0bb1SNathan Whitehornsrc.txz: 146876acefaSHiroki Sato mkdir -p ${DISTDIR}/usr 14712ad0bb1SNathan Whitehorn ln -fs ${WORLDDIR} ${DISTDIR}/usr/src 14893e4813bSColin Percival ( cd ${DISTDIR} && ${TAR_CMD} cLvf - --exclude .svn --exclude .zfs \ 149bd9cab6fSRui Paulo --exclude .git --exclude @ --exclude usr/src/release/dist usr/src | \ 15093e4813bSColin Percival ${XZ_CMD} > ${.OBJDIR}/src.txz ) 15112ad0bb1SNathan Whitehorn 15212ad0bb1SNathan Whitehornports.txz: 153876acefaSHiroki Sato mkdir -p ${DISTDIR}/usr 15412ad0bb1SNathan Whitehorn ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports 15593e4813bSColin Percival ( cd ${DISTDIR} && ${TAR_CMD} cLvf - \ 15623659c9dSGlen Barber --exclude .git --exclude .svn \ 15712ad0bb1SNathan Whitehorn --exclude usr/ports/distfiles --exclude usr/ports/packages \ 158bd9cab6fSRui Paulo --exclude 'usr/ports/INDEX*' --exclude work usr/ports | \ 15993e4813bSColin Percival ${XZ_CMD} > ${.OBJDIR}/ports.txz ) 16012ad0bb1SNathan Whitehorn 161a55e34ebSGlen Barberdisc1: packagesystem 16212ad0bb1SNathan Whitehorn# Install system 163a55e34ebSGlen Barber mkdir -p ${.TARGET} 16493e4813bSColin Percival ( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \ 16513f7dbe8SEd Maste DESTDIR=${.OBJDIR}/${.TARGET} MK_AT=no \ 1666853d893SJessica Clarke MK_INSTALLLIB=no MK_MAIL=no \ 16732a79e85SJessica Clarke ${_ALL_LIBCOMPATS:@v@MK_LIB$v=no@} \ 168eacff37aSEd Maste MK_TOOLCHAIN=no MK_PROFILE=no \ 1694c0ef5dbSNathan Whitehorn MK_RESCUE=no MK_DICT=no \ 1702502c66bSRoger Pau Monné MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no \ 17193e4813bSColin Percival -DDB_FROM_SRC ) 17212ad0bb1SNathan Whitehorn# Copy distfiles 173a55e34ebSGlen Barber mkdir -p ${.TARGET}/usr/freebsd-dist 1746853d893SJessica Clarke for dist in MANIFEST $$(ls *.txz | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ 175a55e34ebSGlen Barber do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ 176ffc6fb79SGlen Barber done 17713cb0041SJessica Clarke.if defined(NO_ROOT) 17813cb0041SJessica Clarke echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG 1796853d893SJessica Clarke for dist in MANIFEST $$(ls *.txz | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ 18013cb0041SJessica Clarke do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ 18113cb0041SJessica Clarke done 18213cb0041SJessica Clarke.endif 18312ad0bb1SNathan Whitehorn# Set up installation environment 184a55e34ebSGlen Barber ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf 185a55e34ebSGlen Barber echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf 186a55e34ebSGlen Barber echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf 1878c14a409SGlen Barber echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf 188a55e34ebSGlen Barber echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf 1896e49372eSKyle Evans echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf 1902a90c47aSJessica Clarke echo loader_menu_multi_user_prompt=\"Installer\" >> ${.TARGET}/boot/loader.conf 191a55e34ebSGlen Barber cp ${.CURDIR}/rc.local ${.TARGET}/etc 19213cb0041SJessica Clarke.if defined(NO_ROOT) 19313cb0041SJessica Clarke echo "./etc/resolv.conf type=link uname=root gname=wheel mode=0644 link=/tmp/bsdinstall_etc/resolv.conf" >> ${.TARGET}/METALOG 19413cb0041SJessica Clarke echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 19513cb0041SJessica Clarke echo "./etc/sysctl.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 19613cb0041SJessica Clarke echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 19713cb0041SJessica Clarke echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 19813cb0041SJessica Clarke.endif 199876acefaSHiroki Sato touch ${.TARGET} 20012ad0bb1SNathan Whitehorn 20146c413feSNathan Whitehornbootonly: packagesystem 20246c413feSNathan Whitehorn# Install system 203a55e34ebSGlen Barber mkdir -p ${.TARGET} 20493e4813bSColin Percival ( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \ 20513f7dbe8SEd Maste DESTDIR=${.OBJDIR}/${.TARGET} MK_AT=no \ 206738919c0SBaptiste Daroussin MK_GAMES=no \ 2076853d893SJessica Clarke MK_INSTALLLIB=no MK_MAIL=no \ 20832a79e85SJessica Clarke ${_ALL_LIBCOMPATS:@v@MK_LIB$v=no@} \ 209eacff37aSEd Maste MK_TOOLCHAIN=no MK_PROFILE=no \ 21001d57ec0SBryan Drewery MK_RESCUE=no MK_DICT=no \ 2112502c66bSRoger Pau Monné MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no \ 21293e4813bSColin Percival -DDB_FROM_SRC ) 21346c413feSNathan Whitehorn# Copy manifest only (no distfiles) to get checksums 214a55e34ebSGlen Barber mkdir -p ${.TARGET}/usr/freebsd-dist 215a55e34ebSGlen Barber cp MANIFEST ${.TARGET}/usr/freebsd-dist 21613cb0041SJessica Clarke.if defined(NO_ROOT) 21713cb0041SJessica Clarke echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG 21813cb0041SJessica Clarke echo "./usr/freebsd-dist/MANIFEST type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 21913cb0041SJessica Clarke.endif 22046c413feSNathan Whitehorn# Set up installation environment 221a55e34ebSGlen Barber ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf 222a55e34ebSGlen Barber echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf 223a55e34ebSGlen Barber echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf 2248c14a409SGlen Barber echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf 225a55e34ebSGlen Barber echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf 2266e49372eSKyle Evans echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf 2272a90c47aSJessica Clarke echo loader_menu_multi_user_prompt=\"Installer\" >> ${.TARGET}/boot/loader.conf 228a55e34ebSGlen Barber cp ${.CURDIR}/rc.local ${.TARGET}/etc 22913cb0041SJessica Clarke.if defined(NO_ROOT) 23013cb0041SJessica Clarke echo "./etc/resolv.conf type=link uname=root gname=wheel mode=0644 link=/tmp/bsdinstall_etc/resolv.conf" >> ${.TARGET}/METALOG 23113cb0041SJessica Clarke echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 23213cb0041SJessica Clarke echo "./etc/sysctl.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 23313cb0041SJessica Clarke echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 23413cb0041SJessica Clarke echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 23513cb0041SJessica Clarke.endif 23646c413feSNathan Whitehorn 237a55e34ebSGlen Barberdvd: packagesystem 238dc244562SGlen Barber# Install system 239dc244562SGlen Barber mkdir -p ${.TARGET} 24093e4813bSColin Percival ( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \ 241ba7bd912SGlen Barber DESTDIR=${.OBJDIR}/${.TARGET} MK_RESCUE=no MK_KERNEL_SYMBOLS=no \ 2422502c66bSRoger Pau Monné MK_TESTS=no MK_DEBUG_FILES=no \ 24393e4813bSColin Percival -DDB_FROM_SRC ) 244dc244562SGlen Barber# Copy distfiles 245dc244562SGlen Barber mkdir -p ${.TARGET}/usr/freebsd-dist 246e166fea6SColin Percival for dist in MANIFEST *.txz; \ 247ffc6fb79SGlen Barber do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ 248ffc6fb79SGlen Barber done 24913cb0041SJessica Clarke.if defined(NO_ROOT) 25013cb0041SJessica Clarke echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG 251e166fea6SColin Percival for dist in MANIFEST *.txz; \ 25213cb0041SJessica Clarke do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ 25313cb0041SJessica Clarke done 25413cb0041SJessica Clarke.endif 255dc244562SGlen Barber# Set up installation environment 256dc244562SGlen Barber ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf 257dc244562SGlen Barber echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf 258dc244562SGlen Barber echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf 2598c14a409SGlen Barber echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf 2607f100614SGlen Barber echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf 2616e49372eSKyle Evans echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf 2622a90c47aSJessica Clarke echo loader_menu_multi_user_prompt=\"Installer\" >> ${.TARGET}/boot/loader.conf 263dc244562SGlen Barber cp ${.CURDIR}/rc.local ${.TARGET}/etc 26413cb0041SJessica Clarke.if defined(NO_ROOT) 26513cb0041SJessica Clarke echo "./etc/resolv.conf type=link uname=root gname=wheel mode=0644 link=/tmp/bsdinstall_etc/resolv.conf" >> ${.TARGET}/METALOG 26613cb0041SJessica Clarke echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 26713cb0041SJessica Clarke echo "./etc/sysctl.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 26813cb0041SJessica Clarke echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 26913cb0041SJessica Clarke echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 27013cb0041SJessica Clarke.endif 271dc244562SGlen Barber touch ${.TARGET} 272dc244562SGlen Barber 273a1bff973SColin Percivaldisc1-disc1 disc1-memstick: disc1 274a1bff973SColin Percival mkdir ${.TARGET} 275a1bff973SColin Percival tar -cf- -C disc1 . | tar -xf- -C ${.TARGET} 276a1bff973SColin Percival 277a1bff973SColin Percivalbootonly-bootonly bootonly-memstick: bootonly 278a1bff973SColin Percival mkdir ${.TARGET} 279a1bff973SColin Percival tar -cf- -C bootonly . | tar -xf- -C ${.TARGET} 280a1bff973SColin Percival 2818cec99b6SGlen Barberrelease.iso: disc1.iso 282a1bff973SColin Percivaldisc1.iso: disc1-disc1 283a1bff973SColin Percival cd disc1-disc1 && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ../${.TARGET} .${NO_ROOT:D/METALOG} ${XTRADIR} 28412ad0bb1SNathan Whitehorn 285dc244562SGlen Barberdvd1.iso: dvd pkg-stage 28613cb0041SJessica Clarke cd dvd && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ../${.TARGET} .${NO_ROOT:D/METALOG} ${XTRADIR} 287dc244562SGlen Barber 288a1bff973SColin Percivalbootonly.iso: bootonly-bootonly 289a1bff973SColin Percival cd bootonly-bootonly && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ../${.TARGET} .${NO_ROOT:D/METALOG} ${XTRADIR} 29046c413feSNathan Whitehorn 291cb95a96bSGlen Barbermemstick: memstick.img 292a1bff973SColin Percivalmemstick.img: disc1-memstick 293a1bff973SColin Percival cd disc1-memstick && sh ${.CURDIR}/${TARGET}/make-memstick.sh .${NO_ROOT:D/METALOG} ../${.TARGET} 29412ad0bb1SNathan Whitehorn 295a9da1707SGlen Barbermini-memstick: mini-memstick.img 296a1bff973SColin Percivalmini-memstick.img: bootonly-memstick 297a1bff973SColin Percival cd bootonly-memstick && sh ${.CURDIR}/${TARGET}/make-memstick.sh .${NO_ROOT:D/METALOG} ../${.TARGET} 298a9da1707SGlen Barber 2992e9b8c8cSEd Mastepackagesystem: ${DISTRIBUTIONS} 300876acefaSHiroki Sato sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST 301299a8b95SNathan Whitehorn touch ${.TARGET} 30212ad0bb1SNathan Whitehorn 303567cbd8fSColin Percivalpkg-stage: dvd 30413cb0041SJessica Clarke# TODO: Support for -DNO_ROOT 3058f229143SGlen Barber.if !defined(NOPKG) || empty(NOPKG) 306fefd0439SGlen Barber env PORTSDIR=${PORTSDIR} REPOS_DIR=${.CURDIR}/pkg_repos/ \ 3076f50c4eaSGlen Barber sh ${.CURDIR}/scripts/pkg-stage.sh 3080d0e89b7SGlen Barber mkdir -p ${.OBJDIR}/dvd/packages/repos/ 3090d0e89b7SGlen Barber cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \ 3100d0e89b7SGlen Barber ${.OBJDIR}/dvd/packages/repos/ 311dc244562SGlen Barber.endif 3120d0e89b7SGlen Barber touch ${.TARGET} 313dc244562SGlen Barber 3148cec99b6SGlen Barbercdrom: disc1.iso bootonly.iso 315dc244562SGlen Barberdvdrom: dvd1.iso 31612ad0bb1SNathan Whitehornftp: packagesystem 317299a8b95SNathan Whitehorn rm -rf ftp 318876acefaSHiroki Sato mkdir -p ftp 319299a8b95SNathan Whitehorn cp *.txz MANIFEST ftp 32012ad0bb1SNathan Whitehorn 321*d03c82c2SDoug Rabsonrelease: real-release vm-release cloudware-release oci-release 322fdbd473cSGlen Barber ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} release-done 323fdbd473cSGlen Barber true 324fdbd473cSGlen Barber 325fdbd473cSGlen Barberrelease-done: 326fdbd473cSGlen Barber touch release 3274afe7cf5SGlen Barber 3284afe7cf5SGlen Barberreal-release: 3290bd47e83SNathan Whitehorn ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj 3300bd47e83SNathan Whitehorn ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} 33112ad0bb1SNathan Whitehorn 332*d03c82c2SDoug Rabsoninstall: release-install vm-install oci-install .WAIT cloud-install 3332d4ff62fSGlen Barber 3342d4ff62fSGlen Barberrelease-install: 335876acefaSHiroki Sato.if defined(DESTDIR) && !empty(DESTDIR) 336876acefaSHiroki Sato mkdir -p ${DESTDIR} 337876acefaSHiroki Sato.endif 338de17cbccSHiroki Sato cp -a ftp ${DESTDIR}/ 3393083b412SMitchell Horne.if !empty(IMAGES) 340de17cbccSHiroki Sato.for I in ${IMAGES} 341de17cbccSHiroki Sato cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I} 342510f3303SGlen Barber. if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) 343bd9cab6fSRui Paulo ${XZ_CMD} -k ${DESTDIR}/${OSRELEASE}-${I} 344cbc0e08aSGlen Barber. endif 345de17cbccSHiroki Sato.endfor 34693e4813bSColin Percival ( cd ${DESTDIR} && sha512 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA512 ) 34793e4813bSColin Percival ( cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 ) 3483083b412SMitchell Horne.endif 349a68d274bSGlen Barber 35029b282f3SGlen Barber.include "${.CURDIR}/Makefile.inc1" 3516513e474SGlen Barber.include "${.CURDIR}/Makefile.vm" 352*d03c82c2SDoug Rabson.include "${.CURDIR}/Makefile.oci" 353