xref: /haiku/build/jam/packages/Haiku (revision 6f80a9801fedbe7355c4360bd204ba746ec3ec2d)
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# bootloaders
29local bootTarget ;
30for bootTarget in $(HAIKU_BOOT_TARGETS) {
31	AddFilesToPackage data platform_loaders : haiku_loader.$(bootTarget) ;
32}
33
34# modules
35AddFilesToPackage add-ons kernel bus_managers : $(SYSTEM_ADD_ONS_BUS_MANAGERS) ;
36AddFilesToPackage add-ons kernel busses agp_gart : <agp_gart>intel@x86,x86_64 ;
37
38AddFilesToPackage add-ons kernel busses ata
39	: generic_ide_pci it8211 legacy_sata silicon_image_3112 highpoint_ide_pci ide_isa@x86 ;
40
41AddFilesToPackage add-ons kernel busses i2c : pch_i2c@x86,x86_64 ;
42AddFilesToPackage add-ons kernel busses mmc : sdhci_pci ;
43AddFilesToPackage add-ons kernel busses random : virtio_rng ;
44AddFilesToPackage add-ons kernel busses scsi : ahci virtio_scsi ;
45AddFilesToPackage add-ons kernel busses usb : <usb>uhci <usb>ohci <usb>ehci
46	<usb>xhci ;
47AddFilesToPackage add-ons kernel busses virtio : virtio_mmio@riscv64,arm,arm64
48	virtio_pci ;
49AddFilesToPackage add-ons kernel console : vga_text ;
50AddFilesToPackage add-ons kernel debugger
51	: <kdebug>demangle <kdebug>disasm@x86,x86_64 <kdebug>hangman
52	  <kdebug>invalidate_on_exit <kdebug>usb_keyboard <kdebug>qrencode@libqrencode
53	  <kdebug>run_on_exit ;
54AddFilesToPackage add-ons kernel file_systems : $(SYSTEM_ADD_ONS_FILE_SYSTEMS) ;
55AddFilesToPackage add-ons kernel generic
56	: ata_adapter bios@x86,x86_64 dpc
57		locked_pool mpu401 scsi_periph smbios@x86,x86_64 <module>tty ;
58AddFilesToPackage add-ons kernel partitioning_systems
59	: amiga_rdb@m68k apple@ppc sun@sparc efi_gpt intel session ;
60AddFilesToPackage add-ons kernel interrupt_controllers : openpic@ppc ;
61AddFilesToPackage add-ons kernel power cpufreq : intel_pstates@x86,x86_64 ;
62AddFilesToPackage add-ons kernel power cpuidle : intel_cstates@x86,x86_64 ;
63
64if $(TARGET_ARCH) = x86 || $(TARGET_ARCH) = x86_64 {
65	AddFilesToPackage add-ons kernel cpu : generic_x86 ;
66}
67
68# drivers
69AddNewDriversToPackage 				: wmi@x86,x86_64 ;
70AddNewDriversToPackage disk			: nvme_disk ;
71AddNewDriversToPackage disk mmc		: mmc_disk ;
72AddNewDriversToPackage disk scsi	: scsi_cd scsi_disk ;
73AddNewDriversToPackage disk virtual : virtio_block ram_disk ;
74AddNewDriversToPackage power		: $(SYSTEM_ADD_ONS_DRIVERS_POWER) ;
75AddNewDriversToPackage sensor		: $(SYSTEM_ADD_ONS_DRIVERS_SENSOR) ;
76AddNewDriversToPackage network		: virtio_net ;
77AddNewDriversToPackage input		: virtio_input ;
78#AddNewDriversToPackage display		: display_adapter@x86 ;
79
80# legacy drivers
81AddDriversToPackage					: console dprintf null <driver>tty usb_modeswitch zero ;
82AddDriversToPackage audio hmulti	: $(SYSTEM_ADD_ONS_DRIVERS_AUDIO) ;
83AddDriversToPackage audio old		: $(SYSTEM_ADD_ONS_DRIVERS_AUDIO_OLD) ;
84AddDriversToPackage bluetooth h2	: $(SYSTEM_ADD_ONS_DRIVERS_BT_H2) ;
85AddDriversToPackage midi			: $(SYSTEM_ADD_ONS_DRIVERS_MIDI) ;
86AddDriversToPackage bus				: usb_raw ;
87AddDriversToPackage disk usb		: usb_disk ;
88AddDriversToPackage disk virtual	: nbd ;
89AddDriversToPackage dvb				: cx23882 ;
90AddDriversToPackage graphics		: $(SYSTEM_ADD_ONS_DRIVERS_GRAPHICS) ;
91AddDriversToPackage input			: ps2_hid usb_hid wacom ;
92AddDriversToPackage misc			: <driver>poke <driver>mem ;
93AddDriversToPackage net				: $(SYSTEM_ADD_ONS_DRIVERS_NET) ;
94AddDriversToPackage ports			: pc_serial usb_serial ;
95
96# kernel
97AddFilesToPackage : <revisioned>kernel_$(TARGET_ARCH) ;
98
99# libs
100AddLibrariesToPackage lib
101	: [ HaikuImageGetSystemLibs ] [ HaikuImageGetPrivateSystemLibs ] ;
102
103# libnetwork.so replaces quite a few libraries
104if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) = 1 {
105	local libNetworkAliases = libsocket.so libbind.so libnet.so ;
106	local lib ;
107	for lib in $(libNetworkAliases) {
108		AddSymlinkToPackage lib : libnetwork.so : $(lib) ;
109	}
110
111	AddSymlinkToPackage lib : libbnetapi.so : libnetapi.so ;
112}
113
114
115# trusted keys
116SEARCH on haiku-2019.pub = [ FDirName $(HAIKU_TOP) data trust_db ] ;
117AddFilesToPackage data trust_db : haiku-2019.pub ;
118
119# servers
120AddFilesToPackage servers : $(SYSTEM_SERVERS) ;
121
122# apps
123AddFilesToPackage				: runtime_loader Deskbar Tracker ;
124AddFilesToPackage bin			: $(SYSTEM_BIN) consoled ;
125AddFilesToPackage apps			: $(SYSTEM_APPS) ;
126AddFilesToPackage preferences	: $(SYSTEM_PREFERENCES) ;
127AddFilesToPackage demos			: $(SYSTEM_DEMOS) ;
128
129SEARCH on install-wifi-firmwares.sh = [ FDirName $(HAIKU_TOP) data bin ] ;
130AddFilesToPackage bin : install-wifi-firmwares.sh ;
131
132AddSymlinkToPackage bin : trash : untrash ;
133AddSymlinkToPackage bin : less : more ;
134
135# scripts and data files
136local bootScripts = PostInstallScript SetupEnvironment ;
137SEARCH on $(bootScripts) = [ FDirName $(HAIKU_TOP) data system boot ] ;
138AddFilesToPackage boot : $(bootScripts) ;
139
140local launchScripts = <data!launch>system ;
141SEARCH on $(launchScripts) = [ FDirName $(HAIKU_TOP) data launch ] ;
142AddFilesToPackage data launch : $(launchScripts) ;
143
144local userLaunchScripts = <data!launch>user ;
145SEARCH on $(userLaunchScripts) = [ FDirName $(HAIKU_TOP) data launch ] ;
146AddFilesToPackage data user_launch : $(userLaunchScripts) ;
147
148# first login scripts
149local firstLoginFiles = default_deskbar_items.sh ;
150firstLoginFiles = $(firstLoginFiles:G=first-login) ;
151SEARCH on $(firstLoginFiles)
152	= [ FDirName $(HAIKU_TOP) data system boot first_login ] ;
153AddFilesToPackage boot first-login : $(firstLoginFiles) ;
154
155# artwork and sounds
156local logoArtwork =
157	$(HAIKU_INCLUDE_TRADEMARKS)"HAIKU logo - white on blue - big.png"
158	$(HAIKU_INCLUDE_TRADEMARKS)"HAIKU logo - white on blue - normal.png" ;
159SEARCH on $(logoArtwork) = [ FDirName $(HAIKU_TOP) data artwork ] ;
160AddFilesToPackage data artwork : $(logoArtwork) ;
161
162# Mail spell check dictionaries
163local spellFiles = words geekspeak ;
164spellFiles = $(spellFiles:G=spell) ;
165SEARCH on $(spellFiles) = [ FDirName $(HAIKU_TOP) src apps mail ] ;
166AddFilesToPackage data spell_check word_dictionary : $(spellFiles) ;
167
168local fortuneFiles = [ Glob $(HAIKU_TOP)/data/system/data/fortunes
169	: [a-zA-Z0-9]* ] ;
170fortuneFiles = $(fortuneFiles:G=data!fortunes) ;
171AddFilesToPackage data fortunes : $(fortuneFiles) ;
172
173local fontDir = [ FDirName $(HAIKU_TOP) data system data fonts ] ;
174local psFonts = [ Glob $(fontDir)/psfonts : *.afm *.pfb ] ;
175AddFilesToPackage data fonts psfonts : $(psFonts) ;
176
177# keymaps
178AddFilesToPackage data Keymaps : $(HAIKU_KEYMAP_FILES) ;
179local keymapAlias ;
180for keymapAlias in $(HAIKU_KEYMAP_ALIASES) {
181	local aliasedTo = [ on $(keymapAlias) return $(HAIKU_KEYMAP_FILE) ] ;
182	AddSymlinkToPackage data Keymaps : $(aliasedTo:BSM) : $(keymapAlias:BSM) ;
183}
184
185# keyboard layouts
186AddFilesToPackage data KeyboardLayouts
187	: $(HAIKU_KEYBOARD_LAYOUT_FILES) ;
188AddFilesToPackage data KeyboardLayouts Apple\ Aluminum
189	: $(HAIKU_APPLE_ALUMINUM_KEYBOARD_LAYOUT_FILES) ;
190AddFilesToPackage data KeyboardLayouts ThinkPad
191	: $(HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES) ;
192
193# boot module links
194AddBootModuleSymlinksToPackage
195	acpi@x86,x86_64 ahci ata ata_adapter
196	bfs
197	dpc
198	efi_gpt
199	generic_ide_pci
200	ide_isa@x86 isa@x86,x86_64 intel it8211
201	legacy_sata locked_pool
202	mmc mmc_disk
203	nvme_disk
204	openpic@ppc
205	packagefs pci
206	fdt@riscv64,arm
207	scsi scsi_cd scsi_disk scsi_periph silicon_image_3112 highpoint_ide_pci
208	sdhci_pci
209	usb usb_disk <usb>ehci <usb>ohci <usb>uhci <usb>xhci
210	virtio virtio_block virtio_mmio@riscv64,arm,arm64 virtio_pci virtio_scsi
211;
212
213# add-ons
214AddFilesToPackage add-ons accelerants	: $(SYSTEM_ADD_ONS_ACCELERANTS) ;
215AddFilesToPackage add-ons locale catalogs : $(SYSTEM_ADD_ONS_LOCALE_CATALOGS) ;
216
217AddFilesToPackage add-ons mail_daemon inbound_protocols		: POP3
218	IMAP ;
219AddFilesToPackage add-ons mail_daemon outbound_protocols 	: SMTP ;
220AddFilesToPackage add-ons mail_daemon inbound_filters
221	: MatchHeader SpamFilter NewMailNotification ;
222AddFilesToPackage add-ons mail_daemon outbound_filters		: Fortune ;
223
224AddFilesToPackage add-ons media : $(SYSTEM_ADD_ONS_MEDIA) ;
225
226AddFilesToPackage add-ons Network\ Settings
227	: IPv4Interface IPv6Interface DNSClientService Hostname FTPService SSHService
228		TelnetService ;
229
230AddFilesToPackage add-ons Tracker
231	: FileType Mark\ as… Mark\ as\ Read Open\ Target\ Folder
232		Open\ Terminal ZipOMatic ;
233AddSymlinkToPackage add-ons Tracker
234	: /boot/system/preferences/Backgrounds : Background ;
235AddSymlinkToPackage add-ons Tracker
236	: /boot/system/apps/TextSearch : TextSearch ;
237AddSymlinkToPackage add-ons Tracker
238	: /boot/system/apps/DiskUsage : DiskUsage ;
239
240AddFilesToPackage add-ons input_server devices
241	: <input>keyboard <input>mouse <input>tablet <input>virtio <input>wacom ;
242AddFilesToPackage add-ons input_server filters
243	: padblocker screen_saver shortcut_catcher switch_workspace ;
244AddDirectoryToPackage add-ons input_server methods ;
245
246AddFilesToPackage add-ons kernel network : <net>notifications stack ;
247AddFilesToPackage add-ons kernel network : dns_resolver ;
248AddFilesToPackage add-ons kernel network devices : $(SYSTEM_NETWORK_DEVICES) ;
249AddFilesToPackage add-ons kernel network datalink_protocols
250	: $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ;
251AddFilesToPackage add-ons kernel network ppp : $(SYSTEM_NETWORK_PPP) ;
252AddFilesToPackage add-ons kernel network protocols
253	: $(SYSTEM_NETWORK_PROTOCOLS) ;
254
255AddFilesToPackage add-ons Print : $(SYSTEM_ADD_ONS_PRINT) ;
256AddFilesToPackage add-ons Print transport
257	: $(SYSTEM_ADD_ONS_PRINT_TRANSPORT) ;
258AddFilesToPackage add-ons Screen\ Savers : $(SYSTEM_ADD_ONS_SCREENSAVERS) ;
259
260AddFilesToPackage add-ons disk_systems
261	: <disk_system>fat <disk_system>intel <disk_system>gpt <disk_system>bfs
262		<disk_system>ntfs ;
263
264# Kernel bluetooth stack
265AddFilesToPackage add-ons kernel bluetooth : $(SYSTEM_BT_STACK) ;
266
267# the MIME DB
268CopyDirectoryToPackage data : <mimedb>mime_db : : : isTarget ;
269
270# directory attributes
271AddDirectoryToPackage apps : system-apps.rdef ;
272AddDirectoryToPackage preferences : system-preferences.rdef ;
273
274# Deskbar menu symlinks
275
276local linkTarget ;
277
278# "Applications" links
279AddDirectoryToPackage data deskbar menu Applications
280	: deskbar-applications.rdef ;
281for linkTarget in $(DESKBAR_APPLICATIONS) {
282	AddSymlinkToPackage data deskbar menu Applications
283		: ../../../../apps/$(linkTarget) : $(linkTarget) ;
284}
285
286# "Desktop applets" links
287AddDirectoryToPackage data deskbar menu Desktop\ applets
288	: deskbar-applets.rdef ;
289for linkTarget in $(DESKBAR_DESKTOP_APPLETS) {
290	AddSymlinkToPackage data deskbar menu Desktop\ applets
291		: ../../../../apps/$(linkTarget) : $(linkTarget) ;
292}
293
294# "Preferences" links
295AddDirectoryToPackage data deskbar menu Preferences
296	: deskbar-preferences.rdef ;
297DESKBAR_PREFERENCES = $(SYSTEM_PREFERENCES:B) ;
298for linkTarget in $(DESKBAR_PREFERENCES) {
299	AddSymlinkToPackage data deskbar menu Preferences
300		: ../../../../preferences/$(linkTarget)
301		: $(linkTarget) ;
302}
303
304# "Demo" links
305AddDirectoryToPackage data deskbar menu Demos
306	: deskbar-demos.rdef ;
307for linkTarget in $(SYSTEM_DEMOS) {
308	AddSymlinkToPackage data deskbar menu Demos
309		: ../../../../demos/$(linkTarget) : $(linkTarget) ;
310}
311
312# Deskbar menu entries file
313AddFilesToPackage data deskbar : <deskbar>menu_entries ;
314
315# licenses
316CopyDirectoryToPackage data
317	: [ FDirName $(HAIKU_TOP) data system data licenses ]
318	: licenses ;
319
320# netresolv support files
321CopyDirectoryToPackage data
322	: [ FDirName $(HAIKU_TOP) data system data network ]
323	: network ;
324
325# Copy documentation as per DiskUsage's license requirement.
326CopyDirectoryToPackage documentation
327	: [ FDirName $(HAIKU_TOP) docs apps diskusage ]
328	: diskusage ;
329
330
331# empty directory
332AddDirectoryToPackage data empty ;
333
334
335BuildHaikuPackage $(haikuPackage) : haiku ;
336