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