Release Engineering: nrelease and GUI build adjustments
[dragonfly.git] / nrelease / Makefile
CommitLineData
bfe20b28 1# $DragonFly: src/nrelease/Makefile,v 1.90 2008/09/01 21:20:30 swildner Exp $
6ca9a59c 2#
5b22b655 3
9b29c40a
MD
4#########################################################################
5# ENHANCEMENTS #
6#########################################################################
7
f4ec1279 8# New method e.g. 'make gui release'. A series of enhancement
9b29c40a
MD
9# targes may be specified which set make variables which enhance
10# the build in various ways.
11#
b9c3e754 12gui installer img:
9b29c40a 13
9b29c40a
MD
14#########################################################################
15# SETUP #
16#########################################################################
17
6ca9a59c 18ISODIR ?= /usr/release
5ec00f8a 19ISOROOT ?= ${ISODIR}/root
6ca9a59c 20OBJSYS= ${.OBJDIR}/../sys
bfe20b28
SW
21
22.if make(gui)
23KERNCONF ?= DFLYLIVE VKERNEL DFLYLIVE-SMP DFLYLIVE-SMP-NOAPIC
24.else
1d3eb8c5 25KERNCONF ?= GENERIC VKERNEL
bfe20b28 26.endif
6ca9a59c 27
cc224c64 28PKGSRC_PREFIX?= /usr/pkg
bce110a5 29PKGBIN_PKG_ADD?= ${PKGSRC_PREFIX}/sbin/pkg_add
95b64753 30PKGBIN_PKG_DELETE?= ${PKGSRC_PREFIX}/sbin/pkg_delete
c791834f 31PKGBIN_PKG_ADMIN?= ${PKGSRC_PREFIX}/sbin/pkg_admin
bce110a5
MD
32PKGBIN_MKISOFS?= ${PKGSRC_PREFIX}/bin/mkisofs
33PKGSRC_PKG_PATH?= ${ISODIR}/packages
34PKGSRC_DB?= /var/db/pkg
18b332b2 35PKGSRC_BOOTSTRAP_URL?= http://pkgbox.dragonflybsd.org/DragonFly-pkgsrc-packages/i386/1.12.0-RELEASE-BUILD
4b08f3df 36CVSUP_BOOTSTRAP_KIT?= cvsup-bootstrap-20070716
bce110a5 37
cc55a235
SS
38# We use env -i in the chroot, so that environment variables won't
39# disturb any (pkgsrc) build. This has happened for TARGET_ARCH,
40# which is used by gmake in completely different context.
41CHROOT_CMD?= env -i CCVER=${CCVER:Q} /usr/sbin/chroot ${ISOROOT} sh -c
42
8abe78a1 43# User may specify extra packages in addition to the defaults
95b64753 44#
8abe78a1
MD
45PKGSRC_EXTRA_PACKAGES?=
46
47# Pkgsrc packages to be built and installed on the release ISO
48#
49PKGSRC_PACKAGES?= pkgtools/pkg_leaves \
50 pkgtools/pkg_tarup \
51 devel/scmgit \
fbc26094
SW
52 net/isc-dhcp4 \
53 net/isc-dhcpd4 \
8abe78a1
MD
54 sysutils/cdrtools \
55 ${PKGSRC_EXTRA_PACKAGES}
fbc26094
SW
56
57# pkgsrc options to use when building packages
58#
59.if !make(gui)
60PKGSRC_OPTIONS?= PKG_OPTIONS.scmgit=-scmgit-gui
61.endif
8188de86 62
95b64753
MD
63# Even though buildiso wipes the packages, our check target has to run
64# first and old packages (listed as they appear in pkg_info) must be
65# cleaned out in order for the pkg_add -n test we use in the check target
66# to operate properly.
67#
fbc26094
SW
68OLD_PKGSRC_PACKAGES?= cdrtools-2.01.01.27nb1 \
69 cdrecord-2.00.3nb2 \
70 bootstrap-kit-20070205 \
71 dfuibe_installer-1.1.6 \
72 gettext-lib-0.14.5 \
73 dfuibe_installer-1.1.7nb1 \
74 dfuife_curses-1.5 \
75 gettext-lib-0.14.6 \
76 gettext-tools-0.14.6nb1 \
77 libaura-3.1 \
78 libdfui-4.2 \
79 libinstaller-5.1 \
80 bootstrap-kit-20080211 \
81 cdrtools-ossdvd-2.01.1.36nb2 \
82 isc-dhcp-base-4.0.0 \
83 isc-dhcp-server-4.0.0
95b64753 84
8188de86
MD
85# Specify which root skeletons are required, and let the user include
86# their own. They are copied into ISODIR during the `pkgcustomizeiso'
87# target; each overwrites the last.
88#
fbc26094
SW
89REQ_ROOTSKELS= ${.CURDIR}/root \
90 ${.CURDIR}/installer
cc224c64
JS
91ROOTSKELS?= ${REQ_ROOTSKELS}
92
fbc26094 93.if make(gui)
3f279b9e 94ISOFILE?= ${ISODIR}/dfly-gui.iso
b9c3e754 95IMGFILE?= ${ISODIR}/dfly-gui.img
0936984e
MD
96PKGSRC_PACKAGES+= meta-pkgs/modular-xorg-apps \
97 meta-pkgs/modular-xorg-drivers \
98 meta-pkgs/modular-xorg-fonts \
99 meta-pkgs/modular-xorg-libs \
fbc26094 100 wm/fluxbox \
0936984e 101 wm/fvwm \
fbc26094
SW
102 www/firefox3 \
103 print/xpdf \
104 shells/zsh \
105 editors/emacs \
106 editors/vim \
107 chat/pidgin \
108 chat/irssi \
109 chat/xchat \
0936984e 110 x11/modular-xorg-server \
fbc26094
SW
111 x11/rxvt-unicode \
112 x11/eterm \
113 lang/perl5 \
114 editors/nano \
115 shells/bash \
116 devel/exctags \
117 archivers/zip \
118 security/sudo \
119 www/links-gui \
120 net/nmap \
121 net/wget \
122 fonts/terminus-font \
123 net/rsync \
124 sysutils/idesk \
0936984e 125 time/asclock \
fbc26094 126 misc/screen
3f279b9e
SW
127ROOTSKELS+= ${.CURDIR}/gui
128.endif
129
3f279b9e 130ISOFILE ?= ${ISODIR}/dfly.iso
b9c3e754
MN
131IMGFILE ?= ${ISODIR}/dfly.img
132
60b68cbb 133IMGMNT ?= ${ISODIR}/mnt
b9c3e754 134IMGUSBDEV ?= /dev/da0
3f279b9e 135
5b22b655
MD
136# note: we use the '${NRLOBJDIR}/nrelease' construct, that is we add
137# the additional '/nrelease' manually, as a safety measure.
138#
139NRLOBJDIR?= /usr/obj
140
8188de86
MD
141#########################################################################
142# BASE ISO TARGETS #
143#########################################################################
144
7ebbae99 145release: check clean buildworld1 buildkernel1 \
0936984e
MD
146 buildiso syssrcs customizeiso mkaliases mklocatedb \
147 mkiso mkimg
8188de86 148
7ebbae99 149quickrel: check clean buildworld2 buildkernel2 \
0936984e
MD
150 buildiso syssrcs customizeiso mkaliases mklocatedb \
151 mkiso mkimg
2e3f8f38 152
0936984e
MD
153realquickrel: check clean buildiso syssrcs customizeiso \
154 mkaliases mklocatedb \
155 mkiso mkimg
6ca9a59c 156
5af45f85
MD
157restartpkgs: check customizeiso mkaliases mklocatedb mkiso mkimg
158
9b29c40a
MD
159quick: quickrel
160
161realquick: realquickrel
162
5af45f85 163
9b29c40a
MD
164#########################################################################
165# CORE SUPPORT TARGETS #
166#########################################################################
167
d2582113 168check:
0936984e
MD
169.if !exists(${PKGBIN_PKG_ADMIN})
170 @echo "You never bootstrapped pkgsrc on your machine. You can install it with:"
171 @echo " make pkgsrc_bootstrap"
172.endif
0a1628e7
MD
173.if !exists(${PKGSRC_PKG_PATH}/${CVSUP_BOOTSTRAP_KIT}.tgz)
174 @echo "The cvsup bootstrap kit is not installed. You can install it with:"
f4ec1279 175 @echo " make fetch"
0936984e
MD
176.endif
177.if !exists (${PKGBIN_MKISOFS})
178 @echo
179 @echo "Your machine does not have cdrtools installed. You can install it with:"
180 @echo " make pkgsrc_cdrecord"
0a1628e7 181.endif
fbc26094
SW
182.if !defined(PKGSRC_PATH)
183 @echo "Please set PKGSRC_PATH to the pkgsrc tree that shall be used for"
5af45f85
MD
184 @echo "package building. For example /usr/pkgsrc. See the Makefile"
185 @echo "in /usr if you are unfamiliar with pkgsrc."
0936984e
MD
186.endif
187.if !exists(${PKGSRC_PKG_PATH}/${CVSUP_BOOTSTRAP_KIT}.tgz)
188 @exit 1
189.endif
190.if !exists (${PKGBIN_MKISOFS})
191 @exit 1
192.endif
193.if !defined(PKGSRC_PATH)
fbc26094
SW
194 @exit 1
195.endif
2e3f8f38 196
588a679c 197buildworld1 buildworld2:
f4ec1279 198 cd ${.CURDIR}/..; ${WORLD_CCVER:C/^..*$/WORLD_CCVER=/}${WORLD_CCVER} make -DWANT_INSTALLER ${.TARGET:C/build(.*)2/quick\1/:C/1//}
6ca9a59c 199
588a679c 200buildkernel1 buildkernel2:
bfe20b28
SW
201.if make(gui)
202 cd ${.CURDIR}/..; \
203 for kernconf in ${KERNCONF}; do \
448b21e7 204 ${WORLD_CCVER:C/^..*$/WORLD_CCVER=/}${WORLD_CCVER} \
82f56cac 205 make ${.TARGET:C/build(.*)2/quick\1/:C/1//} \
bfe20b28
SW
206 KERNCONF=$${kernconf} KERNCONFDIR=${.CURDIR}/gui/root; \
207 done
208.else
588a679c
SS
209 cd ${.CURDIR}/..; \
210 first=; \
211 for kernconf in ${KERNCONF}; do \
448b21e7 212 ${WORLD_CCVER:C/^..*$/WORLD_CCVER=/}${WORLD_CCVER} \
82f56cac 213 make ${.TARGET:C/build(.*)2/quick\1/:C/1//} \
588a679c
SS
214 KERNCONF=$${kernconf} \
215 $${first:+-DNO_MODULES}; \
216 first=done; \
217 done
bfe20b28 218.endif
6ca9a59c 219
5b22b655
MD
220# note that we do not want to mess with any /usr/obj directories not related
221# to buildworld, buildkernel, or nrelease, so we must supply the proper
222# MAKEOBJDIRPREFIX for targets that are not run through the buildworld and
223# buildkernel mechanism.
224#
6ca9a59c
MD
225buildiso:
226 if [ ! -d ${ISOROOT} ]; then mkdir -p ${ISOROOT}; fi
5b22b655 227 if [ ! -d ${NRLOBJDIR}/nrelease ]; then mkdir -p ${NRLOBJDIR}/nrelease; fi
f4ec1279 228 ( cd ${.CURDIR}/..; make -DWANT_INSTALLER DESTDIR=${ISOROOT} installworld )
ab64cf06
SS
229 ( cd ${.CURDIR}/../etc; MAKEOBJDIRPREFIX=${NRLOBJDIR}/nrelease \
230 make -m ${.CURDIR}/../share/mk DESTDIR=${ISOROOT} distribution )
21aa02d0 231 cpdup ${ISOROOT}/etc ${ISOROOT}/etc.hdd
bfe20b28 232.if make(gui)
fbc26094 233 if [ ! -d ${ISOROOT}/kernel.smp/boot ]; then mkdir -p ${ISOROOT}/kernel.smp/boot; fi
bfe20b28
SW
234 cd ${.CURDIR}/..; \
235 make installkernel DESTDIR=${ISOROOT} \
236 KERNCONF=DFLYLIVE DESTKERNNAME=kernel KERNCONFDIR=${.CURDIR}/gui/root; \
237 cd ${.CURDIR}/..; \
238 make installkernel DESTDIR=${ISOROOT} \
239 KERNCONF=VKERNEL DESTKERNNAME=kernel.VKERNEL -DNO_MODULES KERNCONFDIR=${.CURDIR}/gui/root; \
240 cd ${.CURDIR}/..; \
241 make installkernel DESTDIR=${ISOROOT}/kernel.smp \
242 KERNCONF=DFLYLIVE-SMP DESTKERNNAME=kernel KERNCONFDIR=${.CURDIR}/gui/root; \
243 cd ${.CURDIR}/..; \
244 make installkernel DESTDIR=${ISOROOT}/kernel.smp \
245 KERNCONF=DFLYLIVE-SMP-NOAPIC DESTKERNNAME=kernel.noapic \
246 KERNCONFDIR=${.CURDIR}/gui/root -DNO_MODULES;
247.else
588a679c
SS
248 cd ${.CURDIR}/..; \
249 first=; \
250 for kernconf in ${KERNCONF}; do \
251 make DESTDIR=${ISOROOT} \
252 installkernel KERNCONF=$${kernconf} \
253 $${first:+DESTKERNNAME=kernel.$${kernconf}} \
254 $${first:+-DNO_MODULES}; \
255 first=done; \
256 done
bfe20b28 257.endif
c5c5e6fc 258 ln -s kernel ${ISOROOT}/kernel.BOOTP
6ca9a59c
MD
259 mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.local.dist -p ${ISOROOT}/usr/local/
260 mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.var.dist -p ${ISOROOT}/var
261 dev_mkdb -f ${ISOROOT}/var/run/dev.db ${ISOROOT}/dev
8188de86 262
19d86faa
MD
263# Include kernel sources on the release CD (~14MB)
264#
265syssrcs:
66b79064 266.if !defined(WITHOUT_SRCS)
ccbff5d3 267 ( cd ${.CURDIR}/../..; tar -cf - src/Makefile src/Makefile.inc1 src/sys | bzip2 -9 > ${ISOROOT}/usr/src-sys.tar.bz2 )
66b79064 268.endif
19d86faa 269
5af45f85
MD
270# Customize the ISO by copying rootskels in reverse priority order,
271# building packages, and doing other post-install tasks.
272#
8188de86 273customizeiso:
5af45f85
MD
274 # Copy the rootskels. Allow sources to be owned by someone other
275 # then root (as is common when checked out via git).
276 #
8188de86
MD
277.for ROOTSKEL in ${ROOTSKELS}
278 cpdup -X cpignore -o ${ROOTSKEL} ${ISOROOT}
5af45f85
MD
279 @test -O ${.CURDIR} || echo "chowning copied files to root:wheel"
280 @test -O ${.CURDIR} || ((cd ${ROOTSKEL} && find .) | fgrep -v cpignore | (cd ${ISOROOT} && xargs chown root:wheel))
8188de86 281.endfor
fbc26094 282 (cd ${PKGSRC_PKG_PATH}; tar xzpf ${CVSUP_BOOTSTRAP_KIT}.tgz)
0a1628e7 283 cp -p ${PKGSRC_PKG_PATH}/${CVSUP_BOOTSTRAP_KIT}/usr/local/bin/cvsup ${ISOROOT}/usr/local/bin/cvsup
c751e497 284 cp -p ${PKGSRC_PKG_PATH}/${CVSUP_BOOTSTRAP_KIT}/usr/local/man/man1/cvsup.1 ${ISOROOT}/usr/local/man/man1/cvsup.1
7249926b 285 pwd_mkdb -p -d ${ISOROOT}/etc ${ISOROOT}/etc/master.passwd
4fba3387
CP
286.for UPGRADE_ITEM in Makefile \
287 etc.${MACHINE_ARCH} \
288 isdn/Makefile \
289 rc.d/Makefile \
290 periodic/Makefile \
291 periodic/daily/Makefile \
292 periodic/security/Makefile \
293 periodic/weekly/Makefile \
294 periodic/monthly/Makefile
295 cp -R ${.CURDIR}/../etc/${UPGRADE_ITEM} ${ISOROOT}/etc/${UPGRADE_ITEM}
296.endfor
8abe78a1
MD
297 #
298 # Setup some things & mount pkgsrc tree. Use defensive umounts and
299 # rm -rf's to allow restarts. Allow /usr/pkgsrc to be read-only.
300 #
301 # If we did not get past the bootstrap we clean out the entire
302 # /usr/pkg infrastructure. Otherwise we attempt to pick up where
303 # we left off.
304 #
fbc26094 305 cp -p /etc/resolv.conf ${ISOROOT}/etc
cc55a235 306 ${CHROOT_CMD} "ldconfig -elf /usr/lib /usr/lib/gcc* /usr/lib/compat"
8abe78a1
MD
307 -@umount ${ISOROOT}/usr/pkgsrc/distfiles
308 -@umount ${ISOROOT}/usr/pkgsrc
309 mkdir -p ${ISODIR}/distfiles
310 rm -rf ${ISOROOT}/usr/pkgobj
311 test -e ${ISODIR}/.didbootstrap || \
312 rm -rf ${ISOROOT}/usr/pkg ${ISOROOT}/var/db/pkg \
313 ${ISOROOT}/var/db/pkg.refcount
314 #
315 # Mount /usr/pkgsrc, make sure /usr/pkgsrc/distfiles is writable
316 #
317 mkdir -p ${ISOROOT}/usr/pkgobj
589a5738 318 mkdir -p ${ISOROOT}/usr/pkgobj/bootstrap/work
8abe78a1 319 mkdir -p ${ISOROOT}/usr/pkgsrc
fbc26094 320 mount_null ${PKGSRC_PATH} ${ISOROOT}/usr/pkgsrc
5af45f85
MD
321 cp /etc/shells ${ISOROOT}/usr/pkgsrc/distfiles/.test > /dev/null 2>&1 \
322 || mount_null ${ISODIR}/distfiles ${ISOROOT}/usr/pkgsrc/distfiles
8abe78a1 323 #
5af45f85 324 # Bootstrap, if not already installed, and add licenses needed
ee3561ee 325 # for the gui release
8abe78a1 326 #
ee3561ee
MD
327.if !exists (${ISODIR}/.didbootstrap)
328 ${CHROOT_CMD} "cd /usr/pkgsrc/bootstrap; \
8abe78a1 329 ./bootstrap --workdir /usr/pkgobj/bootstrap/work"
ee3561ee
MD
330 echo ".ifdef BSD_PKG_MK # added by nrelease" \
331 >> ${ISOROOT}/usr/pkg/etc/mk.conf
332 echo "ACCEPTABLE_LICENSES+=openmotif-license" \
333 >> ${ISOROOT}/usr/pkg/etc/mk.conf
334 echo "ACCEPTABLE_LICENSES+=vim-license" \
335 >> ${ISOROOT}/usr/pkg/etc/mk.conf
336 echo ".endif # added by nrelease" \
337 >> ${ISOROOT}/usr/pkg/etc/mk.conf
8abe78a1
MD
338 sync
339 touch ${ISODIR}/.didbootstrap
ee3561ee 340.endif
8abe78a1
MD
341 #
342 # Build and install packages, skip packages already installed
343 #
bce110a5 344.for PKG in ${PKGSRC_PACKAGES}
8abe78a1
MD
345 ${CHROOT_CMD} "cd /usr/pkgsrc/${PKG} && \
346 (bmake WRKOBJDIR=/usr/pkgobj check > /dev/null 2>&1 || \
347 bmake WRKOBJDIR=/usr/pkgobj ${PKGSRC_OPTIONS} clean build install)"
8188de86 348.endfor
8abe78a1
MD
349 #
350 # Remove packages which nothing depends on and clean up
351 #
cc55a235 352 ${CHROOT_CMD} "pkg_leaves | xargs pkg_delete -R"
8abe78a1 353 -umount ${ISOROOT}/usr/pkgsrc/distfiles
fbc26094
SW
354 umount ${ISOROOT}/usr/pkgsrc
355 rmdir ${ISOROOT}/usr/pkgsrc
589a5738 356 rm -rf ${ISOROOT}/usr/pkgobj
fbc26094 357 rm -f ${ISOROOT}/etc/resolv.conf
3652f053
SW
358 makewhatis ${ISOROOT}/usr/local/man
359 makewhatis ${ISOROOT}/usr/pkg/man
6ca9a59c 360
0936984e
MD
361# So a CD boot does not complain about a missing aliases database
362#
363mkaliases:
364 ${CHROOT_CMD} "newaliases"
365
366# So locate works
367#
8398ca17
SW
368mklocatedb:
369 ( find -s ${ISOROOT} -path ${ISOROOT}/tmp -or \
370 -path ${ISOROOT}/usr/tmp -or -path ${ISOROOT}/var/tmp \
371 -prune -o -print | sed -e 's#^${ISOROOT}##g' | \
372 /usr/libexec/locate.mklocatedb \
373 -presort >${ISOROOT}/var/db/locate.database )
374
6ca9a59c 375mkiso:
bce110a5 376 ( cd ${ISOROOT}; ${PKGBIN_MKISOFS} -b boot/cdboot -no-emul-boot \
74ec6a9d
SW
377 -R -J -o ${ISOFILE} \
378 -V DragonFly-`${.CURDIR}/../tools/gitrev.sh | cut -c -22` . )
6ca9a59c 379
b9c3e754
MN
380
381mkimg:
fbc26094 382.if make(img)
60b68cbb
MN
383 if [ ! -d ${IMGMNT} ]; then mkdir -p ${IMGMNT}; fi
384
385 echo "determine required image size" > /dev/null; \
386 sz=`du -ck ${ISOROOT} | tail -n 1 | cut -f 1`; \
e6b76e22
MN
387 echo "add 15% more space as required" > /dev/null; \
388 sz=`bc -e "(($${sz}) / 1024) * 1.15" -equit | cut -f1 -d.`; \
60b68cbb
MN
389 dd if=/dev/zero of=${IMGFILE} bs=1m count=$${sz}; \
390 fdisk -IB -p ${IMGFILE}; \
391 echo "determine free vn device" > /dev/null; \
392 vn=`vnconfig -l | grep "not in use" | head -n 1 | cut -f 1 -d:`; \
393 vnconfig -e -s labels $${vn} ${IMGFILE}; \
394 echo "write standard disklabel" > /dev/null; \
395 disklabel -w -r $${vn}s1 auto; \
396 echo "read disklabel back" > /dev/null; \
397 disklabel -r $${vn}s1 > ${IMGFILE}.label; \
398 echo "determine number of sectors of whole disk" > /dev/null; \
399 secs=`tail -n 1 ${IMGFILE}.label | cut -f 3 -w`; \
400 echo "and add a: partition" > /dev/null; \
401 echo " a: $${secs} 0 4.2BSD" >> ${IMGFILE}.label; \
402 echo "write modified disklabel back" > /dev/null; \
403 disklabel -R -r $${vn}s1 ${IMGFILE}.label; \
404 rm ${IMGFILE}.label; \
405 echo "write bootsector" > /dev/null; \
406 disklabel -B $${vn}s1; \
407 newfs /dev/$${vn}s1a; \
408 mount /dev/$${vn}s1a ${IMGMNT}; \
409 cpdup -vvv ${ISOROOT} ${IMGMNT}; \
410 echo "fix /etc/fstab" > /dev/null; \
b72c2692
MN
411 echo "${IMGUSBDEV}s1a / ufs rw 0 0" > ${IMGMNT}/etc/fstab; \
412 echo "proc /proc procfs rw 0 0" >> ${IMGMNT}/etc/fstab; \
bccaed73 413 df ${IMGMNT}; \
60b68cbb
MN
414 umount ${IMGMNT}; \
415 vnconfig -u $${vn}; \
416 rmdir ${IMGMNT}
b9c3e754
MN
417.endif
418
6ca9a59c 419clean:
8abe78a1 420 -umount ${ISOROOT}/usr/pkgsrc/distfiles
fbc26094 421 -umount ${ISOROOT}/usr/pkgsrc
6ca9a59c 422 if [ -d ${ISOROOT} ]; then chflags -R noschg ${ISOROOT}; fi
8188de86 423 if [ -d ${ISOROOT} ]; then rm -rf ${ISOROOT}/*; fi
5b22b655 424 if [ -d ${NRLOBJDIR}/nrelease ]; then rm -rf ${NRLOBJDIR}/nrelease; fi
8abe78a1 425 rm -f ${ISODIR}/.didbootstrap
6ca9a59c
MD
426
427realclean: clean
3ebedc5e 428 rm -rf ${OBJSYS}/${KERNCONF}
8abe78a1 429 #
bce110a5
MD
430 # do not use PKGSRC_PKG_PATH here, we do not want to destroy an
431 # override location.
8abe78a1 432 #
bce110a5 433 if [ -d ${ISODIR}/packages ]; then rm -rf ${ISODIR}/packages; fi
6ca9a59c 434
cc224c64 435fetch:
9b29c40a 436 @if [ ! -d ${PKGSRC_PKG_PATH} ]; then mkdir -p ${PKGSRC_PKG_PATH}; fi
0a1628e7
MD
437.if !exists(${PKGSRC_PKG_PATH}/${CVSUP_BOOTSTRAP_KIT}.tgz)
438 (cd ${PKGSRC_PKG_PATH}; fetch ${PKGSRC_BOOTSTRAP_URL}/${CVSUP_BOOTSTRAP_KIT}.tgz)
439.endif
bce110a5
MD
440
441pkgsrc_bootstrap:
bce110a5 442.if !exists(${PKGSRC_PKG_PATH}/${PKGSRC_BOOTSTRAP_KIT}.tgz)
0936984e
MD
443 mkdir -p /usr/release/bootstrap
444 (cd ${PKGSRC_PATH}/bootstrap; ./bootstrap --workdir /usr/release/bootstrap)
bce110a5 445.endif
bce110a5 446
bce110a5
MD
447pkgsrc_cdrecord:
448.if !exists (${PKGBIN_MKISOFS})
0936984e 449 (cd ${PKGSRC_PATH}/sysutils/cdrtools; bmake clean build install)
bce110a5 450.endif
cc224c64 451
8abe78a1 452help:
5af45f85
MD
453 @echo "make [gui] release - complete build from scratch"
454 @echo "make [gui] quick - attempt to do an incremental rebuild"
455 @echo "make [gui] realquick - attempt to restart after world & kernel"
456 @echo "make [gui] restartpkgs - attempt to restart at the pkg building stage"
8abe78a1
MD
457 @echo ""
458 @echo "Extra packages may be specified with PKGSRC_EXTRA_PACKAGES"
588a679c 459
cc224c64 460.PHONY: all release installer_release quickrel installer_quickrel realquickrel
9b29c40a
MD
461.PHONY: installer_fetch installer
462.PHONY: quick realquick
cc224c64 463.PHONY: installer_realquickrel check buildworld1 buildworld2
b9c3e754 464.PHONY: buildkernel1 buildkernel2 buildiso customizeiso mklocatedb mkiso mkimg
0936984e 465.PHONY: clean realclean fetch help mkaliases
cc224c64 466
6ca9a59c 467.include <bsd.prog.mk>