Makefile.vm (e89ef0620af61e6c544e3d1a6ca72e26944c5576) | Makefile.vm (1ecaa3f75e21ab45f5e7849b4d2042c4645659da) |
---|---|
1# 2# $FreeBSD$ 3# 4# 5# Makefile for building virtual machine and cloud provider disk images. 6# 7 8VMTARGETS= vm-image --- 25 unchanged lines hidden (view full) --- 34OPENSTACK_DISK= ${OSRELEASE}.${OPENSTACK_FORMAT} 35VAGRANT-VIRTUALBOX_FORMAT= vmdk 36VAGRANT-VIRTUALBOX_DESC= Vagrant Image for VirtualBox 37VAGRANT-VIRTUALBOX_DISK= ${OSRELEASE}.vbox.${VAGRANT_FORMAT} 38VAGRANT-VMWARE_FORMAT= vmdk 39VAGRANT-VMWARE_DESC= Vagrant Image for VMWare 40VAGRANT-VMWARE_DISK= ${OSRELEASE}.vmware.${VAGRANT_FORMAT} 41 | 1# 2# $FreeBSD$ 3# 4# 5# Makefile for building virtual machine and cloud provider disk images. 6# 7 8VMTARGETS= vm-image --- 25 unchanged lines hidden (view full) --- 34OPENSTACK_DISK= ${OSRELEASE}.${OPENSTACK_FORMAT} 35VAGRANT-VIRTUALBOX_FORMAT= vmdk 36VAGRANT-VIRTUALBOX_DESC= Vagrant Image for VirtualBox 37VAGRANT-VIRTUALBOX_DISK= ${OSRELEASE}.vbox.${VAGRANT_FORMAT} 38VAGRANT-VMWARE_FORMAT= vmdk 39VAGRANT-VMWARE_DESC= Vagrant Image for VMWare 40VAGRANT-VMWARE_DISK= ${OSRELEASE}.vmware.${VAGRANT_FORMAT} 41 |
42emulator-portinstall: 43.if ${TARGET_ARCH} != ${MACHINE_ARCH} 44.if ( ${TARGET_ARCH} != "i386" ) || ( ${MACHINE_ARCH} != "amd64" ) 45.if !exists(/usr/local/bin/qemu-${TARGET_ARCH}-static) 46.if exists(${PORTSDIR}/emulators/qemu-user-static/Makefile) 47 env - PATH=$$PATH make -C ${PORTSDIR}/emulators/qemu-user-static BATCH=1 all install clean 48.else 49.if !exists(/usr/local/sbin/pkg-static) 50 env ASSUME_ALWAYS_YES=yes pkg bootstrap -y 51.endif 52 env ASSUME_ALWAYS_YES=yes pkg install -y emulators/qemu-user-static 53.endif 54.endif 55 56QEMUSTATIC=/usr/local/bin/qemu-${TARGET_ARCH}-static 57.endif 58.endif 59 |
|
42.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) 43. for _CW in ${CLOUDWARE} 44CLOUDTARGETS+= cw-${_CW:tl} 45CLEANDIRS+= cw-${_CW:tl} 46CLEANFILES+= ${_CW:tl}.img \ 47 ${_CW:tl}.${${_CW:tu}_FORMAT} \ 48 ${_CW:tl}.${${_CW:tu}_FORMAT}.raw \ 49 cw${_CW:tl}-package 50CLOUDPACKAGE+= cw${_CW:tl}-package 51${_CW:tu}IMAGE= ${_CW:tl}.${${_CW:tu}_FORMAT} 52. if exists(${.CURDIR}/tools/${_CW:tl}.conf) && !defined(${_CW:tu}CONF) 53${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:tl}.conf 54. endif 55 | 60.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) 61. for _CW in ${CLOUDWARE} 62CLOUDTARGETS+= cw-${_CW:tl} 63CLEANDIRS+= cw-${_CW:tl} 64CLEANFILES+= ${_CW:tl}.img \ 65 ${_CW:tl}.${${_CW:tu}_FORMAT} \ 66 ${_CW:tl}.${${_CW:tu}_FORMAT}.raw \ 67 cw${_CW:tl}-package 68CLOUDPACKAGE+= cw${_CW:tl}-package 69${_CW:tu}IMAGE= ${_CW:tl}.${${_CW:tu}_FORMAT} 70. if exists(${.CURDIR}/tools/${_CW:tl}.conf) && !defined(${_CW:tu}CONF) 71${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:tl}.conf 72. endif 73 |
56cw-${_CW:tl}: | 74cw-${_CW:tl}: emulator-portinstall |
57 mkdir -p ${.OBJDIR}/${.TARGET} 58 env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ | 75 mkdir -p ${.OBJDIR}/${.TARGET} 76 env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ |
77 QEMUSTATIC=${QEMUSTATIC} \ |
|
59 ${.CURDIR}/scripts/mk-vmimage.sh \ 60 -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ 61 -i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW:tu}_FORMAT} \ 62 -S ${WORLDDIR} -o ${.OBJDIR}/${${_CW:tu}IMAGE} -c ${${_CW:tu}CONF} 63 touch ${.TARGET} 64 65cw${_CW:tl}-package: 66 @# Special target to handle packaging cloud images in the formats --- 85 unchanged lines hidden --- | 78 ${.CURDIR}/scripts/mk-vmimage.sh \ 79 -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ 80 -i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW:tu}_FORMAT} \ 81 -S ${WORLDDIR} -o ${.OBJDIR}/${${_CW:tu}IMAGE} -c ${${_CW:tu}CONF} 82 touch ${.TARGET} 83 84cw${_CW:tl}-package: 85 @# Special target to handle packaging cloud images in the formats --- 85 unchanged lines hidden --- |