summaryrefslogtreecommitdiffstats
path: root/release/Makefile
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2014-04-08 00:53:31 +0000
committergjb <gjb@FreeBSD.org>2014-04-08 00:53:31 +0000
commit6f50d7f0911bd0d0ad08c5683f442fe5134b4978 (patch)
treee8f39f9c05e6d3e8f4986838687525f0266bb3ef /release/Makefile
parentd32682111b73a8795016f1dd6d34ceb40cc6afe2 (diff)
downloadFreeBSD-src-6f50d7f0911bd0d0ad08c5683f442fe5134b4978.zip
FreeBSD-src-6f50d7f0911bd0d0ad08c5683f442fe5134b4978.tar.gz
MFC r264027, r264028, r264029, r264030, r264046, r264073:
r264027: Add a new release build variable, WITH_COMPRESSED_IMAGES. When set to a non-empty value, the installation medium is compressed as part of the 'install' target in the release/ directory. r264028: Clean up trailing whitespace in release/Makefile. r264029: Fix logic error. r264030: If WITH_COMPRESSED_IMAGES is set, add the compressed images to the CLEANFILES list. r264046: Use xz(1) instead of gzip(1) to compress release images when WITH_COMPRESSED_IMAGES is used. r264073: Allow overriding xz(1) path. Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'release/Makefile')
-rw-r--r--release/Makefile19
1 files changed, 15 insertions, 4 deletions
diff --git a/release/Makefile b/release/Makefile
index b3c1191..c0f5506 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
#
# Makefile for building releases and release media.
-#
+#
# User-driven targets:
# cdrom: Builds release CD-ROM media (disc1.iso)
# dvdrom: Builds release DVD-ROM media (dvd1.iso)
@@ -13,7 +13,7 @@
#
# Variables affecting the build process:
# WORLDDIR: location of src tree -- must have built world and default kernel
-# (by default, the directory above this one)
+# (by default, the directory above this one)
# PORTSDIR: location of ports tree to distribute (default: /usr/ports)
# DOCDIR: location of doc tree (default: /usr/doc)
# NOPKG: if set, do not distribute third-party packages
@@ -21,13 +21,16 @@
# NOSRC: if set, do not distribute source tree
# NODOC: if set, do not generate release documentation
# WITH_DVD: if set, generate dvd1.iso
-# TARGET/TARGET_ARCH: architecture of built release
+# WITH_COMPRESSED_IMAGES: if set, compress installation images with xz(1)
+# (uncompressed images are not removed)
+# TARGET/TARGET_ARCH: architecture of built release
#
WORLDDIR?= ${.CURDIR}/..
PORTSDIR?= /usr/ports
DOCDIR?= /usr/doc
RELNOTES_LANG?= en_US.ISO8859-1
+XZCMD?= /usr/bin/xz
.if !defined(TARGET) || empty(TARGET)
TARGET= ${MACHINE}
@@ -63,7 +66,7 @@ NODOC= true
NOPORTS= true
.endif
-EXTRA_PACKAGES=
+EXTRA_PACKAGES=
.if !defined(NOPORTS)
EXTRA_PACKAGES+= ports.txz
.endif
@@ -92,6 +95,11 @@ IMAGES+= mini-memstick.img
.endif
CLEANFILES= packagesystem *.txz MANIFEST system ${IMAGES}
+.if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES)
+. for I in ${IMAGES}
+CLEANFILES+= ${I}.xz
+. endfor
+.endif
CLEANDIRS= dist ftp release bootonly dvd
beforeclean:
chflags -R noschg .
@@ -251,6 +259,9 @@ install:
cp -a ftp ${DESTDIR}/
.for I in ${IMAGES}
cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I}
+. if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES)
+ ${XZCMD} -k ${DESTDIR}/${OSRELEASE}-${I}
+. endif
.endfor
cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256
cd ${DESTDIR} && md5 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.MD5
OpenPOWER on IntegriCloud