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