xref: /haiku/build/jam/images/HaikuImage (revision e8c5236a9ce57f3f8f0c879b734e2d2a64617743)
1*e8c5236aSIngo Weinhold# This file defines what ends up on the Haiku image (respectively in the Haiku
2*e8c5236aSIngo Weinhold# installation directory) and it executes the rules building the image
3*e8c5236aSIngo Weinhold# (respectively installing the files in the installation directory).
4*e8c5236aSIngo Weinhold
5*e8c5236aSIngo Weinhold
6*e8c5236aSIngo WeinholdSYSTEM_BIN = [ FFilterByBuildFeatures
7*e8c5236aSIngo Weinhold	"["
8*e8c5236aSIngo Weinhold	addattr alert arp
9*e8c5236aSIngo Weinhold	base64 basename bash bc beep bfsinfo
10*e8c5236aSIngo Weinhold	cal cat catattr checkfs checkitout chgrp chmod chop chown chroot cksum clear
11*e8c5236aSIngo Weinhold	clockconfig cmp collectcatkeys comm compress copyattr CortexAddOnHost cp
12*e8c5236aSIngo Weinhold	csplit cut date dc dd desklink df diff diff3 dircolors dirname
13*e8c5236aSIngo Weinhold	diskimage draggers driveinfo dstcheck du dumpcatalog
14*e8c5236aSIngo Weinhold	echo eject env error expand expr
15*e8c5236aSIngo Weinhold	factor false fdinfo ffm filepanel find finddir FirstBootPrompt fmt fold
16*e8c5236aSIngo Weinhold	fortune frcode ftp ftpd funzip fwcontrol
17*e8c5236aSIngo Weinhold	gawk gdb@x86 getlimits groups gzip gzexe
18*e8c5236aSIngo Weinhold	hd head hey hostname
19*e8c5236aSIngo Weinhold	id ident ifconfig <bin>install installsound iroster isvolume
20*e8c5236aSIngo Weinhold	ideinfo@ide idestatus@ide
21*e8c5236aSIngo Weinhold	join kernel_debugger keymap keystore kill
22*e8c5236aSIngo Weinhold	less lessecho lesskey link linkcatkeys listarea listattr listimage listdev
23*e8c5236aSIngo Weinhold	listport listres listsem listusb ln locale locate logger login logname ls
24*e8c5236aSIngo Weinhold	lsindex
25*e8c5236aSIngo Weinhold	mail2mbox makebootable mbox2mail md5sum merge message mimeset mkdos mkdir
26*e8c5236aSIngo Weinhold	mkfifo mkfs mkindex mktemp modifiers mount mount_nfs mountvolume mv
27*e8c5236aSIngo Weinhold	netcat netstat nl nohup notify nproc
28*e8c5236aSIngo Weinhold	od open
29*e8c5236aSIngo Weinhold	package package_repo passwd paste patch pathchk pc ping ping6 pkgman play
30*e8c5236aSIngo Weinhold	playfile playsound playwav pr prio printenv printf profile ps ptx pwd
31*e8c5236aSIngo Weinhold	query quit
32*e8c5236aSIngo Weinhold	rc readlink reindex release renice rlog rm rmattr rmindex rmdir roster
33*e8c5236aSIngo Weinhold	route
34*e8c5236aSIngo Weinhold	safemode screen_blanker screenmode screenshot sdiff setdecor setmime settype
35*e8c5236aSIngo Weinhold	setversion setvolume seq sha1sum sha256sum shar shred shuf shutdown sleep
36*e8c5236aSIngo Weinhold	sort spamdbm split stat strace stty su sum sync sysinfo
37*e8c5236aSIngo Weinhold	tac tail tcpdump tcptester tee telnet telnetd test timeout top touch
38*e8c5236aSIngo Weinhold	tput tr traceroute translate trash true truncate tsort tty
39*e8c5236aSIngo Weinhold	uname unchop unexpand unmount uniq unlink unshar unzip unzipsfx
40*e8c5236aSIngo Weinhold	<bin>updatedb uptime urlwrapper useradd uudecode uuencode
41*e8c5236aSIngo Weinhold	vdir version vmstat
42*e8c5236aSIngo Weinhold	waitfor watch wc wget whoami writembr@x86 xargs xres
43*e8c5236aSIngo Weinhold	yes
44*e8c5236aSIngo Weinhold	zdiff zforce zgrep zip zipcloak <bin>zipgrep zipnote zipsplit zmore znew
45*e8c5236aSIngo Weinhold] ;
46*e8c5236aSIngo Weinhold
47*e8c5236aSIngo WeinholdSYSTEM_APPS = [ FFilterByBuildFeatures
48*e8c5236aSIngo Weinhold	AboutSystem ActivityMonitor BootManager@x86 CharacterMap
49*e8c5236aSIngo Weinhold	CodyCam DeskCalc Devices DiskProbe DiskUsage DriveSetup CDPlayer Debugger
50*e8c5236aSIngo Weinhold	Expander GLInfo@x86 Icon-O-Matic Installer LaunchBox Magnify Mail
51*e8c5236aSIngo Weinhold	MediaConverter MediaPlayer MidiPlayer NetworkStatus PackageInstaller People
52*e8c5236aSIngo Weinhold	PoorMan PowerStatus ProcessController Screenshot ShowImage SoundRecorder
53*e8c5236aSIngo Weinhold	StyledEdit Terminal TextSearch TV WebWatch Workspaces
54*e8c5236aSIngo Weinhold] ;
55*e8c5236aSIngo WeinholdSYSTEM_PREFERENCES = [ FFilterByBuildFeatures
56*e8c5236aSIngo Weinhold	Appearance Backgrounds CPUFrequency DataTranslations
57*e8c5236aSIngo Weinhold	<preference>Deskbar E-mail FileTypes Keyboard Keymap Locale Media
58*e8c5236aSIngo Weinhold	Mouse Network Notifications Printers Screen ScreenSaver
59*e8c5236aSIngo Weinhold	Shortcuts Sounds Time Touchpad <preference>Tracker VirtualMemory
60*e8c5236aSIngo Weinhold] ;
61*e8c5236aSIngo WeinholdSYSTEM_DEMOS = [ FFilterByBuildFeatures
62*e8c5236aSIngo Weinhold	BSnow Chart Clock Cortex FontDemo GLTeapot@x86
63*e8c5236aSIngo Weinhold	$(HAIKU_INCLUDE_TRADEMARKS)Haiku3d@x86 Mandelbrot OverlayImage Pairs
64*e8c5236aSIngo Weinhold	Playground Pulse Sudoku
65*e8c5236aSIngo Weinhold] ;
66*e8c5236aSIngo WeinholdSYSTEM_LIBS = [ FFilterByBuildFeatures
67*e8c5236aSIngo Weinhold	libbe.so libbsd.so libbnetapi.so
68*e8c5236aSIngo Weinhold	libdebug.so libdevice.so
69*e8c5236aSIngo Weinhold	libgame.so libGL.so@x86 libglut.so@x86
70*e8c5236aSIngo Weinhold	libgnu.so libmail.so libmedia.so libmidi.so libmidi2.so
71*e8c5236aSIngo Weinhold	libnetwork.so
72*e8c5236aSIngo Weinhold	libpackage.so
73*e8c5236aSIngo Weinhold	<revisioned>libroot.so
74*e8c5236aSIngo Weinhold	libscreensaver.so
75*e8c5236aSIngo Weinhold	libtextencoding.so libtiff.so libtracker.so libtranslation.so
76*e8c5236aSIngo Weinhold	$(HAIKU_SHARED_LIBSTDC++) $(HAIKU_SHARED_LIBSUPC++)
77*e8c5236aSIngo Weinhold] ;
78*e8c5236aSIngo WeinholdPRIVATE_SYSTEM_LIBS = [ FFilterByBuildFeatures
79*e8c5236aSIngo Weinhold	libalm.so
80*e8c5236aSIngo Weinhold	libfluidsynth.so
81*e8c5236aSIngo Weinhold	libilmimf.so
82*e8c5236aSIngo Weinhold	libpackage-add-on-libsolv.so
83*e8c5236aSIngo Weinhold	libroot-addon-icu.so
84*e8c5236aSIngo Weinhold] ;
85*e8c5236aSIngo WeinholdSYSTEM_SERVERS = [ FFilterByBuildFeatures
86*e8c5236aSIngo Weinhold	app_server cddb_daemon debug_server dns_resolver_server input_server
87*e8c5236aSIngo Weinhold	keystore_server mail_daemon media_addon_server media_server midi_server
88*e8c5236aSIngo Weinhold	mount_server net_server nfs4_idmapper_server notification_server
89*e8c5236aSIngo Weinhold	package_daemon power_daemon print_server print_addon_server registrar
90*e8c5236aSIngo Weinhold	syslog_daemon
91*e8c5236aSIngo Weinhold] ;
92*e8c5236aSIngo Weinhold
93*e8c5236aSIngo WeinholdSYSTEM_NETWORK_DEVICES = ethernet loopback ;
94*e8c5236aSIngo WeinholdSYSTEM_NETWORK_DATALINK_PROTOCOLS = ethernet_frame <module>arp loopback_frame
95*e8c5236aSIngo Weinhold	ipv6_datagram ;
96*e8c5236aSIngo Weinhold#SYSTEM_NETWORK_PPP = ipcp modem pap pppoe ;
97*e8c5236aSIngo WeinholdSYSTEM_NETWORK_PROTOCOLS = ipv4 tcp udp icmp unix icmp6 ipv6 ;
98*e8c5236aSIngo Weinhold
99*e8c5236aSIngo WeinholdSYSTEM_ADD_ONS_ACCELERANTS = [ FFilterByBuildFeatures
100*e8c5236aSIngo Weinhold	x86,x86_64 @{
101*e8c5236aSIngo Weinhold		vesa.accelerant
102*e8c5236aSIngo Weinhold	}@ # x86,x86_64
103*e8c5236aSIngo Weinhold	x86 @{
104*e8c5236aSIngo Weinhold		3dfx.accelerant ati.accelerant matrox.accelerant neomagic.accelerant
105*e8c5236aSIngo Weinhold		nvidia.accelerant intel_810.accelerant intel_extreme.accelerant
106*e8c5236aSIngo Weinhold		radeon.accelerant radeon_hd.accelerant s3.accelerant
107*e8c5236aSIngo Weinhold		#via.accelerant vmware.accelerant
108*e8c5236aSIngo Weinhold	}@ # x86
109*e8c5236aSIngo Weinhold] ;
110*e8c5236aSIngo WeinholdSYSTEM_ADD_ONS_TRANSLATORS = BMPTranslator EXRTranslator GIFTranslator
111*e8c5236aSIngo Weinhold	HVIFTranslator ICOTranslator JPEGTranslator JPEG2000Translator
112*e8c5236aSIngo Weinhold	PCXTranslator PNGTranslator PPMTranslator
113*e8c5236aSIngo Weinhold	RAWTranslator RTFTranslator SGITranslator STXTTranslator TGATranslator
114*e8c5236aSIngo Weinhold	TIFFTranslator WebPTranslator WonderBrushTranslator ICNSTranslator
115*e8c5236aSIngo Weinhold;
116*e8c5236aSIngo WeinholdSYSTEM_ADD_ONS_LOCALE_CATALOGS = <catalog-addon>plaintext ;
117*e8c5236aSIngo WeinholdSYSTEM_ADD_ONS_MEDIA = [ FFilterByBuildFeatures
118*e8c5236aSIngo Weinhold	cortex_audioadapter.media_addon
119*e8c5236aSIngo Weinhold	cortex_flanger.media_addon
120*e8c5236aSIngo Weinhold	dvb.media_addon@x86
121*e8c5236aSIngo Weinhold	hmulti_audio.media_addon
122*e8c5236aSIngo Weinhold	mixer.media_addon
123*e8c5236aSIngo Weinhold	opensound.media_addon
124*e8c5236aSIngo Weinhold	tone_producer_demo.media_addon
125*e8c5236aSIngo Weinhold	usb_webcam.media_addon
126*e8c5236aSIngo Weinhold	video_producer_demo.media_addon
127*e8c5236aSIngo Weinhold	video_window_demo.media_addon
128*e8c5236aSIngo Weinhold	firewire_dv.media_addon@x86
129*e8c5236aSIngo Weinhold	#legacy.media_addon
130*e8c5236aSIngo Weinhold	equalizer.media_addon
131*e8c5236aSIngo Weinhold	vst_host.media_addon
132*e8c5236aSIngo Weinhold] ;
133*e8c5236aSIngo WeinholdSYSTEM_ADD_ONS_MEDIA_PLUGINS = [ FFilterByBuildFeatures
134*e8c5236aSIngo Weinhold	ffmpeg@ffmpeg raw_decoder
135*e8c5236aSIngo Weinhold] ;
136*e8c5236aSIngo WeinholdSYSTEM_ADD_ONS_PRINT =
137*e8c5236aSIngo Weinhold	Canon\ LIPS3\ Compatible
138*e8c5236aSIngo Weinhold	Canon\ LIPS4\ Compatible
139*e8c5236aSIngo Weinhold	Gutenprint
140*e8c5236aSIngo Weinhold	PCL5\ Compatible
141*e8c5236aSIngo Weinhold	PCL6\ Compatible
142*e8c5236aSIngo Weinhold	PDF\ Writer
143*e8c5236aSIngo Weinhold	PS\ Compatible
144*e8c5236aSIngo Weinhold	Preview
145*e8c5236aSIngo Weinhold;
146*e8c5236aSIngo WeinholdSYSTEM_ADD_ONS_PRINT_TRANSPORT = HP\ JetDirect IPP LPR
147*e8c5236aSIngo Weinhold	# Parallel\ Port
148*e8c5236aSIngo Weinhold	Print\ To\ File Serial\ Port USB\ Port
149*e8c5236aSIngo Weinhold;
150*e8c5236aSIngo WeinholdSYSTEM_ADD_ONS_SCREENSAVERS = [ FFilterByBuildFeatures
151*e8c5236aSIngo Weinhold	Butterfly DebugNow Flurry@x86
152*e8c5236aSIngo Weinhold	GLife@x86 $(HAIKU_INCLUDE_TRADEMARKS)Haiku Icons IFS Leaves
153*e8c5236aSIngo Weinhold	Message Spider Gravity@x86
154*e8c5236aSIngo Weinhold] ;
155*e8c5236aSIngo WeinholdSYSTEM_ADD_ONS_DRIVERS_AUDIO = auich auvia echo3g emuxki hda ice1712 sis7018 ;
156*e8c5236aSIngo WeinholdSYSTEM_ADD_ONS_DRIVERS_AUDIO_OLD = ; #cmedia usb_audio ;
157*e8c5236aSIngo WeinholdSYSTEM_ADD_ONS_DRIVERS_GRAPHICS = [ FFilterByBuildFeatures
158*e8c5236aSIngo Weinhold	x86,x86_64 @{
159*e8c5236aSIngo Weinhold		vesa
160*e8c5236aSIngo Weinhold	}@ # x86,x86_64
161*e8c5236aSIngo Weinhold	x86 @{
162*e8c5236aSIngo Weinhold		ati 3dfx intel_810 intel_extreme matrox neomagic nvidia radeon radeon_hd
163*e8c5236aSIngo Weinhold		s3 #via vmware
164*e8c5236aSIngo Weinhold	}@ # x86
165*e8c5236aSIngo Weinhold] ;
166*e8c5236aSIngo WeinholdSYSTEM_ADD_ONS_DRIVERS_MIDI = emuxki ice1712 usb_midi ;
167*e8c5236aSIngo WeinholdSYSTEM_ADD_ONS_DRIVERS_NET = [ FFilterByBuildFeatures
168*e8c5236aSIngo Weinhold	x86,x86_64 @{
169*e8c5236aSIngo Weinhold		3com atheros813x ar81xx attansic_l1 attansic_l2 broadcom440x
170*e8c5236aSIngo Weinhold		broadcom570x dec21xxx ipro100 ipro1000 jmicron2x0 marvell_yukon nforce
171*e8c5236aSIngo Weinhold		pcnet rtl8139 rtl81xx sis19x syskonnect via_rhine vt612x
172*e8c5236aSIngo Weinhold	}@ # x86_64
173*e8c5236aSIngo Weinhold
174*e8c5236aSIngo Weinhold	etherpci pegasus sis900 usb_davicom usb_asix usb_ecm wb840
175*e8c5236aSIngo Weinhold
176*e8c5236aSIngo Weinhold	# WLAN drivers
177*e8c5236aSIngo Weinhold	x86 @{
178*e8c5236aSIngo Weinhold		aironetwifi atheroswifi broadcom43xx
179*e8c5236aSIngo Weinhold		iprowifi2100 iprowifi2200 iprowifi3945
180*e8c5236aSIngo Weinhold		iprowifi4965 marvell88w8363 marvell88w8335
181*e8c5236aSIngo Weinhold		ralinkwifi wavelanwifi
182*e8c5236aSIngo Weinhold	}@ # x86
183*e8c5236aSIngo Weinhold
184*e8c5236aSIngo Weinhold	# WWAN drivers
185*e8c5236aSIngo Weinhold	#usb_beceemwmx@gpl
186*e8c5236aSIngo Weinhold] ;
187*e8c5236aSIngo WeinholdSYSTEM_ADD_ONS_DRIVERS_POWER = [ FFilterByBuildFeatures acpi_button@x86 ] ;
188*e8c5236aSIngo WeinholdSYSTEM_ADD_ONS_BUS_MANAGERS = [ FFilterByBuildFeatures
189*e8c5236aSIngo Weinhold	ata@ata pci ps2@x86,x86_64 isa@x86,x86_64
190*e8c5236aSIngo Weinhold	ide@ide scsi config_manager agp_gart@x86 usb firewire@x86 acpi@x86
191*e8c5236aSIngo Weinhold] ;
192*e8c5236aSIngo WeinholdSYSTEM_ADD_ONS_FILE_SYSTEMS = bfs bindfs btrfs cdda exfat ext2 fat iso9660 nfs
193*e8c5236aSIngo Weinhold	nfs4 attribute_overlay write_overlay ntfs packagefs reiserfs@x86 udf
194*e8c5236aSIngo Weinhold	googlefs ;
195*e8c5236aSIngo Weinhold
196*e8c5236aSIngo Weinhold
197*e8c5236aSIngo Weinhold# build the haiku system packages and add them
198*e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) HaikuPackages ] ;
199*e8c5236aSIngo Weinhold
200*e8c5236aSIngo WeinholdAddPackageFilesToHaikuImage system : haiku.hpkg ;
201*e8c5236aSIngo WeinholdAddPackageFilesToHaikuImage system : haiku_loader.hpkg ;
202*e8c5236aSIngo Weinhold
203*e8c5236aSIngo Weinhold
204*e8c5236aSIngo WeinholdAddSymlinkToHaikuImage home Desktop : /boot/home : Home ;
205*e8c5236aSIngo Weinhold
206*e8c5236aSIngo Weinhold# Mailbox folders and symlink
207*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home mail draft ;
208*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home mail in ;
209*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home mail out ;
210*e8c5236aSIngo Weinhold
211*e8c5236aSIngo Weinhold# global settings when a package is installed in ~/config
212*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home config settings global ;
213*e8c5236aSIngo Weinhold
214*e8c5236aSIngo Weinhold
215*e8c5236aSIngo Weinhold# scripts and data files
216*e8c5236aSIngo Weinholdlocal userBootScripts = UserBootscript UserSetupEnvironment.sample ;
217*e8c5236aSIngo WeinholdSEARCH on $(userBootScripts) = [ FDirName $(HAIKU_TOP) data config boot ] ;
218*e8c5236aSIngo WeinholdAddFilesToHaikuImage home config settings boot : $(userBootScripts) ;
219*e8c5236aSIngo Weinhold
220*e8c5236aSIngo Weinhold# Add boot launch directory
221*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home config settings boot launch ;
222*e8c5236aSIngo Weinhold
223*e8c5236aSIngo Weinhold# Add mail provider infos.
224*e8c5236aSIngo WeinholdAddFilesToHaikuImage home config settings Mail ProviderInfo :
225*e8c5236aSIngo Weinhold	$(HAIKU_PROVIDER_INFOS) ;
226*e8c5236aSIngo Weinhold
227*e8c5236aSIngo Weinhold# Add Tracker New Templates
228*e8c5236aSIngo WeinholdAddFilesToHaikuImage home config settings Tracker "Tracker New Templates"
229*e8c5236aSIngo Weinhold	:
230*e8c5236aSIngo Weinhold	"<tracker-new-templates>C++ header"
231*e8c5236aSIngo Weinhold	"<tracker-new-templates>C++ source"
232*e8c5236aSIngo Weinhold	"<tracker-new-templates>makefile"
233*e8c5236aSIngo Weinhold	"<tracker-new-templates>text file"
234*e8c5236aSIngo Weinhold;
235*e8c5236aSIngo Weinhold
236*e8c5236aSIngo Weinholdlocal etcDir = [ FDirName $(HAIKU_TOP) data etc ] ;
237*e8c5236aSIngo Weinholdlocal etcFiles = inputrc profile ;
238*e8c5236aSIngo WeinholdetcFiles = $(etcFiles:G=etc) ;
239*e8c5236aSIngo WeinholdSEARCH on $(etcFiles) = $(etcDir) ;
240*e8c5236aSIngo WeinholdetcFiles += <etc>termcap <etc>sysless <etc>sysless.in ;
241*e8c5236aSIngo WeinholdAddFilesToHaikuImage common settings etc : $(etcFiles) ;
242*e8c5236aSIngo Weinhold
243*e8c5236aSIngo Weinholdlocal profileFiles = [ Glob $(etcDir)/profile.d : *.sh ] ;
244*e8c5236aSIngo WeinholdprofileFiles = $(profileFiles:G=profile-d) ;
245*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage common settings etc profile.d ;
246*e8c5236aSIngo WeinholdAddFilesToHaikuImage common settings etc profile.d : $(profileFiles) ;
247*e8c5236aSIngo Weinhold
248*e8c5236aSIngo Weinhold#local bashCompletionFiles = [ Glob $(etcDir)/bash_completion.d : * ] ;
249*e8c5236aSIngo Weinhold#local bashCompletionHelperFiles
250*e8c5236aSIngo Weinhold#    = [ Glob $(etcDir)/bash_completion.d/helpers : * ] ;
251*e8c5236aSIngo Weinhold#bashCompletionFiles = $(bashCompletionFiles:G=bash-completion) ;
252*e8c5236aSIngo Weinhold#bashCompletionHelperFiles = $(bashCompletionHelperFiles:G=bash-completion-hlp) ;
253*e8c5236aSIngo Weinhold#AddDirectoryToHaikuImage common etc bash_completion.d ;
254*e8c5236aSIngo Weinhold#AddDirectoryToHaikuImage common etc bash_completion.d helpers ;
255*e8c5236aSIngo Weinhold#AddFilesToHaikuImage common etc bash_completion.d : $(bashCompletionFiles) ;
256*e8c5236aSIngo Weinhold#AddFilesToHaikuImage common etc bash_completion.d helpers
257*e8c5236aSIngo Weinhold#    : $(bashCompletionHelperFiles) ;
258*e8c5236aSIngo Weinhold
259*e8c5236aSIngo Weinholdlocal driverSettingsFiles = <driver-settings>kernel ;
260*e8c5236aSIngo WeinholdSEARCH on $(driverSettingsFiles)
261*e8c5236aSIngo Weinhold	= [ FDirName $(HAIKU_TOP) data settings kernel drivers ] ;
262*e8c5236aSIngo WeinholdAddFilesToHaikuImage home config settings kernel drivers
263*e8c5236aSIngo Weinhold	: $(driverSettingsFiles) ;
264*e8c5236aSIngo Weinhold
265*e8c5236aSIngo Weinholdlocal networkSettingsFiles = <network-settings>services ;
266*e8c5236aSIngo WeinholdSEARCH on $(networkSettingsFiles)
267*e8c5236aSIngo Weinhold	= [ FDirName $(HAIKU_TOP) data settings network ] ;
268*e8c5236aSIngo WeinholdAddFilesToHaikuImage common settings network : $(networkSettingsFiles) ;
269*e8c5236aSIngo Weinhold
270*e8c5236aSIngo Weinhold# fresh install indicator file for the post install scripts
271*e8c5236aSIngo WeinholdSEARCH on <post-install>fresh_install
272*e8c5236aSIngo Weinhold	= [ FDirName $(HAIKU_TOP) data common settings ] ;
273*e8c5236aSIngo WeinholdAddFilesToHaikuImage common settings : <post-install>fresh_install ;
274*e8c5236aSIngo Weinhold
275*e8c5236aSIngo Weinhold# decorators
276*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home config non-packaged add-ons decorators ;
277*e8c5236aSIngo Weinhold#AddFilesToHaikuImage home config add-ons decorators : ;
278*e8c5236aSIngo Weinhold
279*e8c5236aSIngo Weinhold# create directories that will remain empty
280*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage common cache tmp ;
281*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage common non-packaged ;
282*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage common var empty ;
283*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage common var log ;
284*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home Desktop ;
285*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home mail ;
286*e8c5236aSIngo Weinhold
287*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home config non-packaged bin ;
288*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home config non-packaged lib ;
289*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home config non-packaged add-ons kernel drivers bin ;
290*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home config non-packaged add-ons kernel drivers dev ;
291*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home config non-packaged add-ons input_server devices ;
292*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home config non-packaged add-ons input_server filters ;
293*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home config non-packaged add-ons input_server methods ;
294*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home config non-packaged add-ons media plugins ;
295*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home config non-packaged add-ons Tracker ;
296*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home config non-packaged add-ons Print ;
297*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home config non-packaged add-ons Screen\ Savers ;
298*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home config non-packaged add-ons Translators ;
299*e8c5236aSIngo Weinhold
300*e8c5236aSIngo Weinhold# printers
301*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home config settings printers Preview
302*e8c5236aSIngo Weinhold	: home-config-settings-printers-preview.rdef ;
303*e8c5236aSIngo WeinholdAddDirectoryToHaikuImage home config settings printers "Save as PDF"
304*e8c5236aSIngo Weinhold	: home-config-settings-printers-save-as-pdf.rdef ;
305*e8c5236aSIngo Weinhold
306*e8c5236aSIngo Weinhold# dvb channel settings
307*e8c5236aSIngo WeinholdCopyDirectoryToHaikuImage home config settings Media
308*e8c5236aSIngo Weinhold	: [ FDirName $(HAIKU_TOP) data settings media dvb ]
309*e8c5236aSIngo Weinhold	: dvb : -x Jamfile ;
310*e8c5236aSIngo Weinhold
311*e8c5236aSIngo Weinhold# repository config files
312*e8c5236aSIngo Weinholdlocal repository ;
313*e8c5236aSIngo Weinholdfor repository in $(HAIKU_REPOSITORIES) {
314*e8c5236aSIngo Weinhold	AddFilesToHaikuImage common settings package-repositories
315*e8c5236aSIngo Weinhold		: [ on $(repository) return $(HAIKU_REPOSITORY_CONFIG_FILE) ]
316*e8c5236aSIngo Weinhold		: $(repository:G=) ;
317*e8c5236aSIngo Weinhold}
318*e8c5236aSIngo Weinhold
319*e8c5236aSIngo Weinhold
320*e8c5236aSIngo Weinhold#pragma mark - Optional Packages
321*e8c5236aSIngo Weinhold
322*e8c5236aSIngo Weinhold
323*e8c5236aSIngo WeinholdHAIKU_IMAGE_OPTIONAL_PACKAGE_DESCRIPTIONS = ;
324*e8c5236aSIngo Weinhold
325*e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) OptionalPackages ] ;
326*e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) OptionalTestPackages ] ;
327*e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) OptionalLibPackages ] ;
328*e8c5236aSIngo Weinhold
329*e8c5236aSIngo Weinholdlocal optionalPackageDescriptions ;
330*e8c5236aSIngo Weinholdif $(HAIKU_IMAGE_OPTIONAL_PACKAGE_DESCRIPTIONS) {
331*e8c5236aSIngo Weinhold	optionalPackageDescriptions = <haiku-image>optional_package_descriptions ;
332*e8c5236aSIngo Weinhold	MakeLocate $(optionalPackageDescriptions)
333*e8c5236aSIngo Weinhold		: $(HAIKU_COMMON_PLATFORM_OBJECT_DIR) ;
334*e8c5236aSIngo Weinhold
335*e8c5236aSIngo Weinhold	Depends $(optionalPackageDescriptions)
336*e8c5236aSIngo Weinhold		: $(HAIKU_IMAGE_OPTIONAL_PACKAGE_DESCRIPTIONS) ;
337*e8c5236aSIngo Weinhold
338*e8c5236aSIngo Weinhold	actions together BuildOptionalPackageDescriptions
339*e8c5236aSIngo Weinhold	{
340*e8c5236aSIngo Weinhold		cat $(2) > $(1)
341*e8c5236aSIngo Weinhold	}
342*e8c5236aSIngo Weinhold
343*e8c5236aSIngo Weinhold	BuildOptionalPackageDescriptions $(optionalPackageDescriptions)
344*e8c5236aSIngo Weinhold		: $(HAIKU_IMAGE_OPTIONAL_PACKAGE_DESCRIPTIONS) ;
345*e8c5236aSIngo Weinhold}
346*e8c5236aSIngo Weinhold
347*e8c5236aSIngo Weinhold
348*e8c5236aSIngo Weinhold#pragma mark - User/Group Setup
349*e8c5236aSIngo Weinhold
350*e8c5236aSIngo Weinhold
351*e8c5236aSIngo Weinhold# add the root user and the root and users groups
352*e8c5236aSIngo WeinholdAddUserToHaikuImage $(HAIKU_ROOT_USER_NAME:E=baron) : 0 : 0 : /boot/home
353*e8c5236aSIngo Weinhold	: /bin/bash : $(HAIKU_ROOT_USER_REAL_NAME:E="Root User") ;
354*e8c5236aSIngo WeinholdAddGroupToHaikuImage root : 0 : ;
355*e8c5236aSIngo WeinholdAddGroupToHaikuImage users : 100 : ;
356*e8c5236aSIngo Weinhold
357*e8c5236aSIngo Weinhold
358*e8c5236aSIngo Weinhold#pragma mark - Host Name
359*e8c5236aSIngo Weinhold
360*e8c5236aSIngo Weinhold
361*e8c5236aSIngo Weinholdif $(HAIKU_IMAGE_HOST_NAME) {
362*e8c5236aSIngo Weinhold	actions BuildHaikuImageHostnameFile
363*e8c5236aSIngo Weinhold	{
364*e8c5236aSIngo Weinhold		echo "$(HAIKU_IMAGE_HOST_NAME)" > $(1)
365*e8c5236aSIngo Weinhold	}
366*e8c5236aSIngo Weinhold
367*e8c5236aSIngo Weinhold	local file = <haiku-image>hostname ;
368*e8c5236aSIngo Weinhold	Always $(file) ;
369*e8c5236aSIngo Weinhold	MakeLocate $(file) : $(HAIKU_COMMON_PLATFORM_OBJECT_DIR) ;
370*e8c5236aSIngo Weinhold	BuildHaikuImageHostnameFile $(file) ;
371*e8c5236aSIngo Weinhold	AddFilesToHaikuImage common settings network : $(file) ;
372*e8c5236aSIngo Weinhold}
373*e8c5236aSIngo Weinhold
374*e8c5236aSIngo Weinhold
375*e8c5236aSIngo Weinhold#pragma mark - Build The Image
376*e8c5236aSIngo Weinhold
377*e8c5236aSIngo Weinhold
378*e8c5236aSIngo Weinhold# Execute pre-image user config rules.
379*e8c5236aSIngo WeinholdUserBuildConfigRulePreImage	;
380*e8c5236aSIngo Weinhold
381*e8c5236aSIngo Weinhold# Set image name and directory defaults and locate the image.
382*e8c5236aSIngo WeinholdHAIKU_IMAGE_NAME ?= $(HAIKU_DEFAULT_IMAGE_NAME) ;
383*e8c5236aSIngo WeinholdHAIKU_IMAGE_DIR ?= $(HAIKU_DEFAULT_IMAGE_DIR) ;
384*e8c5236aSIngo WeinholdHAIKU_IMAGE = $(HAIKU_IMAGE_NAME) ;
385*e8c5236aSIngo WeinholdHAIKU_IMAGE_SIZE ?= $(HAIKU_DEFAULT_IMAGE_SIZE) ; # 300 MB
386*e8c5236aSIngo WeinholdHAIKU_IMAGE_LABEL ?= $(HAIKU_DEFAULT_IMAGE_LABEL) ;
387*e8c5236aSIngo WeinholdMakeLocate $(HAIKU_IMAGE) : $(HAIKU_IMAGE_DIR) ;
388*e8c5236aSIngo Weinhold
389*e8c5236aSIngo Weinhold# Set the default installation directory.
390*e8c5236aSIngo WeinholdHAIKU_INSTALL_DIR ?= $(HAIKU_DEFAULT_INSTALL_DIR) ;
391*e8c5236aSIngo Weinhold
392*e8c5236aSIngo Weinhold# the pseudo target all image contents is attached to
393*e8c5236aSIngo WeinholdNotFile $(HAIKU_IMAGE_CONTAINER_NAME) ;
394*e8c5236aSIngo Weinhold
395*e8c5236aSIngo Weinhold# prepare the script that initializes the shell variables
396*e8c5236aSIngo WeinholdHAIKU_IMAGE_INIT_VARIABLES_SCRIPT = <HaikuImage>haiku.image-init-vars ;
397*e8c5236aSIngo Weinholdlocal script = $(HAIKU_IMAGE_INIT_VARIABLES_SCRIPT) ;
398*e8c5236aSIngo WeinholdMakeLocate $(script) : $(HAIKU_OUTPUT_DIR) ;
399*e8c5236aSIngo WeinholdAlways $(script) ;
400*e8c5236aSIngo Weinhold
401*e8c5236aSIngo WeinholdAddVariableToScript $(script) : sourceDir : $(HAIKU_TOP) ;
402*e8c5236aSIngo WeinholdAddVariableToScript $(script) : outputDir : $(HAIKU_OUTPUT_DIR) ;
403*e8c5236aSIngo WeinholdAddVariableToScript $(script) : tmpDir : $(HAIKU_TMP_DIR) ;
404*e8c5236aSIngo WeinholdAddVariableToScript $(script) : downloadDir : $(HAIKU_DOWNLOAD_DIR) ;
405*e8c5236aSIngo WeinholdAddVariableToScript $(script) : installDir : $(HAIKU_INSTALL_DIR) ;
406*e8c5236aSIngo Weinhold#AddVariableToScript $(script) : isImage : 1 ;
407*e8c5236aSIngo WeinholdAddVariableToScript $(script) : imageSize : $(HAIKU_IMAGE_SIZE) ;
408*e8c5236aSIngo WeinholdAddVariableToScript $(script) : imageLabel : $(HAIKU_IMAGE_LABEL) ;
409*e8c5236aSIngo WeinholdAddVariableToScript $(script) : addBuildCompatibilityLibDir
410*e8c5236aSIngo Weinhold	: $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) ;
411*e8c5236aSIngo WeinholdAddVariableToScript $(script) : dontClearImage : $(HAIKU_DONT_CLEAR_IMAGE) ;
412*e8c5236aSIngo WeinholdAddVariableToScript $(script) : updateOnly : [ IsUpdateHaikuImageOnly ] ;
413*e8c5236aSIngo WeinholdAddTargetVariableToScript $(script) : <build>addattr ;
414*e8c5236aSIngo WeinholdAddTargetVariableToScript $(script) : <build>bfs_shell : bfsShell ;
415*e8c5236aSIngo WeinholdAddTargetVariableToScript $(script) : <build>fs_shell_command : fsShellCommand ;
416*e8c5236aSIngo WeinholdAddTargetVariableToScript $(script) : <build>copyattr ;
417*e8c5236aSIngo WeinholdAddTargetVariableToScript $(script) : <build>create_image : createImage ;
418*e8c5236aSIngo WeinholdAddTargetVariableToScript $(script) : <build>makebootable ;
419*e8c5236aSIngo WeinholdAddTargetVariableToScript $(script) : <build>package ;
420*e8c5236aSIngo WeinholdAddTargetVariableToScript $(script) : <build>rc ;
421*e8c5236aSIngo WeinholdAddTargetVariableToScript $(script) : <build>resattr ;
422*e8c5236aSIngo WeinholdAddTargetVariableToScript $(script) : <build>get_package_dependencies
423*e8c5236aSIngo Weinhold	: getPackageDependencies ;
424*e8c5236aSIngo WeinholdAddTargetVariableToScript $(script) : <build>unzip ;
425*e8c5236aSIngo WeinholdAddTargetVariableToScript $(script) : <build>vmdkimage ;
426*e8c5236aSIngo WeinholdAddVariableToScript $(script) : stripCommand : $(HAIKU_STRIP) ;
427*e8c5236aSIngo Weinholdif $(HOST_RM_ATTRS_TARGET) {
428*e8c5236aSIngo Weinhold	AddTargetVariableToScript $(script) : $(HOST_RM_ATTRS_TARGET) : rmAttrs ;
429*e8c5236aSIngo Weinhold} else {
430*e8c5236aSIngo Weinhold	AddVariableToScript $(script) : rmAttrs : rm ;
431*e8c5236aSIngo Weinhold}
432*e8c5236aSIngo Weinholdif $(optionalPackageDescriptions) {
433*e8c5236aSIngo Weinhold	AddTargetVariableToScript $(script) : $(optionalPackageDescriptions)
434*e8c5236aSIngo Weinhold		: optionalPackageDescriptions ;
435*e8c5236aSIngo Weinhold}
436*e8c5236aSIngo Weinhold
437*e8c5236aSIngo Weinhold# Add a variable to indicate whether packages dependencies shall be resolved. We
438*e8c5236aSIngo Weinhold# always want to do that in non-update mode, but also in update mode when all
439*e8c5236aSIngo Weinhold# packages are updated.
440*e8c5236aSIngo Weinholdlocal resolvePackageDependencies ;
441*e8c5236aSIngo Weinholdif ! [ IsUpdateHaikuImageOnly ] || $(HAIKU_UPDATE_ALL_PACKAGES) {
442*e8c5236aSIngo Weinhold	resolvePackageDependencies = 1 ;
443*e8c5236aSIngo Weinhold}
444*e8c5236aSIngo WeinholdAddVariableToScript $(script) : resolvePackageDependencies
445*e8c5236aSIngo Weinhold	: $(resolvePackageDependencies) ;
446*e8c5236aSIngo Weinhold
447*e8c5236aSIngo Weinhold# Add variables "systemPackages" and "commonPackages" with the packages
448*e8c5236aSIngo Weinhold# copied/updated.
449*e8c5236aSIngo Weinholdlocal container = $(HAIKU_IMAGE_CONTAINER_NAME) ;
450*e8c5236aSIngo Weinholdlocal allPackages = [ on $(container) return $(HAIKU_PACKAGES_IN_IMAGE) ] ;
451*e8c5236aSIngo Weinholdif [ on $(container) return $(HAIKU_CONTAINER_UPDATE_ONLY) ]
452*e8c5236aSIngo Weinhold	&& ! [ IncludeAllTargetsInContainer $(container) ] {
453*e8c5236aSIngo Weinhold	allPackages = [ FilterContainerUpdateTargets $(allPackages)
454*e8c5236aSIngo Weinhold		: HAIKU_INCLUDE_IN_IMAGE ] ;
455*e8c5236aSIngo Weinhold}
456*e8c5236aSIngo Weinhold
457*e8c5236aSIngo Weinholdlocal systemPackages ;
458*e8c5236aSIngo Weinholdlocal commonPackages ;
459*e8c5236aSIngo Weinholdlocal package ;
460*e8c5236aSIngo Weinholdfor package in $(allPackages) {
461*e8c5236aSIngo Weinhold	if [ on $(package) return $(HAIKU_PACKAGE_INSTALLATION_LOCATION) ]
462*e8c5236aSIngo Weinhold			= system {
463*e8c5236aSIngo Weinhold		systemPackages += $(package) ;
464*e8c5236aSIngo Weinhold	} else {
465*e8c5236aSIngo Weinhold		commonPackages += $(package) ;
466*e8c5236aSIngo Weinhold	}
467*e8c5236aSIngo Weinhold}
468*e8c5236aSIngo Weinhold
469*e8c5236aSIngo WeinholdAddTargetVariableToScript $(script) : $(systemPackages) : systemPackages ;
470*e8c5236aSIngo WeinholdAddTargetVariableToScript $(script) : $(commonPackages) : commonPackages ;
471*e8c5236aSIngo Weinhold
472*e8c5236aSIngo Weinhold# Generate the repository package lists and add variables for the repositories.
473*e8c5236aSIngo Weinholdlocal repository ;
474*e8c5236aSIngo Weinholdlocal repositoryFiles ;
475*e8c5236aSIngo Weinholdfor repository in $(HAIKU_REPOSITORIES) {
476*e8c5236aSIngo Weinhold	repositoryFiles
477*e8c5236aSIngo Weinhold		+= [ on $(repository) return $(HAIKU_REPOSITORY_CACHE_FILE) ] ;
478*e8c5236aSIngo Weinhold}
479*e8c5236aSIngo Weinhold
480*e8c5236aSIngo WeinholdAddTargetVariableToScript $(script) : $(repositoryFiles) : repositories ;
481*e8c5236aSIngo Weinhold
482*e8c5236aSIngo Weinhold# create the other scripts
483*e8c5236aSIngo WeinholdHAIKU_IMAGE_MAKE_DIRS_SCRIPT = <HaikuImage>haiku.image-make-dirs ;
484*e8c5236aSIngo WeinholdHAIKU_IMAGE_COPY_FILES_SCRIPT = <HaikuImage>haiku.image-copy-files ;
485*e8c5236aSIngo WeinholdHAIKU_IMAGE_EXTRACT_FILES_SCRIPT = <HaikuImage>haiku.image-extract-files ;
486*e8c5236aSIngo WeinholdMakeLocate $(HAIKU_IMAGE_MAKE_DIRS_SCRIPT) $(HAIKU_IMAGE_COPY_FILES_SCRIPT)
487*e8c5236aSIngo Weinhold	$(HAIKU_IMAGE_EXTRACT_FILES_SCRIPT) : $(HAIKU_OUTPUT_DIR) ;
488*e8c5236aSIngo Weinhold
489*e8c5236aSIngo WeinholdCreateHaikuImageMakeDirectoriesScript $(HAIKU_IMAGE_MAKE_DIRS_SCRIPT) ;
490*e8c5236aSIngo WeinholdCreateHaikuImageCopyFilesScript $(HAIKU_IMAGE_COPY_FILES_SCRIPT) ;
491*e8c5236aSIngo WeinholdCreateHaikuImageExtractFilesScript $(HAIKU_IMAGE_EXTRACT_FILES_SCRIPT) ;
492*e8c5236aSIngo Weinhold
493*e8c5236aSIngo Weinhold# Convenience wrapper rule around BuildHaikuImage.
494*e8c5236aSIngo Weinholdrule _BuildHaikuImage image : isImage : isVMwareImage
495*e8c5236aSIngo Weinhold{
496*e8c5236aSIngo Weinhold	# _BuildHaikuImage <image target> : <isImage> : <isVMwareImage> ;
497*e8c5236aSIngo Weinhold	#
498*e8c5236aSIngo Weinhold
499*e8c5236aSIngo Weinhold	# build the image
500*e8c5236aSIngo Weinhold	# HAIKU_IMAGE_EARLY_USER_SCRIPTS, HAIKU_IMAGE_LATE_USER_SCRIPTS can be
501*e8c5236aSIngo Weinhold	# specified by the user.
502*e8c5236aSIngo Weinhold	BuildHaikuImage $(image) :
503*e8c5236aSIngo Weinhold		$(HAIKU_IMAGE_INIT_VARIABLES_SCRIPT)
504*e8c5236aSIngo Weinhold		$(HAIKU_IMAGE_EARLY_USER_SCRIPTS)
505*e8c5236aSIngo Weinhold		$(HAIKU_IMAGE_MAKE_DIRS_SCRIPT)
506*e8c5236aSIngo Weinhold		$(HAIKU_IMAGE_COPY_FILES_SCRIPT)
507*e8c5236aSIngo Weinhold		$(HAIKU_IMAGE_EXTRACT_FILES_SCRIPT)
508*e8c5236aSIngo Weinhold		$(HAIKU_IMAGE_LATE_USER_SCRIPTS)
509*e8c5236aSIngo Weinhold		: $(isImage)
510*e8c5236aSIngo Weinhold		: $(isVMwareImage)
511*e8c5236aSIngo Weinhold	;
512*e8c5236aSIngo Weinhold
513*e8c5236aSIngo Weinhold	# remove the scripts we have generated
514*e8c5236aSIngo Weinhold	RmTemps $(image) :
515*e8c5236aSIngo Weinhold		$(HAIKU_IMAGE_INIT_VARIABLES_SCRIPT)
516*e8c5236aSIngo Weinhold		$(HAIKU_IMAGE_MAKE_DIRS_SCRIPT)
517*e8c5236aSIngo Weinhold		$(HAIKU_IMAGE_COPY_FILES_SCRIPT)
518*e8c5236aSIngo Weinhold		$(HAIKU_IMAGE_EXTRACT_FILES_SCRIPT)
519*e8c5236aSIngo Weinhold	;
520*e8c5236aSIngo Weinhold}
521*e8c5236aSIngo Weinhold
522*e8c5236aSIngo Weinhold# build the image
523*e8c5236aSIngo Weinhold_BuildHaikuImage $(HAIKU_IMAGE) : true ;
524*e8c5236aSIngo WeinholdNotFile haiku-image ;
525*e8c5236aSIngo WeinholdDepends haiku-image : $(HAIKU_IMAGE) ;
526*e8c5236aSIngo Weinhold
527*e8c5236aSIngo Weinhold
528*e8c5236aSIngo Weinhold# install Haiku into a directory
529*e8c5236aSIngo WeinholdNotFile install-haiku ;
530*e8c5236aSIngo Weinhold_BuildHaikuImage install-haiku : 0 ;
531*e8c5236aSIngo Weinhold
532*e8c5236aSIngo Weinhold
533*e8c5236aSIngo Weinhold# build the VMware image
534*e8c5236aSIngo WeinholdHAIKU_VMWARE_IMAGE_NAME ?= $(HAIKU_DEFAULT_VMWARE_IMAGE_NAME) ;
535*e8c5236aSIngo WeinholdHAIKU_VMWARE_IMAGE = $(HAIKU_VMWARE_IMAGE_NAME) ;
536*e8c5236aSIngo WeinholdMakeLocate $(HAIKU_VMWARE_IMAGE) : $(HAIKU_IMAGE_DIR) ;
537*e8c5236aSIngo Weinhold
538*e8c5236aSIngo Weinhold_BuildHaikuImage $(HAIKU_VMWARE_IMAGE) : true : true ;
539*e8c5236aSIngo WeinholdNotFile haiku-vmware-image ;
540*e8c5236aSIngo WeinholdDepends haiku-vmware-image : $(HAIKU_VMWARE_IMAGE) ;
541*e8c5236aSIngo Weinhold
542*e8c5236aSIngo Weinhold# Execute post-image user config rules.
543*e8c5236aSIngo WeinholdUserBuildConfigRulePostImage ;
544