1 # $DragonFly: src/nrelease/Makefile,v 1.90 2008/09/01 21:20:30 swildner Exp $
4 #########################################################################
6 #########################################################################
8 # These targets are now obsolete and should not be used
10 installer_release
: warning release
11 installer_quickrel
: warning quickrel
12 installer_realquickrel
: warning realquickrel
13 installer_fetch
: warning fetch
15 .if make
(installer_release
) || make
(installer_quickrel
) || make
(installer_realquickrel
) || make
(installer_fetch
)
19 # New method e.g. 'make installer fetch'. A series of enhancement
20 # targes may be specified which set make variables which enhance
21 # the build in various ways.
26 @echo
"WARNING: The installer_* targets are now obsolete, please"
27 @echo
"use 'make installer blah' instead of 'make installer_blah'"
29 @echo
"will continue in 10 seconds"
39 #########################################################################
41 #########################################################################
43 ISODIR ?
= /usr
/release
44 ISOROOT ?
= ${ISODIR}/root
45 OBJSYS
= ${.OBJDIR
}/..
/sys
48 KERNCONF ?
= DFLYLIVE VKERNEL DFLYLIVE-SMP DFLYLIVE-SMP-NOAPIC
50 KERNCONF ?
= GENERIC VKERNEL
53 PKGSRC_PREFIX?
= /usr
/pkg
54 PKGBIN_PKG_ADD?
= ${PKGSRC_PREFIX}/sbin
/pkg_add
55 PKGBIN_PKG_DELETE?
= ${PKGSRC_PREFIX}/sbin
/pkg_delete
56 PKGBIN_PKG_ADMIN?
= ${PKGSRC_PREFIX}/sbin
/pkg_admin
57 PKGBIN_MKISOFS?
= ${PKGSRC_PREFIX}/bin
/mkisofs
58 PKGSRC_PKG_PATH?
= ${ISODIR}/packages
59 PKGSRC_DB?
= /var
/db
/pkg
60 PKGSRC_BOOTSTRAP_URL?
= http
://pkgbox.dragonflybsd.org
/DragonFly-pkgsrc-packages
/i386
/1.12.0-RELEASE-BUILD
65 PKGSRC_BOOTSTRAP_KIT?
= bootstrap-kit-20080211
66 CVSUP_BOOTSTRAP_KIT?
= cvsup-bootstrap-20070716
68 # Default packages to be installed on the release ISO.
70 PKGSRC_PACKAGES?
= cdrtools-ossdvd-2.01
.1.36nb2.tgz \
71 isc-dhcp-base-4.0
.0.tgz isc-dhcp-server-4.0
.0.tgz
73 # Even though buildiso wipes the packages, our check target has to run
74 # first and old packages (listed as they appear in pkg_info) must be
75 # cleaned out in order for the pkg_add -n test we use in the check target
76 # to operate properly.
78 OLD_PKGSRC_PACKAGES?
= cdrtools-2.01
.01.27nb1 cdrecord-2.00
.3nb2 \
79 bootstrap-kit-20070205
81 # Specify which root skeletons are required, and let the user include
82 # their own. They are copied into ISODIR during the `pkgcustomizeiso'
83 # target; each overwrites the last.
85 REQ_ROOTSKELS
= ${.CURDIR
}/root
86 ROOTSKELS?
= ${REQ_ROOTSKELS}
88 .if defined
(WITH_INSTALLER
)
89 OLD_PKGSRC_PACKAGES
+= dfuibe_installer-1.1
.6 gettext-lib-0.14
.5 \
90 dfuibe_installer-1.1
.7nb1 dfuife_curses-1.5 \
91 gettext-lib-0.14
.6 gettext-tools-0.14
.6nb1 \
92 libaura-3.1 libdfui-4.2 libinstaller-5.1
93 ROOTSKELS
+= ${.CURDIR
}/installer
97 ISOFILE?
= ${ISODIR}/dfly-gui.iso
98 PKGSRC_PACKAGES
+= modular-xorg-apps \
99 modular-xorg-drivers \
126 ROOTSKELS
+= ${.CURDIR
}/gui
129 ISOFILE ?
= ${ISODIR}/dfly.iso
131 # note: we use the '${NRLOBJDIR}/nrelease' construct, that is we add
132 # the additional '/nrelease' manually, as a safety measure.
136 #########################################################################
138 #########################################################################
140 release
: check clean buildworld1 buildkernel1 \
141 buildiso syssrcs customizeiso mklocatedb mkiso
143 quickrel
: check clean buildworld2 buildkernel2 \
144 buildiso syssrcs customizeiso mklocatedb mkiso
146 realquickrel
: check clean buildiso syssrcs customizeiso mklocatedb mkiso
150 realquick
: realquickrel
152 #########################################################################
153 # CORE SUPPORT TARGETS #
154 #########################################################################
157 .if
!exists
(${PKGBIN_PKG_ADD})
158 @echo
"Unable to find ${PKGBIN_PKG_ADD}. You can use the following"
159 @echo
"command to bootstrap pkgsrc:"
160 @echo
" make pkgsrc_bootstrap"
163 .for PKG in
${OLD_PKGSRC_PACKAGES}
164 @
${ENVCMD} PKG_PATH
=${PKGSRC_PKG_PATH} ${PKGBIN_PKG_DELETE} -K
${ISOROOT}${PKGSRC_DB} ${PKG} > /dev
/null
2>&1 || exit
0
166 .for PKG in
${PKGSRC_PACKAGES}
167 @
${ENVCMD} PKG_PATH
=${PKGSRC_PKG_PATH} ${PKGBIN_PKG_ADD} -K
${ISOROOT}${PKGSRC_DB} -n
${PKG} > /dev
/null
2>&1 || \
168 (echo
"Unable to find ${PKG}, use the following command to fetch required packages:"; echo
" make [installer] fetch"; exit
1)
170 .if
!exists
(${PKGBIN_MKISOFS})
171 @echo
"mkisofs is not installed. It is part of the cdrecord package."
172 @echo
"You can install it with:"
173 @echo
" make pkgsrc_cdrecord"
176 .if
!exists
(${PKGSRC_PKG_PATH}/${PKGSRC_BOOTSTRAP_KIT}.tgz
)
177 @echo
"The pkgsrc bootstrap kit is not installed. You can install it with:"
178 @echo
" make [installer] fetch"
181 .if
!exists
(${PKGSRC_PKG_PATH}/${CVSUP_BOOTSTRAP_KIT}.tgz
)
182 @echo
"The cvsup bootstrap kit is not installed. You can install it with:"
183 @echo
" make [installer] fetch"
187 buildworld1 buildworld2
:
188 cd
${.CURDIR
}/..
; ${WORLD_CCVER
:C
/^..
*$/WORLD_CCVER
=/}${WORLD_CCVER} make
${WITH_INSTALLER
:C
/^
/-DWANT_INSTALLER
/} ${.TARGET
:C
/build
(.
*)2/quick\
1/:C
/1//}
190 buildkernel1 buildkernel2
:
193 for kernconf in
${KERNCONF}; do \
194 ${WORLD_CCVER
:C
/^..
*$/WORLD_CCVER
=/}${WORLD_CCVER} \
195 make
${.TARGET
:C
/build
(.
*)2/quick\
1/:C
/1//} \
196 KERNCONF
=$${kernconf} KERNCONFDIR
=${.CURDIR
}/gui
/root
; \
201 for kernconf in
${KERNCONF}; do \
202 ${WORLD_CCVER
:C
/^..
*$/WORLD_CCVER
=/}${WORLD_CCVER} \
203 make
${.TARGET
:C
/build
(.
*)2/quick\
1/:C
/1//} \
204 KERNCONF
=$${kernconf} \
205 $${first
:+-DNO_MODULES
}; \
210 # note that we do not want to mess with any /usr/obj directories not related
211 # to buildworld, buildkernel, or nrelease, so we must supply the proper
212 # MAKEOBJDIRPREFIX for targets that are not run through the buildworld and
213 # buildkernel mechanism.
216 if
[ ! -d
${ISOROOT} ]; then mkdir
-p
${ISOROOT}; fi
217 if
[ ! -d
${NRLOBJDIR}/nrelease
]; then mkdir
-p
${NRLOBJDIR}/nrelease
; fi
218 ( cd
${.CURDIR
}/..
; make
${WITH_INSTALLER
:C
/^
/-DWANT_INSTALLER
/} DESTDIR
=${ISOROOT} installworld
)
219 ( cd
${.CURDIR
}/..
/etc
; MAKEOBJDIRPREFIX
=${NRLOBJDIR}/nrelease \
220 make
-m
${.CURDIR
}/..
/share
/mk DESTDIR
=${ISOROOT} distribution
)
221 cpdup
${ISOROOT}/etc
${ISOROOT}/etc.hdd
223 if
[ ! -d
${ISOROOT}/kernel.smp
]; then mkdir
-p
${ISOROOT}/kernel.smp
; fi
225 make installkernel DESTDIR
=${ISOROOT} \
226 KERNCONF
=DFLYLIVE DESTKERNNAME
=kernel KERNCONFDIR
=${.CURDIR
}/gui
/root
; \
228 make installkernel DESTDIR
=${ISOROOT} \
229 KERNCONF
=VKERNEL DESTKERNNAME
=kernel.VKERNEL
-DNO_MODULES KERNCONFDIR
=${.CURDIR
}/gui
/root
; \
231 make installkernel DESTDIR
=${ISOROOT}/kernel.smp \
232 KERNCONF
=DFLYLIVE-SMP DESTKERNNAME
=kernel KERNCONFDIR
=${.CURDIR
}/gui
/root
; \
234 make installkernel DESTDIR
=${ISOROOT}/kernel.smp \
235 KERNCONF
=DFLYLIVE-SMP-NOAPIC DESTKERNNAME
=kernel.noapic \
236 KERNCONFDIR
=${.CURDIR
}/gui
/root
-DNO_MODULES
;
240 for kernconf in
${KERNCONF}; do \
241 make DESTDIR
=${ISOROOT} \
242 installkernel KERNCONF
=$${kernconf} \
243 $${first
:+DESTKERNNAME
=kernel.
$${kernconf}} \
244 $${first
:+-DNO_MODULES
}; \
248 ln
-s kernel
${ISOROOT}/kernel.BOOTP
249 mtree
-deU
-f
${.CURDIR
}/..
/etc
/mtree
/BSD.local.
dist -p
${ISOROOT}/usr
/local
/
250 mtree
-deU
-f
${.CURDIR
}/..
/etc
/mtree
/BSD.var.
dist -p
${ISOROOT}/var
251 dev_mkdb
-f
${ISOROOT}/var
/run
/dev.db
${ISOROOT}/dev
253 # Include kernel sources on the release CD (~14MB)
256 .if
!defined
(WITHOUT_SRCS
)
257 ( cd
${.CURDIR
}/..
/..
; tar -cf
- src
/Makefile src
/Makefile.inc1 src
/sys | bzip2
-9 > ${ISOROOT}/usr
/src-sys.
tar.bz2
)
261 (cd
${PKGSRC_PKG_PATH}; tar xzpf
${CVSUP_BOOTSTRAP_KIT}.tgz
)
262 .for ROOTSKEL in
${ROOTSKELS}
263 cpdup
-X cpignore
-o
${ROOTSKEL} ${ISOROOT}
265 rm -rf
${ISOROOT}/tmp
/bootstrap
${ISOROOT}/usr
/obj
/pkgsrc
266 cd
${ISOROOT}; tar xvzpf
${PKGSRC_PKG_PATH}/${PKGSRC_BOOTSTRAP_KIT}.tgz
267 cp
-p
${PKGSRC_PKG_PATH}/${CVSUP_BOOTSTRAP_KIT}/usr
/local
/bin
/cvsup
${ISOROOT}/usr
/local
/bin
/cvsup
268 cp
-p
${PKGSRC_PKG_PATH}/${CVSUP_BOOTSTRAP_KIT}/usr
/local
/man
/man1
/cvsup
.1 ${ISOROOT}/usr
/local
/man
/man1
/cvsup
.1
269 rm -rf
${ISOROOT}/tmp
/bootstrap
${ISOROOT}/usr
/obj
/pkgsrc
270 rm -rf
${ISOROOT}/usr
/local
/share
/pristine
271 pwd_mkdb
-p
-d
${ISOROOT}/etc
${ISOROOT}/etc
/master.passwd
272 .for UPGRADE_ITEM in Makefile \
273 etc.
${MACHINE_ARCH} \
277 periodic
/daily
/Makefile \
278 periodic
/security
/Makefile \
279 periodic
/weekly
/Makefile \
280 periodic
/monthly
/Makefile
281 cp
-R
${.CURDIR
}/..
/etc
/${UPGRADE_ITEM} ${ISOROOT}/etc
/${UPGRADE_ITEM}
283 .for PKG in
${PKGSRC_PACKAGES}
284 ${ENVCMD} PKG_PATH
=${PKGSRC_PKG_PATH} ${PKGBIN_PKG_ADD} -I
-K
${ISOROOT}${PKGSRC_DB} -p
${ISOROOT}${PKGSRC_PREFIX} ${PKG}
286 find
${ISOROOT}${PKGSRC_DB} -name
+CONTENTS
-type f
-exec sed
-i
'' -e
's,${ISOROOT},,' -- {} \
;
287 ${PKGBIN_PKG_ADMIN} -K
${ISOROOT}${PKGSRC_DB} rebuild
288 .if defined
(WITH_GUI
)
289 .for FONT in
75dpi
100dpi misc Type1 TTF
290 chroot
${ISOROOT} /usr
/pkg
/bin
/mkfontdir
/usr
/pkg
/lib
/X11
/fonts
/${FONT}
293 makewhatis
${ISOROOT}/usr
/local
/man
294 makewhatis
${ISOROOT}/usr
/pkg
/man
297 ( find
-s
${ISOROOT} -path
${ISOROOT}/tmp
-or \
298 -path
${ISOROOT}/usr
/tmp
-or
-path
${ISOROOT}/var
/tmp \
299 -prune
-o
-print | sed
-e
's#^${ISOROOT}##g' | \
300 /usr
/libexec
/locate.mklocatedb \
301 -presort
>${ISOROOT}/var
/db
/locate.database
)
304 ( cd
${ISOROOT}; ${PKGBIN_MKISOFS} -b boot
/cdboot
-no-emul-boot \
305 -R
-J
-V DragonFly
-o
${ISOFILE} .
)
308 if
[ -d
${ISOROOT} ]; then chflags
-R noschg
${ISOROOT}; fi
309 if
[ -d
${ISOROOT} ]; then
rm -rf
${ISOROOT}/*; fi
310 if
[ -d
${NRLOBJDIR}/nrelease
]; then
rm -rf
${NRLOBJDIR}/nrelease
; fi
313 rm -rf
${OBJSYS}/${KERNCONF}
314 # do not use PKGSRC_PKG_PATH here, we do not want to destroy an
316 if
[ -d
${ISODIR}/packages
]; then
rm -rf
${ISODIR}/packages
; fi
319 @if
[ ! -d
${PKGSRC_PKG_PATH} ]; then mkdir
-p
${PKGSRC_PKG_PATH}; fi
320 .for PKG in
${PKGSRC_PACKAGES}
321 @
${ENVCMD} PKG_PATH
=${PKGSRC_PKG_PATH} ${PKGBIN_PKG_ADD} -K
${ISOROOT}${PKGSRC_DB} -n
${PKG} > /dev
/null
2>&1 || \
322 (cd
${PKGSRC_PKG_PATH}; echo
"Fetching ${PKGSRC_BOOTSTRAP_URL}/${PKG}"; fetch
${PKGSRC_BOOTSTRAP_URL}/${PKG})
324 .if
!exists
(${PKGSRC_PKG_PATH}/${PKGSRC_BOOTSTRAP_KIT}.tgz
)
325 (cd
${PKGSRC_PKG_PATH}; fetch
${PKGSRC_BOOTSTRAP_URL}/${PKGSRC_BOOTSTRAP_KIT}.tgz
)
327 .if
!exists
(${PKGSRC_PKG_PATH}/${CVSUP_BOOTSTRAP_KIT}.tgz
)
328 (cd
${PKGSRC_PKG_PATH}; fetch
${PKGSRC_BOOTSTRAP_URL}/${CVSUP_BOOTSTRAP_KIT}.tgz
)
332 mkdir
-p
${PKGSRC_PKG_PATH}
333 .if
!exists
(${PKGSRC_PKG_PATH}/${PKGSRC_BOOTSTRAP_KIT}.tgz
)
334 (cd
${PKGSRC_PKG_PATH}; fetch
${PKGSRC_BOOTSTRAP_URL}/${PKGSRC_BOOTSTRAP_KIT}.tgz
)
336 (cd
${PKGSRC_PKG_PATH}; tar xzpf
${PKGSRC_BOOTSTRAP_KIT}.tgz
)
337 (cd
${PKGSRC_PKG_PATH}/${PKGSRC_BOOTSTRAP_KIT}/bootstrap
; .
/bootstrap
)
340 .if
!exists
(${PKGBIN_MKISOFS})
341 ${PKGBIN_PKG_ADD} ${PKGSRC_PKG_PATH}/cdrtools
*
345 .PHONY
: all release installer_release quickrel installer_quickrel realquickrel
346 .PHONY
: installer_fetch installer
347 .PHONY
: quick realquick
348 .PHONY
: installer_realquickrel
check buildworld1 buildworld2
349 .PHONY
: buildkernel1 buildkernel2 buildiso customizeiso mklocatedb mkiso
350 .PHONY
: clean realclean fetch
352 .
include <bsd.prog.mk
>