xref: /haiku/build/jam/packages/Haiku (revision 3d4afef9cba2f328e238089d4609d00d4b1524f3)
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@x86,x86_64 ;
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 floppy		: pc_floppy@x86 ;
88AddDriversToPackage disk usb		: usb_disk ;
89AddDriversToPackage disk virtual	: nbd ;
90AddDriversToPackage dvb				: cx23882 ;
91AddDriversToPackage graphics		: $(SYSTEM_ADD_ONS_DRIVERS_GRAPHICS) ;
92AddDriversToPackage input			: ps2_hid usb_hid wacom ;
93AddDriversToPackage misc			: <driver>poke <driver>mem ;
94AddDriversToPackage net				: $(SYSTEM_ADD_ONS_DRIVERS_NET) ;
95AddDriversToPackage ports			: pc_serial usb_serial ;
96
97# kernel
98AddFilesToPackage : <revisioned>kernel_$(TARGET_ARCH) ;
99
100# libs
101AddLibrariesToPackage lib
102	: [ HaikuImageGetSystemLibs ] [ HaikuImageGetPrivateSystemLibs ] ;
103
104# libnetwork.so replaces quite a few libraries
105if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) = 1 {
106	local libNetworkAliases = libsocket.so libbind.so libnet.so ;
107	local lib ;
108	for lib in $(libNetworkAliases) {
109		AddSymlinkToPackage lib : libnetwork.so : $(lib) ;
110	}
111
112	AddSymlinkToPackage lib : libbnetapi.so : libnetapi.so ;
113}
114
115
116# trusted keys
117SEARCH on haiku-2019.pub = [ FDirName $(HAIKU_TOP) data trust_db ] ;
118AddFilesToPackage data trust_db : haiku-2019.pub ;
119
120# servers
121AddFilesToPackage servers : $(SYSTEM_SERVERS) ;
122
123# apps
124AddFilesToPackage				: runtime_loader Deskbar Tracker ;
125AddFilesToPackage bin			: $(SYSTEM_BIN) consoled ;
126AddFilesToPackage apps			: $(SYSTEM_APPS) ;
127AddFilesToPackage preferences	: $(SYSTEM_PREFERENCES) ;
128AddFilesToPackage demos			: $(SYSTEM_DEMOS) ;
129
130SEARCH on install-wifi-firmwares.sh = [ FDirName $(HAIKU_TOP) data bin ] ;
131AddFilesToPackage bin : install-wifi-firmwares.sh ;
132
133AddSymlinkToPackage bin : trash : untrash ;
134AddSymlinkToPackage bin : less : more ;
135
136# scripts and data files
137local bootScripts = PostInstallScript SetupEnvironment ;
138SEARCH on $(bootScripts) = [ FDirName $(HAIKU_TOP) data system boot ] ;
139AddFilesToPackage boot : $(bootScripts) ;
140
141local launchScripts = <data!launch>system ;
142SEARCH on $(launchScripts) = [ FDirName $(HAIKU_TOP) data launch ] ;
143AddFilesToPackage data launch : $(launchScripts) ;
144
145local userLaunchScripts = <data!launch>user ;
146SEARCH on $(userLaunchScripts) = [ FDirName $(HAIKU_TOP) data launch ] ;
147AddFilesToPackage data user_launch : $(userLaunchScripts) ;
148
149# first login scripts
150local firstLoginFiles = default_deskbar_items.sh ;
151firstLoginFiles = $(firstLoginFiles:G=first-login) ;
152SEARCH on $(firstLoginFiles)
153	= [ FDirName $(HAIKU_TOP) data system boot first_login ] ;
154AddFilesToPackage boot first-login : $(firstLoginFiles) ;
155
156# artwork and sounds
157local logoArtwork =
158	$(HAIKU_INCLUDE_TRADEMARKS)"HAIKU logo - white on blue - big.png"
159	$(HAIKU_INCLUDE_TRADEMARKS)"HAIKU logo - white on blue - normal.png" ;
160SEARCH on $(logoArtwork) = [ FDirName $(HAIKU_TOP) data artwork ] ;
161AddFilesToPackage data artwork : $(logoArtwork) ;
162
163# Mail spell check dictionaries
164local spellFiles = words geekspeak ;
165spellFiles = $(spellFiles:G=spell) ;
166SEARCH on $(spellFiles) = [ FDirName $(HAIKU_TOP) src apps mail ] ;
167AddFilesToPackage data spell_check word_dictionary : $(spellFiles) ;
168
169local fortuneFiles = [ Glob $(HAIKU_TOP)/data/system/data/fortunes
170	: [a-zA-Z0-9]* ] ;
171fortuneFiles = $(fortuneFiles:G=data!fortunes) ;
172AddFilesToPackage data fortunes : $(fortuneFiles) ;
173
174local fontDir = [ FDirName $(HAIKU_TOP) data system data fonts ] ;
175local psFonts = [ Glob $(fontDir)/psfonts : *.afm *.pfb ] ;
176AddFilesToPackage data fonts psfonts : $(psFonts) ;
177
178# keymaps
179AddFilesToPackage data Keymaps : $(HAIKU_KEYMAP_FILES) ;
180local keymapAlias ;
181for keymapAlias in $(HAIKU_KEYMAP_ALIASES) {
182	local aliasedTo = [ on $(keymapAlias) return $(HAIKU_KEYMAP_FILE) ] ;
183	AddSymlinkToPackage data Keymaps : $(aliasedTo:BSM) : $(keymapAlias:BSM) ;
184}
185
186# keyboard layouts
187AddFilesToPackage data KeyboardLayouts
188	: $(HAIKU_KEYBOARD_LAYOUT_FILES) ;
189AddFilesToPackage data KeyboardLayouts Apple\ Aluminum
190	: $(HAIKU_APPLE_ALUMINUM_KEYBOARD_LAYOUT_FILES) ;
191AddFilesToPackage data KeyboardLayouts ThinkPad
192	: $(HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES) ;
193
194# boot module links
195AddBootModuleSymlinksToPackage
196	acpi@x86,x86_64 ahci ata ata_adapter
197	bfs
198	config_manager
199	dpc
200	efi_gpt
201	generic_ide_pci
202	ide_isa@x86 isa@x86,x86_64 intel it8211
203	legacy_sata locked_pool
204	mmc mmc_disk
205	nvme_disk@x86,x86_64
206	openpic@ppc
207	packagefs pci
208	fdt@riscv64,arm
209	scsi scsi_cd scsi_disk scsi_periph silicon_image_3112 highpoint_ide_pci
210	sdhci_pci
211	usb usb_disk <usb>ehci <usb>ohci <usb>uhci <usb>xhci
212	virtio virtio_block virtio_mmio@riscv64,arm,arm64 virtio_pci virtio_scsi
213;
214
215# add-ons
216AddFilesToPackage add-ons accelerants	: $(SYSTEM_ADD_ONS_ACCELERANTS) ;
217AddFilesToPackage add-ons Translators	: $(SYSTEM_ADD_ONS_TRANSLATORS) ;
218AddFilesToPackage add-ons locale catalogs : $(SYSTEM_ADD_ONS_LOCALE_CATALOGS) ;
219
220AddFilesToPackage add-ons mail_daemon inbound_protocols		: POP3
221	IMAP ;
222AddFilesToPackage add-ons mail_daemon outbound_protocols 	: SMTP ;
223AddFilesToPackage add-ons mail_daemon inbound_filters
224	: MatchHeader SpamFilter NewMailNotification ;
225AddFilesToPackage add-ons mail_daemon outbound_filters		: Fortune ;
226
227AddFilesToPackage add-ons media : $(SYSTEM_ADD_ONS_MEDIA) ;
228AddFilesToPackage add-ons media plugins : $(SYSTEM_ADD_ONS_MEDIA_PLUGINS) ;
229
230AddFilesToPackage add-ons Network\ Settings
231	: IPv4Interface IPv6Interface DNSClientService Hostname FTPService SSHService
232		TelnetService ;
233
234AddFilesToPackage add-ons Tracker
235	: FileType Mark\ as… Mark\ as\ Read Open\ Target\ Folder
236		Open\ Terminal ZipOMatic ;
237AddSymlinkToPackage add-ons Tracker
238	: /boot/system/preferences/Backgrounds : Background ;
239AddSymlinkToPackage add-ons Tracker
240	: /boot/system/apps/TextSearch : TextSearch ;
241AddSymlinkToPackage add-ons Tracker
242	: /boot/system/apps/DiskUsage : DiskUsage ;
243
244AddFilesToPackage add-ons input_server devices
245	: <input>keyboard <input>mouse <input>tablet <input>virtio <input>wacom ;
246AddFilesToPackage add-ons input_server filters
247	: padblocker screen_saver shortcut_catcher switch_workspace ;
248AddDirectoryToPackage add-ons input_server methods ;
249
250AddFilesToPackage add-ons kernel network : <net>notifications stack ;
251AddFilesToPackage add-ons kernel network : dns_resolver ;
252AddFilesToPackage add-ons kernel network devices : $(SYSTEM_NETWORK_DEVICES) ;
253AddFilesToPackage add-ons kernel network datalink_protocols
254	: $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ;
255AddFilesToPackage add-ons kernel network ppp : $(SYSTEM_NETWORK_PPP) ;
256AddFilesToPackage add-ons kernel network protocols
257	: $(SYSTEM_NETWORK_PROTOCOLS) ;
258
259AddFilesToPackage add-ons Print : $(SYSTEM_ADD_ONS_PRINT) ;
260AddFilesToPackage add-ons Print transport
261	: $(SYSTEM_ADD_ONS_PRINT_TRANSPORT) ;
262AddFilesToPackage add-ons Screen\ Savers : $(SYSTEM_ADD_ONS_SCREENSAVERS) ;
263
264AddFilesToPackage add-ons disk_systems
265	: <disk_system>fat <disk_system>intel <disk_system>gpt <disk_system>bfs
266		<disk_system>ntfs ;
267
268# Kernel bluetooth stack
269AddFilesToPackage add-ons kernel bluetooth : $(SYSTEM_BT_STACK) ;
270
271# decorators
272AddFilesToPackage add-ons decorators : BeDecorator ;
273	# MacDecorator WinDecorator
274
275# the MIME DB
276CopyDirectoryToPackage data : <mimedb>mime_db : : : isTarget ;
277
278# directory attributes
279AddDirectoryToPackage apps : system-apps.rdef ;
280AddDirectoryToPackage preferences : system-preferences.rdef ;
281
282# Deskbar menu symlinks
283
284local linkTarget ;
285
286# "Applications" links
287AddDirectoryToPackage data deskbar menu Applications
288	: deskbar-applications.rdef ;
289for linkTarget in $(DESKBAR_APPLICATIONS) {
290	AddSymlinkToPackage data deskbar menu Applications
291		: ../../../../apps/$(linkTarget) : $(linkTarget) ;
292}
293
294# "Desktop applets" links
295AddDirectoryToPackage data deskbar menu Desktop\ applets
296	: deskbar-applets.rdef ;
297for linkTarget in $(DESKBAR_DESKTOP_APPLETS) {
298	AddSymlinkToPackage data deskbar menu Desktop\ applets
299		: ../../../../apps/$(linkTarget) : $(linkTarget) ;
300}
301
302# "Preferences" links
303AddDirectoryToPackage data deskbar menu Preferences
304	: deskbar-preferences.rdef ;
305DESKBAR_PREFERENCES = $(SYSTEM_PREFERENCES:B) ;
306for linkTarget in $(DESKBAR_PREFERENCES) {
307	AddSymlinkToPackage data deskbar menu Preferences
308		: ../../../../preferences/$(linkTarget)
309		: $(linkTarget) ;
310}
311
312# "Demo" links
313AddDirectoryToPackage data deskbar menu Demos
314	: deskbar-demos.rdef ;
315for linkTarget in $(SYSTEM_DEMOS) {
316	AddSymlinkToPackage data deskbar menu Demos
317		: ../../../../demos/$(linkTarget) : $(linkTarget) ;
318}
319
320# Deskbar menu entries file
321AddFilesToPackage data deskbar : <deskbar>menu_entries ;
322
323# licenses
324CopyDirectoryToPackage data
325	: [ FDirName $(HAIKU_TOP) data system data licenses ]
326	: licenses ;
327
328# netresolv support files
329CopyDirectoryToPackage data
330	: [ FDirName $(HAIKU_TOP) data system data network ]
331	: network ;
332
333# Copy documentation as per DiskUsage's license requirement.
334CopyDirectoryToPackage documentation
335	: [ FDirName $(HAIKU_TOP) docs apps diskusage ]
336	: diskusage ;
337
338
339# empty directory
340AddDirectoryToPackage data empty ;
341
342
343BuildHaikuPackage $(haikuPackage) : haiku ;
344