xref: /haiku/build/jam/packages/HaikuBootstrap (revision ed24eb5ff12640d052171c6a7feba37fab8a75d1)
1local architecture = $(HAIKU_PACKAGING_ARCHS[1]) ;
2
3
4local haikuPackage = haiku.hpkg ;
5HaikuPackage $(haikuPackage) ;
6
7
8# modules
9AddFilesToPackage add-ons kernel bus_managers : $(SYSTEM_ADD_ONS_BUS_MANAGERS) ;
10AddFilesToPackage add-ons kernel busses agp_gart : <agp_gart>intel@x86,x86_64 ;
11
12AddFilesToPackage add-ons kernel busses ata
13	: generic_ide_pci it8211 legacy_sata silicon_image_3112 highpoint_ide_pci ide_isa@x86 ;
14
15AddFilesToPackage add-ons kernel busses scsi : ahci virtio_scsi ;
16AddFilesToPackage add-ons kernel busses usb : <usb>uhci <usb>ohci <usb>ehci ;
17AddFilesToPackage add-ons kernel busses virtio : virtio_pci ;
18AddFilesToPackage add-ons kernel console : vga_text ;
19AddFilesToPackage add-ons kernel debugger
20	: <kdebug>demangle <kdebug>disasm@x86 #<kdebug>hangman
21	  <kdebug>invalidate_on_exit <kdebug>usb_keyboard
22	  <kdebug>run_on_exit ;
23AddFilesToPackage add-ons kernel file_systems : $(SYSTEM_ADD_ONS_FILE_SYSTEMS) ;
24AddFilesToPackage add-ons kernel generic
25	: ata_adapter bios@x86,x86_64 dpc
26		locked_pool mpu401 scsi_periph <module>tty ;
27AddFilesToPackage add-ons kernel partitioning_systems
28	: amiga_rdb@m68k apple@ppc efi_gpt intel session ;
29AddFilesToPackage add-ons kernel interrupt_controllers : openpic@ppc ;
30AddFilesToPackage add-ons kernel power cpufreq : intel_pstates@x86,x86_64 ;
31AddFilesToPackage add-ons kernel power cpuidle : intel_cstates@x86,x86_64 ;
32
33if $(TARGET_ARCH) = x86 || $(TARGET_ARCH) = x86_64 {
34	AddFilesToPackage add-ons kernel cpu : generic_x86 ;
35}
36
37# drivers
38AddNewDriversToPackage disk scsi	: scsi_cd scsi_disk ;
39AddNewDriversToPackage disk virtual	: ram_disk virtio_block ;
40AddNewDriversToPackage power		: acpi_battery@x86 ;
41AddNewDriversToPackage network		: virtio_net ;
42#AddNewDriversToPackage display		: display_adapter@x86 ;
43
44# legacy drivers
45AddDriversToPackage					: console dprintf null random <driver>tty
46										zero ;
47AddDriversToPackage audio hmulti	: $(SYSTEM_ADD_ONS_DRIVERS_AUDIO) ;
48AddDriversToPackage audio old		: $(SYSTEM_ADD_ONS_DRIVERS_AUDIO_OLD) ;
49AddDriversToPackage midi			: $(SYSTEM_ADD_ONS_DRIVERS_MIDI) ;
50AddDriversToPackage bus				: usb_raw ;
51AddDriversToPackage disk usb		: usb_disk ;
52AddDriversToPackage disk virtual	: nbd ;
53AddDriversToPackage graphics		: $(SYSTEM_ADD_ONS_DRIVERS_GRAPHICS) ;
54AddDriversToPackage input			: ps2_hid usb_hid wacom ;
55AddDriversToPackage misc			: <driver>poke <driver>mem ;
56AddDriversToPackage net				: $(SYSTEM_ADD_ONS_DRIVERS_NET) ;
57AddDriversToPackage ports			: pc_serial usb_serial ;
58AddDriversToPackage power			: $(SYSTEM_ADD_ONS_DRIVERS_POWER) ;
59
60# kernel
61AddFilesToPackage : <revisioned>kernel_$(TARGET_ARCH) ;
62
63# libs
64AddLibrariesToPackage lib
65	: [ HaikuImageGetSystemLibs ] [ HaikuImageGetPrivateSystemLibs ] ;
66
67# libnetwork.so replaces quite a few libraries
68if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) = 1 {
69	local libNetworkAliases = libsocket.so libbind.so libnet.so ;
70	local lib ;
71	for lib in $(libNetworkAliases) {
72		AddSymlinkToPackage lib : libnetwork.so : $(lib) ;
73	}
74
75	AddSymlinkToPackage lib : libbnetapi.so : libnetapi.so ;
76}
77
78
79# servers
80AddFilesToPackage servers : $(SYSTEM_SERVERS) ;
81
82# apps
83AddFilesToPackage				: runtime_loader Deskbar Tracker ;
84AddFilesToPackage bin			: $(SYSTEM_BIN) consoled ;
85AddFilesToPackage apps			: $(SYSTEM_APPS) ;
86AddFilesToPackage preferences	: $(SYSTEM_PREFERENCES) ;
87AddFilesToPackage demos			: $(SYSTEM_DEMOS) ;
88
89SEARCH on install-wifi-firmwares.sh = [ FDirName $(HAIKU_TOP) data bin ] ;
90AddFilesToPackage bin : install-wifi-firmwares.sh ;
91
92AddSymlinkToPackage bin : trash : untrash ;
93AddSymlinkToPackage bin : less : more ;
94
95# scripts and data files
96local bootScripts = PostInstallScript SetupEnvironment ;
97SEARCH on $(bootScripts) = [ FDirName $(HAIKU_TOP) data system boot ] ;
98AddFilesToPackage boot : $(bootScripts) ;
99
100local launchScripts = <data!launch>system ;
101SEARCH on $(launchScripts) = [ FDirName $(HAIKU_TOP) data launch ] ;
102AddFilesToPackage data launch : $(launchScripts) ;
103
104local userLaunchScripts = <data!launch>user <data!launch>bootstrap ;
105SEARCH on $(userLaunchScripts) = [ FDirName $(HAIKU_TOP) data launch ] ;
106AddFilesToPackage data user_launch : $(userLaunchScripts) ;
107
108# first login scripts
109local firstLoginFiles = default_deskbar_items.sh ;
110firstLoginFiles = $(firstLoginFiles:G=first-login) ;
111SEARCH on $(firstLoginFiles)
112	= [ FDirName $(HAIKU_TOP) data system boot first_login ] ;
113AddFilesToPackage boot first_login : $(firstLoginFiles) ;
114
115local fortuneFiles = [ Glob $(HAIKU_TOP)/data/system/data/fortunes
116	: [a-zA-Z0-9]* ] ;
117fortuneFiles = $(fortuneFiles:G=data!fortunes) ;
118AddFilesToPackage data fortunes : $(fortuneFiles) ;
119
120local fontDir = [ FDirName $(HAIKU_TOP) data system data fonts ] ;
121local psFonts = [ Glob $(fontDir)/psfonts : *.afm *.pfb ] ;
122AddFilesToPackage data fonts psfonts : $(psFonts) ;
123
124# keymaps
125AddFilesToPackage data Keymaps : $(HAIKU_KEYMAP_FILES) ;
126local keymapAlias ;
127for keymapAlias in $(HAIKU_KEYMAP_ALIASES) {
128	local aliasedTo = [ on $(keymapAlias) return $(HAIKU_KEYMAP_FILE) ] ;
129	AddSymlinkToPackage data Keymaps : $(aliasedTo:BSM) : $(keymapAlias:BSM) ;
130}
131
132# keyboard layouts
133AddFilesToPackage data KeyboardLayouts
134	: $(HAIKU_KEYBOARD_LAYOUT_FILES) ;
135AddFilesToPackage data KeyboardLayouts Apple\ Aluminum
136	: $(HAIKU_APPLE_ALUMINUM_KEYBOARD_LAYOUT_FILES) ;
137AddFilesToPackage data KeyboardLayouts ThinkPad
138	: $(HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES) ;
139
140# terminal themes
141local terminalThemes = [ Glob $(HAIKU_TOP)/data/system/data/terminal_themes : "[a-zA-Z0-9 ]*" ] ;
142AddFilesToPackage data Terminal Themes : $(terminalThemes) ;
143
144# boot module links
145AddBootModuleSymlinksToPackage
146	acpi@x86,x86_64 ata pci isa@x86,x86_64 dpc
147	scsi usb
148	openpic@ppc
149	ata_adapter locked_pool scsi_periph
150	ahci generic_ide_pci it8211 legacy_sata silicon_image_3112
151	highpoint_ide_pci
152	ide_isa@x86
153	<usb>uhci <usb>ohci <usb>ehci
154	scsi_cd scsi_disk usb_disk
155	virtio virtio_pci virtio_block virtio_scsi
156	efi_gpt
157	intel
158	bfs packagefs
159;
160
161# add-ons
162AddFilesToPackage add-ons accelerants	: $(SYSTEM_ADD_ONS_ACCELERANTS) ;
163AddFilesToPackage add-ons Translators	: $(SYSTEM_ADD_ONS_TRANSLATORS) ;
164AddFilesToPackage add-ons locale catalogs : $(SYSTEM_ADD_ONS_LOCALE_CATALOGS) ;
165
166AddFilesToPackage add-ons Tracker
167	: FileType Mark\ as… Mark\ as\ Read Open\ Target\ Folder
168		Open\ Terminal ZipOMatic ;
169AddSymlinkToPackage add-ons Tracker
170	: /boot/system/preferences/Backgrounds : Background-B ;
171AddSymlinkToPackage add-ons Tracker
172	: /boot/system/apps/TextSearch : TextSearch-G ;
173AddSymlinkToPackage add-ons Tracker
174	: /boot/system/apps/DiskUsage : DiskUsage-I ;
175
176AddFilesToPackage add-ons input_server devices
177	: <input>keyboard <input>mouse <input>tablet <input>wacom ;
178AddFilesToPackage add-ons input_server filters
179	: switch_workspace ;
180
181AddFilesToPackage add-ons kernel network : <net>notifications stack ;
182AddFilesToPackage add-ons kernel network : dns_resolver ;
183AddFilesToPackage add-ons kernel network devices : $(SYSTEM_NETWORK_DEVICES) ;
184AddFilesToPackage add-ons kernel network datalink_protocols
185	: $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ;
186AddFilesToPackage add-ons kernel network ppp : $(SYSTEM_NETWORK_PPP) ;
187AddFilesToPackage add-ons kernel network protocols
188	: $(SYSTEM_NETWORK_PROTOCOLS) ;
189
190AddFilesToPackage add-ons disk_systems
191	: <disk_system>intel <disk_system>gpt <disk_system>bfs <disk_system>ntfs ;
192
193
194# the MIME DB
195CopyDirectoryToPackage data : <mimedb>mime_db : : : isTarget ;
196
197
198# Deskbar menu symlinks
199
200# "Applications" links
201DESKBAR_APPLICATIONS = ActivityMonitor CharacterMap DeskCalc
202	Devices DiskProbe DriveSetup DiskUsage Expander Installer
203	StyledEdit Terminal
204;
205local linkTarget ;
206for linkTarget in $(DESKBAR_APPLICATIONS) {
207	AddSymlinkToPackage data deskbar menu Applications
208		: ../../../../apps/$(linkTarget) : $(linkTarget) ;
209}
210
211# "Desktop applets" links
212DESKBAR_DESKTOP_APPLETS = LaunchBox NetworkStatus PowerStatus ProcessController
213	Workspaces
214;
215for linkTarget in $(DESKBAR_DESKTOP_APPLETS) {
216	AddSymlinkToPackage data deskbar menu Desktop\ applets
217		: ../../../../apps/$(linkTarget) : $(linkTarget) ;
218}
219
220# "Preferences" links
221AddDirectoryToPackage data deskbar menu Preferences ;
222DESKBAR_PREFERENCES = $(SYSTEM_PREFERENCES:B) ;
223for linkTarget in $(DESKBAR_PREFERENCES) {
224	AddSymlinkToPackage data deskbar menu Preferences
225		: ../../../../preferences/$(linkTarget)
226		: $(linkTarget) ;
227}
228
229# Deskbar menu entries file
230AddFilesToPackage data deskbar : <deskbar>menu_entries ;
231
232
233# licenses
234CopyDirectoryToPackage data
235	: [ FDirName $(HAIKU_TOP) data system data licenses ]
236	: licenses ;
237
238# netresolv support files
239CopyDirectoryToPackage data
240	: [ FDirName $(HAIKU_TOP) data system data network ]
241	: network ;
242
243# Copy documentation as per DiskUsage's license requirement.
244CopyDirectoryToPackage documentation
245	: [ FDirName $(HAIKU_TOP) docs apps diskusage ]
246	: diskusage ;
247
248
249BuildHaikuPackage $(haikuPackage) : haiku ;
250