xref: /haiku/build/jam/packages/Haiku (revision 02354704729d38c3b078c696adc1bbbd33cbcf72)
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 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
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 locale catalogs : $(SYSTEM_ADD_ONS_LOCALE_CATALOGS) ;
218
219AddFilesToPackage add-ons mail_daemon inbound_protocols		: POP3
220	IMAP ;
221AddFilesToPackage add-ons mail_daemon outbound_protocols 	: SMTP ;
222AddFilesToPackage add-ons mail_daemon inbound_filters
223	: MatchHeader SpamFilter NewMailNotification ;
224AddFilesToPackage add-ons mail_daemon outbound_filters		: Fortune ;
225
226AddFilesToPackage add-ons media : $(SYSTEM_ADD_ONS_MEDIA) ;
227
228AddFilesToPackage add-ons Network\ Settings
229	: IPv4Interface IPv6Interface DNSClientService Hostname FTPService SSHService
230		TelnetService ;
231
232AddFilesToPackage add-ons Tracker
233	: FileType Mark\ as… Mark\ as\ Read Open\ Target\ Folder
234		Open\ Terminal ZipOMatic ;
235AddSymlinkToPackage add-ons Tracker
236	: /boot/system/preferences/Backgrounds : Background ;
237AddSymlinkToPackage add-ons Tracker
238	: /boot/system/apps/TextSearch : TextSearch ;
239AddSymlinkToPackage add-ons Tracker
240	: /boot/system/apps/DiskUsage : DiskUsage ;
241
242AddFilesToPackage add-ons input_server devices
243	: <input>keyboard <input>mouse <input>tablet <input>virtio <input>wacom ;
244AddFilesToPackage add-ons input_server filters
245	: padblocker screen_saver shortcut_catcher switch_workspace ;
246AddDirectoryToPackage add-ons input_server methods ;
247
248AddFilesToPackage add-ons kernel network : <net>notifications stack ;
249AddFilesToPackage add-ons kernel network : dns_resolver ;
250AddFilesToPackage add-ons kernel network devices : $(SYSTEM_NETWORK_DEVICES) ;
251AddFilesToPackage add-ons kernel network datalink_protocols
252	: $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ;
253AddFilesToPackage add-ons kernel network ppp : $(SYSTEM_NETWORK_PPP) ;
254AddFilesToPackage add-ons kernel network protocols
255	: $(SYSTEM_NETWORK_PROTOCOLS) ;
256
257AddFilesToPackage add-ons Print : $(SYSTEM_ADD_ONS_PRINT) ;
258AddFilesToPackage add-ons Print transport
259	: $(SYSTEM_ADD_ONS_PRINT_TRANSPORT) ;
260AddFilesToPackage add-ons Screen\ Savers : $(SYSTEM_ADD_ONS_SCREENSAVERS) ;
261
262AddFilesToPackage add-ons disk_systems
263	: <disk_system>fat <disk_system>intel <disk_system>gpt <disk_system>bfs
264		<disk_system>ntfs ;
265
266# Kernel bluetooth stack
267AddFilesToPackage add-ons kernel bluetooth : $(SYSTEM_BT_STACK) ;
268
269# decorators
270AddFilesToPackage add-ons decorators : BeDecorator ;
271	# MacDecorator WinDecorator
272
273# the MIME DB
274CopyDirectoryToPackage data : <mimedb>mime_db : : : isTarget ;
275
276# directory attributes
277AddDirectoryToPackage apps : system-apps.rdef ;
278AddDirectoryToPackage preferences : system-preferences.rdef ;
279
280# Deskbar menu symlinks
281
282local linkTarget ;
283
284# "Applications" links
285AddDirectoryToPackage data deskbar menu Applications
286	: deskbar-applications.rdef ;
287for linkTarget in $(DESKBAR_APPLICATIONS) {
288	AddSymlinkToPackage data deskbar menu Applications
289		: ../../../../apps/$(linkTarget) : $(linkTarget) ;
290}
291
292# "Desktop applets" links
293AddDirectoryToPackage data deskbar menu Desktop\ applets
294	: deskbar-applets.rdef ;
295for linkTarget in $(DESKBAR_DESKTOP_APPLETS) {
296	AddSymlinkToPackage data deskbar menu Desktop\ applets
297		: ../../../../apps/$(linkTarget) : $(linkTarget) ;
298}
299
300# "Preferences" links
301AddDirectoryToPackage data deskbar menu Preferences
302	: deskbar-preferences.rdef ;
303DESKBAR_PREFERENCES = $(SYSTEM_PREFERENCES:B) ;
304for linkTarget in $(DESKBAR_PREFERENCES) {
305	AddSymlinkToPackage data deskbar menu Preferences
306		: ../../../../preferences/$(linkTarget)
307		: $(linkTarget) ;
308}
309
310# "Demo" links
311AddDirectoryToPackage data deskbar menu Demos
312	: deskbar-demos.rdef ;
313for linkTarget in $(SYSTEM_DEMOS) {
314	AddSymlinkToPackage data deskbar menu Demos
315		: ../../../../demos/$(linkTarget) : $(linkTarget) ;
316}
317
318# Deskbar menu entries file
319AddFilesToPackage data deskbar : <deskbar>menu_entries ;
320
321# licenses
322CopyDirectoryToPackage data
323	: [ FDirName $(HAIKU_TOP) data system data licenses ]
324	: licenses ;
325
326# netresolv support files
327CopyDirectoryToPackage data
328	: [ FDirName $(HAIKU_TOP) data system data network ]
329	: network ;
330
331# Copy documentation as per DiskUsage's license requirement.
332CopyDirectoryToPackage documentation
333	: [ FDirName $(HAIKU_TOP) docs apps diskusage ]
334	: diskusage ;
335
336
337# empty directory
338AddDirectoryToPackage data empty ;
339
340
341BuildHaikuPackage $(haikuPackage) : haiku ;
342