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