HaikuImage revision 08104497
1# This file defines what ends up on the Haiku image (respectively in the Haiku
2# installation directory) and it executes the rules building the image
3# (respectively installing the files in the installation directory).
4
5
6SYSTEM_BIN = [ FFilterByBuildFeatures
7	"["
8	addattr alert arp
9	base64 basename bash bc beep bfsinfo
10	cal cat catattr checkfs checkitout chgrp chmod chop chown chroot cksum clear
11	clockconfig cmp collectcatkeys comm compress copyattr CortexAddOnHost cp
12	csplit cut date dc dd desklink df diff diff3 dircolors dirname
13	diskimage draggers driveinfo dstcheck du dumpcatalog
14	echo eject env error expand expr
15	factor false fdinfo ffm filepanel find finddir findpaths FirstBootPrompt fmt
16	fold fortune frcode fstrim ftp ftpd funzip fwcontrol@x86
17	gawk gdb@x86 getarch getlimits groupadd groupdel groupmod groups gzip gzexe
18	hd head hey hostname
19	id ident ifconfig <bin>install installsound iroster isvolume
20	ideinfo@ide idestatus@ide
21	join kernel_debugger keymap keystore kill
22	less lessecho lesskey link linkcatkeys listarea listattr listimage listdev
23	listport listres listsem listusb ln locale locate logger login logname ls
24	lsindex
25	mail2mbox makebootable mbox2mail md5sum merge message mimeset mkdos mkdir
26	mkfifo mkfs mkindex mktemp modifiers mount mount_nfs mountvolume mv
27	netcat netstat nl nohup notify nproc
28	od open
29	package package_repo passwd paste patch pathchk pc ping ping6 pkgman play
30	playfile playsound playwav pr prio printenv printf profile ps ptx pwd
31	query quit
32	rc readlink reindex release renice rlog rm rmattr rmindex rmdir roster
33	route
34	safemode screen_blanker screenmode screenshot sdiff setarch setdecor setmime
35	settype setversion setvolume seq sha1sum sha256sum shar shred shuf shutdown
36	sleep sort spamdbm split stat strace stty su sum sync sysinfo
37	tac tail tcpdump tcptester tee telnet telnetd test timeout top touch
38	tr traceroute translate trash true truncate tsort tty
39	uname unchop unexpand unmount uniq unlink unshar unzip unzipsfx
40	<bin>updatedb uptime urlwrapper useradd userdel uudecode uuencode
41	vdir version vmstat
42	waitfor watch wc wget whoami writembr@x86,x86_64 xargs xres
43	yes
44	zdiff zforce zgrep zip zipcloak <bin>zipgrep zipnote zipsplit zmore znew
45] ;
46
47SYSTEM_APPS = [ FFilterByBuildFeatures
48	AboutSystem ActivityMonitor BootManager@x86,x86_64 CDPlayer CharacterMap
49	CodyCam Debugger DeskCalc Devices DiskProbe DiskUsage DriveSetup
50	Expander GLInfo@mesa HaikuDepot Icon-O-Matic Installer LaunchBox 
51	Magnify Mail MediaConverter MediaPlayer MidiPlayer NetworkStatus
52	PackageInstaller People	PoorMan PowerStatus ProcessController 
53	Screenshot SerialConnect ShowImage SoundRecorder StyledEdit 
54	Terminal TextSearch TV WebWatch Workspaces
55] ;
56SYSTEM_PREFERENCES = [ FFilterByBuildFeatures
57	Appearance Backgrounds DataTranslations
58	<preference>Deskbar E-mail FileTypes Keyboard Keymap Locale Media
59	Mouse Network Notifications Printers Screen ScreenSaver
60	Shortcuts Sounds Time Touchpad <preference>Tracker VirtualMemory
61] ;
62SYSTEM_DEMOS = [ FFilterByBuildFeatures
63	BSnow Chart Clock Cortex FontDemo GLTeapot@mesa
64	$(HAIKU_INCLUDE_TRADEMARKS)Haiku3d@mesa Mandelbrot OverlayImage Pairs
65	PatchBay Playground Pulse Sudoku
66] ;
67
68
69rule HaikuImageGetSystemLibs
70{
71	return
72		# libs with special grist
73		[ MultiArchDefaultGristFiles libroot.so : revisioned ]
74		$(HAIKU_SHARED_LIBSTDC++_$(TARGET_PACKAGING_ARCH))
75		$(HAIKU_SHARED_LIBSUPC++_$(TARGET_PACKAGING_ARCH))
76		# libs with standard grist
77		[ MultiArchDefaultGristFiles [ FFilterByBuildFeatures
78			libbe.so libbsd.so libbnetapi.so
79			libdebug.so libdevice.so
80			libgame.so libglut.so@mesa
81			libgnu.so libmail.so libmedia.so libmidi.so libmidi2.so
82			libnetwork.so
83			libpackage.so
84			libscreensaver.so
85			libtextencoding.so libtiff.so libtracker.so libtranslation.so
86		] ]
87		;
88}
89
90
91rule HaikuImageGetPrivateSystemLibs
92{
93	return [ MultiArchDefaultGristFiles [ FFilterByBuildFeatures
94		libalm.so
95		libfluidsynth.so
96		libilmimf.so
97		libpackage-add-on-libsolv.so
98		libroot-addon-icu.so
99	] ] ;
100}
101
102
103SYSTEM_SERVERS = [ FFilterByBuildFeatures
104	app_server cddb_daemon debug_server dns_resolver_server input_server
105	keystore_server mail_daemon media_addon_server media_server midi_server
106	mount_server net_server nfs4_idmapper_server notification_server
107	package_daemon power_daemon print_server print_addon_server registrar
108	syslog_daemon
109] ;
110
111SYSTEM_NETWORK_DEVICES = ethernet loopback ;
112SYSTEM_NETWORK_DATALINK_PROTOCOLS = ethernet_frame <module>arp loopback_frame
113	ipv6_datagram ;
114#SYSTEM_NETWORK_PPP = ipcp modem pap pppoe ;
115SYSTEM_NETWORK_PROTOCOLS = ipv4 tcp udp icmp unix icmp6 ipv6 ;
116
117SYSTEM_ADD_ONS_ACCELERANTS = [ FFilterByBuildFeatures
118	x86,x86_64 @{
119		intel_810.accelerant intel_extreme.accelerant matrox.accelerant
120		nvidia.accelerant radeon.accelerant
121		radeon_hd.accelerant vesa.accelerant
122		#via.accelerant vmware.accelerant
123	}@ # x86,x86_64
124	x86 @{
125		3dfx.accelerant ati.accelerant neomagic.accelerant s3.accelerant
126	}@ # x86
127] ;
128SYSTEM_ADD_ONS_TRANSLATORS = BMPTranslator EXRTranslator GIFTranslator
129	HVIFTranslator ICOTranslator ICNSTranslator JPEGTranslator
130	JPEG2000Translator PCXTranslator PNGTranslator PPMTranslator PSDTranslator
131	RAWTranslator RTFTranslator SGITranslator STXTTranslator TGATranslator
132	TIFFTranslator WebPTranslator WonderBrushTranslator
133;
134SYSTEM_ADD_ONS_LOCALE_CATALOGS = <catalog-addon>plaintext ;
135SYSTEM_ADD_ONS_MEDIA = [ FFilterByBuildFeatures
136	cortex_audioadapter.media_addon
137	cortex_flanger.media_addon
138	dvb.media_addon@x86
139	hmulti_audio.media_addon
140	mixer.media_addon
141	opensound.media_addon
142	tone_producer_demo.media_addon
143	usb_webcam.media_addon
144	video_producer_demo.media_addon
145	video_window_demo.media_addon
146	firewire_dv.media_addon@x86
147	#legacy.media_addon
148	equalizer.media_addon
149	vst_host.media_addon
150] ;
151SYSTEM_ADD_ONS_MEDIA_PLUGINS = [ FFilterByBuildFeatures
152	ffmpeg@ffmpeg raw_decoder
153] ;
154SYSTEM_ADD_ONS_PRINT =
155	Canon\ LIPS3\ Compatible
156	Canon\ LIPS4\ Compatible
157	Gutenprint
158	PCL5\ Compatible
159	PCL6\ Compatible
160	PDF\ Writer
161	PS\ Compatible
162	Preview
163;
164SYSTEM_ADD_ONS_PRINT_TRANSPORT = HP\ JetDirect IPP LPR
165	# Parallel\ Port
166	Print\ To\ File Serial\ Port USB\ Port
167;
168SYSTEM_ADD_ONS_SCREENSAVERS = [ FFilterByBuildFeatures
169	Butterfly DebugNow Flurry@mesa
170	GLife@mesa $(HAIKU_INCLUDE_TRADEMARKS)Haiku Icons IFS Leaves
171	Message Spider Gravity@mesa
172] ;
173
174SYSTEM_ADD_ONS_DRIVERS_AUDIO = auich auvia echo3g emuxki hda ice1712 sis7018 ;
175SYSTEM_ADD_ONS_DRIVERS_AUDIO_OLD = ; #cmedia usb_audio ;
176SYSTEM_ADD_ONS_DRIVERS_GRAPHICS = [ FFilterByBuildFeatures
177	x86,x86_64 @{
178		intel_810 intel_extreme matrox nvidia radeon radeon_hd vesa
179		#via vmware
180	}@ # x86,x86_64
181	x86 @{
182		3dfx ati neomagic s3
183	}@ # x86
184] ;
185SYSTEM_ADD_ONS_DRIVERS_MIDI = emuxki ice1712 usb_midi ;
186SYSTEM_ADD_ONS_DRIVERS_NET = [ FFilterByBuildFeatures
187	x86,x86_64 @{
188		3com atheros813x ar81xx attansic_l1 attansic_l2 broadcom440x
189		broadcom570x dec21xxx ipro100 ipro1000 jmicron2x0 marvell_yukon nforce
190		pcnet rtl8139 rtl81xx sis19x syskonnect via_rhine vt612x
191	}@ # x86,x86_64
192
193	etherpci pegasus sis900 usb_davicom usb_asix usb_ecm wb840
194
195	# WLAN drivers
196	x86,x86_64 @{
197		aironetwifi atheroswifi broadcom43xx
198		iprowifi2100 iprowifi2200 iprowifi3945
199		iprowifi4965 marvell88w8363 marvell88w8335
200		ralinkwifi wavelanwifi
201	}@ # x86,x86_64
202
203	# WWAN drivers
204	#usb_beceemwmx@gpl
205] ;
206SYSTEM_ADD_ONS_DRIVERS_POWER = [ FFilterByBuildFeatures
207	acpi_battery@x86,x86_64 acpi_button@x86,x86_64
208] ;
209SYSTEM_ADD_ONS_BUS_MANAGERS = [ FFilterByBuildFeatures
210	ata@ata pci ps2@x86,x86_64 isa@x86,x86_64
211	ide@ide scsi config_manager agp_gart@x86,x86_64 usb firewire@x86
212	acpi@x86,x86_64	virtio random
213] ;
214SYSTEM_ADD_ONS_FILE_SYSTEMS = bfs bindfs btrfs cdda exfat ext2 fat iso9660 nfs
215	nfs4 attribute_overlay write_overlay ntfs packagefs reiserfs@x86 udf
216	googlefs ;
217
218
219# build the haiku system packages and add them
220include [ FDirName $(HAIKU_BUILD_RULES_DIR) HaikuPackages ] ;
221
222AddPackageFilesToHaikuImage system :
223	haiku_loader.hpkg
224	haiku.hpkg
225	haiku_$(TARGET_PACKAGING_ARCHS[2-]).hpkg
226	:
227	nameFromMetaInfo
228	;
229
230
231AddSymlinkToHaikuImage home Desktop : /boot/home : Home ;
232
233# Mailbox folders and symlink
234AddDirectoryToHaikuImage home mail draft ;
235AddDirectoryToHaikuImage home mail in ;
236AddDirectoryToHaikuImage home mail out ;
237
238# global settings when a package is installed in ~/config
239AddDirectoryToHaikuImage home config settings global ;
240
241
242# scripts and data files
243local userBootScripts = UserBootscript UserSetupEnvironment.sample ;
244SEARCH on $(userBootScripts) = [ FDirName $(HAIKU_TOP) data config boot ] ;
245AddFilesToHaikuImage home config settings boot : $(userBootScripts) ;
246
247# Add boot launch directory
248AddDirectoryToHaikuImage home config settings boot launch ;
249
250# Add mail provider infos.
251AddFilesToHaikuImage home config settings Mail ProviderInfo :
252	$(HAIKU_PROVIDER_INFOS) ;
253
254# Add Tracker New Templates
255AddFilesToHaikuImage home config settings Tracker "Tracker New Templates"
256	:
257	"<tracker-new-templates>C++ header"
258	"<tracker-new-templates>C++ source"
259	"<tracker-new-templates>makefile"
260	"<tracker-new-templates>text file"
261;
262
263local etcDir = [ FDirName $(HAIKU_TOP) data etc ] ;
264local etcFiles = inputrc profile ;
265etcFiles = $(etcFiles:G=etc) ;
266SEARCH on $(etcFiles) = $(etcDir) ;
267etcFiles += <etc>termcap <etc>sysless <etc>sysless.in ;
268AddFilesToHaikuImage system settings etc : $(etcFiles) ;
269
270local profileFiles = [ Glob $(etcDir)/profile.d : *.sh ] ;
271profileFiles = $(profileFiles:G=profile-d) ;
272AddDirectoryToHaikuImage system settings etc profile.d ;
273AddFilesToHaikuImage system settings etc profile.d : $(profileFiles) ;
274
275#local bashCompletionFiles = [ Glob $(etcDir)/bash_completion.d : * ] ;
276#local bashCompletionHelperFiles
277#    = [ Glob $(etcDir)/bash_completion.d/helpers : * ] ;
278#bashCompletionFiles = $(bashCompletionFiles:G=bash-completion) ;
279#bashCompletionHelperFiles = $(bashCompletionHelperFiles:G=bash-completion-hlp) ;
280#AddDirectoryToHaikuImage system etc bash_completion.d ;
281#AddDirectoryToHaikuImage system etc bash_completion.d helpers ;
282#AddFilesToHaikuImage system etc bash_completion.d : $(bashCompletionFiles) ;
283#AddFilesToHaikuImage system etc bash_completion.d helpers
284#    : $(bashCompletionHelperFiles) ;
285
286local driverSettingsFiles = <driver-settings>kernel ;
287SEARCH on $(driverSettingsFiles)
288	= [ FDirName $(HAIKU_TOP) data settings kernel drivers ] ;
289AddFilesToHaikuImage home config settings kernel drivers
290	: $(driverSettingsFiles) ;
291
292local networkSettingsFiles = <network-settings>services ;
293SEARCH on $(networkSettingsFiles)
294	= [ FDirName $(HAIKU_TOP) data settings network ] ;
295AddFilesToHaikuImage system settings network : $(networkSettingsFiles) ;
296
297# fresh install indicator file for the post install scripts
298SEARCH on <post-install>fresh_install
299	= [ FDirName $(HAIKU_TOP) data system settings ] ;
300AddFilesToHaikuImage system settings : <post-install>fresh_install ;
301
302# decorators
303#AddFilesToHaikuImage system non-packaged add-ons decorators
304#	: BeDecorator MacDecorator WinDecorator ;
305
306# printers
307AddDirectoryToHaikuImage home config settings printers Preview
308	: home-config-settings-printers-preview.rdef ;
309AddDirectoryToHaikuImage home config settings printers "Save as PDF"
310	: home-config-settings-printers-save-as-pdf.rdef ;
311
312# dvb channel settings
313CopyDirectoryToHaikuImage home config settings Media
314	: [ FDirName $(HAIKU_TOP) data settings media dvb ]
315	: dvb : -x Jamfile ;
316
317# repository config and cache files
318local repositories = $(HAIKU_REPOSITORIES) ;
319if $(HAIKU_ADD_HAIKU_REPOSITORY_CONFIG) {
320	repositories += <repository>haiku ;
321}
322local repository ;
323for repository in $(repositories) {
324	local config = [ on $(repository) return $(HAIKU_REPOSITORY_CONFIG_FILE) ] ;
325	local cache = [ on $(repository) return $(HAIKU_REPOSITORY_CACHE_FILE) ] ;
326	if $(HAIKU_UPDATE_ALL_PACKAGES) {
327		HAIKU_INCLUDE_IN_IMAGE on $(config) $(cache) = 1 ;
328	}
329	AddFilesToHaikuImage system settings package-repositories
330		: $(config) : $(repository:G=) ;
331	AddFilesToHaikuImage system cache package-repositories
332		: $(cache) : $(repository:G=) ;
333}
334
335
336include [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuImageCommon ] ;
337