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) 231b8a3e1dSDevin Teske# XTRADIR: xtra-bits-dir argument for <arch>/mkisoimages.sh 249d22cb2eSHiroki Sato# NOPKG: if set, do not distribute third-party packages 2512ad0bb1SNathan Whitehorn# NOPORTS: if set, do not distribute ports tree 2612ad0bb1SNathan Whitehorn# NOSRC: if set, do not distribute source tree 27f7f650c7SGlen Barber# WITH_DVD: if set, generate dvd1.iso 2855af5cf1SGlen Barber# WITH_COMPRESSED_IMAGES: if set, compress installation images with xz(1) 29cbc0e08aSGlen Barber# (uncompressed images are not removed) 30a68d274bSGlen Barber# WITH_VMIMAGES: if set, build virtual machine images with the release 31a9278c16SGlen Barber# WITH_COMPRESSED_VMIMAGES: if set, compress virtual machine disk images 32a9278c16SGlen Barber# with xz(1) (extremely time consuming) 332d4ff62fSGlen Barber# WITH_CLOUDWARE: if set, build cloud hosting disk images with the release 3412ad0bb1SNathan Whitehorn# TARGET/TARGET_ARCH: architecture of built release 35b03ddec9SJohn Baldwin# 36ab0e9cdcSPoul-Henning Kamp 3712ad0bb1SNathan WhitehornWORLDDIR?= ${.CURDIR}/.. 3812ad0bb1SNathan WhitehornPORTSDIR?= /usr/ports 39fff8eb57SJohn Baldwin 40464485c8SHiroki Sato.if !defined(TARGET) || empty(TARGET) 41464485c8SHiroki SatoTARGET= ${MACHINE} 42464485c8SHiroki Sato.endif 43464485c8SHiroki Sato.if !defined(TARGET_ARCH) || empty(TARGET_ARCH) 440bd47e83SNathan Whitehorn.if ${TARGET} == ${MACHINE} 45464485c8SHiroki SatoTARGET_ARCH= ${MACHINE_ARCH} 468f1f55e9SRuslan Ermilov.else 47464485c8SHiroki SatoTARGET_ARCH= ${TARGET} 48464485c8SHiroki Sato.endif 498f1f55e9SRuslan Ermilov.endif 5012ad0bb1SNathan WhitehornIMAKE= ${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} 51876acefaSHiroki SatoDISTDIR= dist 528f1f55e9SRuslan Ermilov 5308f1325dSGlen Barber# Define OSRELEASE by using newvers.sh 54de17cbccSHiroki Sato.if !defined(OSRELEASE) || empty(OSRELEASE) 55de17cbccSHiroki Sato.for _V in TYPE BRANCH REVISION 56de17cbccSHiroki Sato${_V}!= eval $$(awk '/^${_V}=/{print}' ${.CURDIR}/../sys/conf/newvers.sh); echo $$${_V} 57de17cbccSHiroki Sato.endfor 58de17cbccSHiroki Sato.for _V in ${TARGET_ARCH} 59de17cbccSHiroki Sato.if !empty(TARGET:M${_V}) 60de17cbccSHiroki SatoOSRELEASE= ${TYPE}-${REVISION}-${BRANCH}-${TARGET} 61745ca085SGlen BarberVOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET} 62de17cbccSHiroki Sato.else 63de17cbccSHiroki SatoOSRELEASE= ${TYPE}-${REVISION}-${BRANCH}-${TARGET}-${TARGET_ARCH} 64745ca085SGlen BarberVOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH} 65de17cbccSHiroki Sato.endif 66de17cbccSHiroki Sato.endfor 67de17cbccSHiroki Sato.endif 68de17cbccSHiroki Sato 6969c7d069SGlen Barber.if !defined(VOLUME_LABEL) || empty(VOLUME_LABEL) 7069c7d069SGlen BarberVOLUME_LABEL= FreeBSD_Install 7169c7d069SGlen Barber.endif 72ac23f460SGlen Barber 7312ad0bb1SNathan Whitehorn.if !exists(${PORTSDIR}) 7412ad0bb1SNathan WhitehornNOPORTS= true 75dd1a1b3dSJoerg Wunsch.endif 76dd1a1b3dSJoerg Wunsch 7712ad0bb1SNathan WhitehornEXTRA_PACKAGES= 786daa108fSRuslan Ermilov.if !defined(NOPORTS) 7912ad0bb1SNathan WhitehornEXTRA_PACKAGES+= ports.txz 806daa108fSRuslan Ermilov.endif 814731faa3SJordan K. Hubbard.if !defined(NOSRC) 8212ad0bb1SNathan WhitehornEXTRA_PACKAGES+= src.txz 832e3a1557SKen Smith.endif 84b2200964SJohn Baldwin 8512ad0bb1SNathan WhitehornRELEASE_TARGETS= ftp 86876acefaSHiroki SatoIMAGES= 8712ad0bb1SNathan Whitehorn.if exists(${.CURDIR}/${TARGET}/mkisoimages.sh) 8812ad0bb1SNathan WhitehornRELEASE_TARGETS+= cdrom 898cec99b6SGlen BarberIMAGES+= disc1.iso bootonly.iso 90d8824524SGlen Barber. if defined(WITH_DVD) && !empty(WITH_DVD) 91dc244562SGlen BarberRELEASE_TARGETS+= dvdrom 92dc244562SGlen BarberIMAGES+= dvd1.iso 93dc244562SGlen Barber. endif 946daa108fSRuslan Ermilov.endif 9512ad0bb1SNathan Whitehorn.if exists(${.CURDIR}/${TARGET}/make-memstick.sh) 963c334738SGlen BarberRELEASE_TARGETS+= memstick.img 97a9da1707SGlen BarberRELEASE_TARGETS+= mini-memstick.img 983c334738SGlen BarberIMAGES+= memstick.img 99a9da1707SGlen BarberIMAGES+= mini-memstick.img 100e738d1eaSJohn Baldwin.endif 101e738d1eaSJohn Baldwin 102a55e34ebSGlen BarberCLEANFILES= packagesystem *.txz MANIFEST release ${IMAGES} 1030c535991SGlen Barber.if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) 1040c535991SGlen Barber. for I in ${IMAGES} 10555af5cf1SGlen BarberCLEANFILES+= ${I}.xz 1060c535991SGlen Barber. endfor 1070c535991SGlen Barber.endif 108cd15d7f3SGlen Barber.if defined(WITH_DVD) && !empty(WITH_DVD) 109cd15d7f3SGlen BarberCLEANFILES+= pkg-stage 110cd15d7f3SGlen Barber.endif 111a55e34ebSGlen BarberCLEANDIRS= dist ftp disc1 bootonly dvd 11246b13263SHiroki Satobeforeclean: 11346b13263SHiroki Sato chflags -R noschg . 1148eb4e096SRuslan Ermilov.include <bsd.obj.mk> 11546b13263SHiroki Satoclean: beforeclean 11612ad0bb1SNathan Whitehorn 11712ad0bb1SNathan Whitehornbase.txz: 118876acefaSHiroki Sato mkdir -p ${DISTDIR} 119876acefaSHiroki Sato cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${.OBJDIR}/${DISTDIR} 12013cb0041SJessica Clarke# TODO: Add NO_ROOT mode to mm-tree.sh and etcupdate 12113cb0041SJessica Clarke.if !defined(NO_ROOT) 12212ad0bb1SNathan Whitehorn# Set up mergemaster root database 123672d7ddbSSean Bruno sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \ 12454a03abbSBryan Drewery "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} ${.MAKE.JOBS:D-j${.MAKE.JOBS}}" \ 12554a03abbSBryan Drewery -D "${.OBJDIR}/${DISTDIR}/base" 126e9120a25SGlen Barber etcupdate extract -B -M "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" \ 127d6d73d47SJohn Hay -s ${WORLDDIR} -d "${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate" 12813cb0041SJessica Clarke.endif 129bfc3bab8SNathan Whitehorn# Package all components 130876acefaSHiroki Sato cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR} 131876acefaSHiroki Sato mv ${DISTDIR}/*.txz . 13212ad0bb1SNathan Whitehorn 13312ad0bb1SNathan Whitehornkernel.txz: 134876acefaSHiroki Sato mkdir -p ${DISTDIR} 135876acefaSHiroki Sato cd ${WORLDDIR} && ${IMAKE} distributekernel packagekernel DISTDIR=${.OBJDIR}/${DISTDIR} 136876acefaSHiroki Sato mv ${DISTDIR}/kernel*.txz . 13712ad0bb1SNathan Whitehorn 13812ad0bb1SNathan Whitehornsrc.txz: 139876acefaSHiroki Sato mkdir -p ${DISTDIR}/usr 14012ad0bb1SNathan Whitehorn ln -fs ${WORLDDIR} ${DISTDIR}/usr/src 141*fcf12081SJessica Clarke cd ${DISTDIR} && ${TAR_CMD} cLvf - --exclude .svn --exclude .zfs \ 142bd9cab6fSRui Paulo --exclude .git --exclude @ --exclude usr/src/release/dist usr/src | \ 143bd9cab6fSRui Paulo ${XZ_CMD} > ${.OBJDIR}/src.txz 14412ad0bb1SNathan Whitehorn 14512ad0bb1SNathan Whitehornports.txz: 146876acefaSHiroki Sato mkdir -p ${DISTDIR}/usr 14712ad0bb1SNathan Whitehorn ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports 148*fcf12081SJessica Clarke cd ${DISTDIR} && ${TAR_CMD} cLvf - \ 14923659c9dSGlen Barber --exclude .git --exclude .svn \ 15012ad0bb1SNathan Whitehorn --exclude usr/ports/distfiles --exclude usr/ports/packages \ 151bd9cab6fSRui Paulo --exclude 'usr/ports/INDEX*' --exclude work usr/ports | \ 152bd9cab6fSRui Paulo ${XZ_CMD} > ${.OBJDIR}/ports.txz 15312ad0bb1SNathan Whitehorn 154a55e34ebSGlen Barberdisc1: packagesystem 15512ad0bb1SNathan Whitehorn# Install system 156a55e34ebSGlen Barber mkdir -p ${.TARGET} 1574bbfa3d3SEd Maste cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \ 15813f7dbe8SEd Maste DESTDIR=${.OBJDIR}/${.TARGET} MK_AT=no \ 1594c0ef5dbSNathan Whitehorn MK_INSTALLLIB=no MK_LIB32=no MK_MAIL=no \ 160eacff37aSEd Maste MK_TOOLCHAIN=no MK_PROFILE=no \ 1614c0ef5dbSNathan Whitehorn MK_RESCUE=no MK_DICT=no \ 1622502c66bSRoger Pau Monné MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no \ 1632502c66bSRoger Pau Monné -DDB_FROM_SRC 16412ad0bb1SNathan Whitehorn# Copy distfiles 165a55e34ebSGlen Barber mkdir -p ${.TARGET}/usr/freebsd-dist 16688343186SGlen Barber for dist in MANIFEST $$(ls *.txz | grep -vE -- '(base|lib32)-dbg'); \ 167a55e34ebSGlen Barber do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ 168ffc6fb79SGlen Barber done 16913cb0041SJessica Clarke.if defined(NO_ROOT) 17013cb0041SJessica Clarke echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG 17113cb0041SJessica Clarke for dist in MANIFEST $$(ls *.txz | grep -vE -- '(base|lib32)-dbg'); \ 17213cb0041SJessica Clarke do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ 17313cb0041SJessica Clarke done 17413cb0041SJessica Clarke.endif 17512ad0bb1SNathan Whitehorn# Set up installation environment 176a55e34ebSGlen Barber ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf 177a55e34ebSGlen Barber echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf 178a55e34ebSGlen Barber echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf 1798c14a409SGlen Barber echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf 180a55e34ebSGlen Barber echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf 1816e49372eSKyle Evans echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf 182a55e34ebSGlen Barber cp ${.CURDIR}/rc.local ${.TARGET}/etc 18313cb0041SJessica Clarke.if defined(NO_ROOT) 18413cb0041SJessica Clarke echo "./etc/resolv.conf type=link uname=root gname=wheel mode=0644 link=/tmp/bsdinstall_etc/resolv.conf" >> ${.TARGET}/METALOG 18513cb0041SJessica Clarke echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 18613cb0041SJessica Clarke echo "./etc/sysctl.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 18713cb0041SJessica Clarke echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 18813cb0041SJessica Clarke echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 18913cb0041SJessica Clarke.endif 190876acefaSHiroki Sato touch ${.TARGET} 19112ad0bb1SNathan Whitehorn 19246c413feSNathan Whitehornbootonly: packagesystem 19346c413feSNathan Whitehorn# Install system 194a55e34ebSGlen Barber mkdir -p ${.TARGET} 1954bbfa3d3SEd Maste cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \ 19613f7dbe8SEd Maste DESTDIR=${.OBJDIR}/${.TARGET} MK_AT=no \ 197738919c0SBaptiste Daroussin MK_GAMES=no \ 198ba7bd912SGlen Barber MK_INSTALLLIB=no MK_LIB32=no MK_MAIL=no \ 199eacff37aSEd Maste MK_TOOLCHAIN=no MK_PROFILE=no \ 20001d57ec0SBryan Drewery MK_RESCUE=no MK_DICT=no \ 2012502c66bSRoger Pau Monné MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no \ 2022502c66bSRoger Pau Monné -DDB_FROM_SRC 20346c413feSNathan Whitehorn# Copy manifest only (no distfiles) to get checksums 204a55e34ebSGlen Barber mkdir -p ${.TARGET}/usr/freebsd-dist 205a55e34ebSGlen Barber cp MANIFEST ${.TARGET}/usr/freebsd-dist 20613cb0041SJessica Clarke.if defined(NO_ROOT) 20713cb0041SJessica Clarke echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG 20813cb0041SJessica Clarke echo "./usr/freebsd-dist/MANIFEST type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 20913cb0041SJessica Clarke.endif 21046c413feSNathan 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 21813cb0041SJessica Clarke.if defined(NO_ROOT) 21913cb0041SJessica Clarke echo "./etc/resolv.conf type=link uname=root gname=wheel mode=0644 link=/tmp/bsdinstall_etc/resolv.conf" >> ${.TARGET}/METALOG 22013cb0041SJessica Clarke echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 22113cb0041SJessica Clarke echo "./etc/sysctl.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 22213cb0041SJessica Clarke echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 22313cb0041SJessica Clarke echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 22413cb0041SJessica Clarke.endif 22546c413feSNathan Whitehorn 226a55e34ebSGlen Barberdvd: packagesystem 227dc244562SGlen Barber# Install system 228dc244562SGlen Barber mkdir -p ${.TARGET} 2294bbfa3d3SEd Maste cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \ 230ba7bd912SGlen Barber DESTDIR=${.OBJDIR}/${.TARGET} MK_RESCUE=no MK_KERNEL_SYMBOLS=no \ 2312502c66bSRoger Pau Monné MK_TESTS=no MK_DEBUG_FILES=no \ 2322502c66bSRoger Pau Monné -DDB_FROM_SRC 233dc244562SGlen Barber# Copy distfiles 234dc244562SGlen Barber mkdir -p ${.TARGET}/usr/freebsd-dist 23588343186SGlen Barber for dist in MANIFEST $$(ls *.txz | grep -v -- '(base|lib32)-dbg'); \ 236ffc6fb79SGlen Barber do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ 237ffc6fb79SGlen Barber done 23813cb0041SJessica Clarke.if defined(NO_ROOT) 23913cb0041SJessica Clarke echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG 24013cb0041SJessica Clarke for dist in MANIFEST $$(ls *.txz | grep -vE -- '(base|lib32)-dbg'); \ 24113cb0041SJessica Clarke do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ 24213cb0041SJessica Clarke done 24313cb0041SJessica Clarke.endif 244dc244562SGlen Barber# Set up installation environment 245dc244562SGlen Barber ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf 246dc244562SGlen Barber echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf 247dc244562SGlen Barber echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf 2488c14a409SGlen Barber echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf 2497f100614SGlen Barber echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf 2506e49372eSKyle Evans echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf 251dc244562SGlen Barber cp ${.CURDIR}/rc.local ${.TARGET}/etc 25213cb0041SJessica Clarke.if defined(NO_ROOT) 25313cb0041SJessica Clarke echo "./etc/resolv.conf type=link uname=root gname=wheel mode=0644 link=/tmp/bsdinstall_etc/resolv.conf" >> ${.TARGET}/METALOG 25413cb0041SJessica Clarke echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 25513cb0041SJessica Clarke echo "./etc/sysctl.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 25613cb0041SJessica Clarke echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 25713cb0041SJessica Clarke echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG 25813cb0041SJessica Clarke.endif 259dc244562SGlen Barber touch ${.TARGET} 260dc244562SGlen Barber 2618cec99b6SGlen Barberrelease.iso: disc1.iso 262a55e34ebSGlen Barberdisc1.iso: disc1 26313cb0041SJessica Clarke cd disc1 && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ../${.TARGET} .${NO_ROOT:D/METALOG} ${XTRADIR} 26412ad0bb1SNathan Whitehorn 265dc244562SGlen Barberdvd1.iso: dvd pkg-stage 26613cb0041SJessica Clarke cd dvd && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ../${.TARGET} .${NO_ROOT:D/METALOG} ${XTRADIR} 267dc244562SGlen Barber 26846c413feSNathan Whitehornbootonly.iso: bootonly 26913cb0041SJessica Clarke cd bootonly && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ../${.TARGET} .${NO_ROOT:D/METALOG} ${XTRADIR} 27046c413feSNathan Whitehorn 271cb95a96bSGlen Barbermemstick: memstick.img 272a55e34ebSGlen Barbermemstick.img: disc1 27313cb0041SJessica Clarke cd disc1 && sh ${.CURDIR}/${TARGET}/make-memstick.sh .${NO_ROOT:D/METALOG} ../${.TARGET} 27412ad0bb1SNathan Whitehorn 275a9da1707SGlen Barbermini-memstick: mini-memstick.img 276a55e34ebSGlen Barbermini-memstick.img: bootonly 27713cb0041SJessica Clarke cd bootonly && sh ${.CURDIR}/${TARGET}/make-memstick.sh .${NO_ROOT:D/METALOG} ../${.TARGET} 278a9da1707SGlen Barber 27912ad0bb1SNathan Whitehornpackagesystem: base.txz kernel.txz ${EXTRA_PACKAGES} 280876acefaSHiroki Sato sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST 281299a8b95SNathan Whitehorn touch ${.TARGET} 28212ad0bb1SNathan Whitehorn 283dc244562SGlen Barberpkg-stage: 28413cb0041SJessica Clarke# TODO: Support for -DNO_ROOT 2858f229143SGlen Barber.if !defined(NOPKG) || empty(NOPKG) 286fefd0439SGlen Barber env PORTSDIR=${PORTSDIR} REPOS_DIR=${.CURDIR}/pkg_repos/ \ 2876f50c4eaSGlen Barber sh ${.CURDIR}/scripts/pkg-stage.sh 2880d0e89b7SGlen Barber mkdir -p ${.OBJDIR}/dvd/packages/repos/ 2890d0e89b7SGlen Barber cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \ 2900d0e89b7SGlen Barber ${.OBJDIR}/dvd/packages/repos/ 291dc244562SGlen Barber.endif 2920d0e89b7SGlen Barber touch ${.TARGET} 293dc244562SGlen Barber 2948cec99b6SGlen Barbercdrom: disc1.iso bootonly.iso 295dc244562SGlen Barberdvdrom: dvd1.iso 29612ad0bb1SNathan Whitehornftp: packagesystem 297299a8b95SNathan Whitehorn rm -rf ftp 298876acefaSHiroki Sato mkdir -p ftp 299299a8b95SNathan Whitehorn cp *.txz MANIFEST ftp 30012ad0bb1SNathan Whitehorn 3014afe7cf5SGlen Barberrelease: real-release vm-release cloudware-release 302fdbd473cSGlen Barber ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} release-done 303fdbd473cSGlen Barber true 304fdbd473cSGlen Barber 305fdbd473cSGlen Barberrelease-done: 306fdbd473cSGlen Barber touch release 3074afe7cf5SGlen Barber 3084afe7cf5SGlen Barberreal-release: 3090bd47e83SNathan Whitehorn ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj 3100bd47e83SNathan Whitehorn ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} 31112ad0bb1SNathan Whitehorn 31232a4dda8SGlen Barberinstall: release-install vm-install 3132d4ff62fSGlen Barber 3142d4ff62fSGlen Barberrelease-install: 315876acefaSHiroki Sato.if defined(DESTDIR) && !empty(DESTDIR) 316876acefaSHiroki Sato mkdir -p ${DESTDIR} 317876acefaSHiroki Sato.endif 318de17cbccSHiroki Sato cp -a ftp ${DESTDIR}/ 3193083b412SMitchell Horne.if !empty(IMAGES) 320de17cbccSHiroki Sato.for I in ${IMAGES} 321de17cbccSHiroki Sato cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I} 322510f3303SGlen Barber. if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) 323bd9cab6fSRui Paulo ${XZ_CMD} -k ${DESTDIR}/${OSRELEASE}-${I} 324cbc0e08aSGlen Barber. endif 325de17cbccSHiroki Sato.endfor 32634187a08SGlen Barber cd ${DESTDIR} && sha512 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA512 327de17cbccSHiroki Sato cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 3283083b412SMitchell Horne.endif 329a68d274bSGlen Barber 33029b282f3SGlen Barber.include "${.CURDIR}/Makefile.inc1" 3316513e474SGlen Barber.include "${.CURDIR}/Makefile.vm" 332