Makefile.mirrors (283268) | Makefile.mirrors (283271) |
---|---|
1# 2# This Makefile helps create the directory structure on ftp-master, 3# making staging builds a bit more sane. 4# 5# You probably do not want to use this. Really. 6# You have been warned. 7# 8# Seriously. 9# 10# Don't use this unless you know why you're using it. 11# | 1# 2# This Makefile helps create the directory structure on ftp-master, 3# making staging builds a bit more sane. 4# 5# You probably do not want to use this. Really. 6# You have been warned. 7# 8# Seriously. 9# 10# Don't use this unless you know why you're using it. 11# |
12# $FreeBSD: head/release/Makefile.mirrors 283268 2015-05-21 20:43:02Z gjb $ | 12# $FreeBSD: head/release/Makefile.mirrors 283271 2015-05-21 22:11:57Z gjb $ |
13# 14 15.include "${.CURDIR}/Makefile" 16 17RELEASEDIR?= /R 18FTPDIR?= ${RELEASEDIR}/ftp-stage 19STAGE_TARGETS?= iso-images-stage 20 | 13# 14 15.include "${.CURDIR}/Makefile" 16 17RELEASEDIR?= /R 18FTPDIR?= ${RELEASEDIR}/ftp-stage 19STAGE_TARGETS?= iso-images-stage 20 |
21.if ${TARGET} == "arm" || ${EMBEDDED_TARGET} == "arm" 22EMBEDDED= 1 23.endif 24 |
|
21# snapshot 22.if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" 23SNAPSHOT= 1 24TLD?= ${FTPDIR}/snapshots | 25# snapshot 26.if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" 27SNAPSHOT= 1 28TLD?= ${FTPDIR}/snapshots |
25BUILDDATE!= cd ${.CURDIR} && date -j -f '%s' $$(stat -f "%c" ${.OBJDIR}/dist/base/bin/sh) +%Y%m%d 26_SNAP_SUFFIX:= -${BUILDDATE} | |
27. for _D in /usr/bin /usr/local/bin 28. for _S in svnversion svnliteversion 29. if exists(${_D}/${_S}) 30SVNVERSION?= ${_D}/${_S} 31. endif 32. endfor 33. endfor | 29. for _D in /usr/bin /usr/local/bin 30. for _S in svnversion svnliteversion 31. if exists(${_D}/${_S}) 32SVNVERSION?= ${_D}/${_S} 33. endif 34. endfor 35. endfor |
36. if exists(${.CURDIR}/${.OBJDIR}/dist/base/bin/sh) 37BUILDDATE!= cd ${.CURDIR} && date -j -f '%s' $$(stat -f "%c" ${.OBJDIR}/dist/base/bin/sh) +%Y%m%d 38. else 39BUILDDATE!= date +%Y%m%d 40. endif |
|
34. if exists(${SVNVERSION}) && !empty(SVNVERSION) 35SVNREVISION!= ${SVNVERSION} ${WORLDDIR}/Makefile | 41. if exists(${SVNVERSION}) && !empty(SVNVERSION) 42SVNREVISION!= ${SVNVERSION} ${WORLDDIR}/Makefile |
36_SNAP_SUFFIX:= ${_SNAP_SUFFIX}-r${SVNREVISION} | 43_SNAP_SUFFIX:= -r${SVNREVISION}-${BUILDDATE} 44. else 45_SNAP_SUFFIX:= -${BUILDDATE} |
37. endif 38.else 39# release 40SNAPSHOT= 41TLD?= ${FTPDIR}/releases 42.endif 43 | 46. endif 47.else 48# release 49SNAPSHOT= 50TLD?= ${FTPDIR}/releases 51.endif 52 |
53.if defined(EMBEDDED) && !empty(EMBEDDED) 54. if ${TARGET} == "arm" && ${TARGET_ARCH} == "armv6" 55. if !defined(BOARDNAME) && empty(BOARDNAME) 56BOARDNAME:= ${KERNCONF} 57. else 58OLDNAME:= ${KERNCONF} 59. endif 60. if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" 61SNAPSHOT= 1 62. endif 63IMAGES:= ${BOARDNAME}.img 64. endif # arm/armv6 65.endif # embedded 66 |
|
44.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) 45STAGE_TARGETS+= vm-images-stage 46VM_DIR= ${TLD}/VM-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH} 47.endif 48 49CLEANFILES+= ${STAGE_TARGETS} 50CHECKSUM_FILES?= SHA256 MD5 51SNAP_SUFFIX!= echo ${_SNAP_SUFFIX:S,^-,,1} | tr -d ' ' --- 4 unchanged lines hidden (view full) --- 56 rm -rf ${FTPDIR} 57 58iso-images-stage: 59 mkdir -p ${ISO_DIR} 60 mkdir -p ${TLD}/ISO-IMAGES/${REVISION} 61.if exists(${RELEASEDIR}) 62 @# Assume we have images to copy. 63. for IMAGE in ${IMAGES} | 67.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) 68STAGE_TARGETS+= vm-images-stage 69VM_DIR= ${TLD}/VM-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH} 70.endif 71 72CLEANFILES+= ${STAGE_TARGETS} 73CHECKSUM_FILES?= SHA256 MD5 74SNAP_SUFFIX!= echo ${_SNAP_SUFFIX:S,^-,,1} | tr -d ' ' --- 4 unchanged lines hidden (view full) --- 79 rm -rf ${FTPDIR} 80 81iso-images-stage: 82 mkdir -p ${ISO_DIR} 83 mkdir -p ${TLD}/ISO-IMAGES/${REVISION} 84.if exists(${RELEASEDIR}) 85 @# Assume we have images to copy. 86. for IMAGE in ${IMAGES} |
87 @# arm/armv6 IMX6 -> WANDBOARD, for example. 88. if defined(OLDNAME) && !empty(OLDNAME) 89 cd ${RELEASEDIR} && mv ${OSRELEASE}-${IMAGE:S,${BOARDNAME},${OLDNAME},}.xz \ 90 ${OSRELEASE}-${IMAGE}.xz 91. endif 92. if exists(${RELEASEDIR}/${OSRELEASE}-${IMAGE}) |
|
64 cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE} \ 65 ${ISO_DIR}/${OSRELEASE}-${IMAGE} | 93 cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE} \ 94 ${ISO_DIR}/${OSRELEASE}-${IMAGE} |
95. endif 96. if exists(${RELEASEDIR}/${OSRELEASE}-${IMAGE}.xz) |
|
66 cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE}.xz \ 67 ${ISO_DIR}/${OSRELEASE}-${IMAGE}.xz | 97 cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE}.xz \ 98 ${ISO_DIR}/${OSRELEASE}-${IMAGE}.xz |
99. endif |
|
68. if exists(${RELEASEDIR}/CHECKSUM.${CHECKSUM}) 69 cp -p ${RELEASEDIR}/CHECKSUM.${CHECKSUM} \ 70 ${ISO_DIR}/CHECKSUM.${CHECKSUM} 71. endif 72. endfor 73.endif 74 75.if defined(SNAPSHOT) && !empty(SNAPSHOT) 76. for IMAGE in ${IMAGES} 77 cd ${ISO_DIR} && mv ${OSRELEASE}-${IMAGE} \ | 100. if exists(${RELEASEDIR}/CHECKSUM.${CHECKSUM}) 101 cp -p ${RELEASEDIR}/CHECKSUM.${CHECKSUM} \ 102 ${ISO_DIR}/CHECKSUM.${CHECKSUM} 103. endif 104. endfor 105.endif 106 107.if defined(SNAPSHOT) && !empty(SNAPSHOT) 108. for IMAGE in ${IMAGES} 109 cd ${ISO_DIR} && mv ${OSRELEASE}-${IMAGE} \ |
78 ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} | 110 ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} || true |
79 cd ${ISO_DIR} && mv ${OSRELEASE}-${IMAGE}.xz \ | 111 cd ${ISO_DIR} && mv ${OSRELEASE}-${IMAGE}.xz \ |
80 ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz | 112 ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz || true |
81 cd ${TLD}/ISO-IMAGES/${REVISION} && \ 82 ln -s \ | 113 cd ${TLD}/ISO-IMAGES/${REVISION} && \ 114 ln -s \ |
83 ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} | 115 ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} || true |
84 cd ${TLD}/ISO-IMAGES/${REVISION} && \ 85 ln -s \ | 116 cd ${TLD}/ISO-IMAGES/${REVISION} && \ 117 ln -s \ |
86 ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz | 118 ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE}.xz || true 119 cd ${TLD} && find -L . -type l | xargs rm |
87. endfor 88. for CHECKSUM in ${CHECKSUM_FILES} 89. if exists(${ISO_DIR}/CHECKSUM.${CHECKSUM}) 90 rm -f ${ISO_DIR}/CHECKSUM.${CHECKSUM} 91. endif | 120. endfor 121. for CHECKSUM in ${CHECKSUM_FILES} 122. if exists(${ISO_DIR}/CHECKSUM.${CHECKSUM}) 123 rm -f ${ISO_DIR}/CHECKSUM.${CHECKSUM} 124. endif |
125. if defined(EMBEDDED) && !empty(EMBEDDED) |
|
92 cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ | 126 cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ |
127 CHECKSUM.${CHECKSUM}-${OSRELEASE}-${BOARDNAME}-${SNAP_SUFFIX} 128 cd ${TLD}/ISO-IMAGES/${REVISION} && \ 129 ln -s \ 130 ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/CHECKSUM.${CHECKSUM}-${OSRELEASE}-${BOARDNAME}-${SNAP_SUFFIX} 131. else 132 cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ |
|
93 CHECKSUM.${CHECKSUM}-${OSRELEASE}-${SNAP_SUFFIX} 94 cd ${TLD}/ISO-IMAGES/${REVISION} && \ 95 ln -s \ 96 ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/CHECKSUM.${CHECKSUM}-${OSRELEASE}-${SNAP_SUFFIX} | 133 CHECKSUM.${CHECKSUM}-${OSRELEASE}-${SNAP_SUFFIX} 134 cd ${TLD}/ISO-IMAGES/${REVISION} && \ 135 ln -s \ 136 ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/CHECKSUM.${CHECKSUM}-${OSRELEASE}-${SNAP_SUFFIX} |
137. endif |
|
97. endfor 98.else # !snapshot 99 cd ${TLD}/ISO-IMAGES/${REVISION} && ln -s \ | 138. endfor 139.else # !snapshot 140 cd ${TLD}/ISO-IMAGES/${REVISION} && ln -s \ |
100 ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE} | 141 ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE} || true |
101 cd ${TLD}/ISO-IMAGES/${REVISION} && ln -s \ | 142 cd ${TLD}/ISO-IMAGES/${REVISION} && ln -s \ |
102 ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE}.xz | 143 ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE}.xz || true |
103 cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ 104 CHECKSUM.${CHECKSUM}-${OSRELEASE} 105.endif 106.if exists(${RELEASEDIR}/ftp) 107 mkdir -p ${FTP_DIR} 108 cp ${RELEASEDIR}/ftp/*.txz ${RELEASEDIR}/ftp/MANIFEST ${FTP_DIR} 109 cd ${TLD}/${TARGET} && \ 110 ln -s ${TARGET_ARCH}/${REVISION}-${BRANCH} \ --- 37 unchanged lines hidden --- | 144 cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ 145 CHECKSUM.${CHECKSUM}-${OSRELEASE} 146.endif 147.if exists(${RELEASEDIR}/ftp) 148 mkdir -p ${FTP_DIR} 149 cp ${RELEASEDIR}/ftp/*.txz ${RELEASEDIR}/ftp/MANIFEST ${FTP_DIR} 150 cd ${TLD}/${TARGET} && \ 151 ln -s ${TARGET_ARCH}/${REVISION}-${BRANCH} \ --- 37 unchanged lines hidden --- |