xref: /haiku/build/jam/packages/Haiku (revision dc0bc42494264bb8d17b6b081647377b5601570a)
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
29# modules
30AddFilesToPackage add-ons kernel bus_managers : $(SYSTEM_ADD_ONS_BUS_MANAGERS) ;
31AddFilesToPackage add-ons kernel busses agp_gart : <agp_gart>intel@x86,x86_64 ;
32
33AddFilesToPackage add-ons kernel busses ata
34	: generic_ide_pci it8211 legacy_sata silicon_image_3112 highpoint_ide_pci ide_isa@x86 ;
35
36AddFilesToPackage add-ons kernel busses i2c : pch_i2c@x86,x86_64 ;
37AddFilesToPackage add-ons kernel busses random : virtio_rng ;
38AddFilesToPackage add-ons kernel busses scsi : ahci virtio_scsi ;
39AddFilesToPackage add-ons kernel busses usb : <usb>uhci <usb>ohci <usb>ehci
40	<usb>xhci ;
41AddFilesToPackage add-ons kernel busses virtio : virtio_pci ;
42AddFilesToPackage add-ons kernel console : vga_text ;
43AddFilesToPackage add-ons kernel debugger
44	: <kdebug>demangle <kdebug>disasm@x86,x86_64 <kdebug>hangman
45	  <kdebug>invalidate_on_exit <kdebug>usb_keyboard <kdebug>qrencode@libqrencode
46	  <kdebug>run_on_exit ;
47AddFilesToPackage add-ons kernel file_systems : $(SYSTEM_ADD_ONS_FILE_SYSTEMS) ;
48AddFilesToPackage add-ons kernel generic
49	: ata_adapter bios@x86,x86_64 dpc
50		locked_pool mpu401 scsi_periph <module>tty ;
51AddFilesToPackage add-ons kernel partitioning_systems
52	: amiga_rdb@m68k apple@ppc efi_gpt intel session ;
53AddFilesToPackage add-ons kernel interrupt_controllers : openpic@ppc ;
54AddFilesToPackage add-ons kernel power cpufreq : intel_pstates@x86,x86_64 ;
55AddFilesToPackage add-ons kernel power cpuidle : intel_cstates@x86,x86_64 ;
56
57if $(TARGET_ARCH) = x86 || $(TARGET_ARCH) = x86_64 {
58	AddFilesToPackage add-ons kernel cpu : generic_x86 ;
59}
60
61# drivers
62AddNewDriversToPackage disk			: nvme_disk@x86,x86_64 ;
63AddNewDriversToPackage disk scsi	: scsi_cd scsi_disk ;
64AddNewDriversToPackage disk virtual : virtio_block ram_disk ;
65AddNewDriversToPackage power		: $(SYSTEM_ADD_ONS_DRIVERS_POWER) ;
66AddNewDriversToPackage network		: virtio_net ;
67#AddNewDriversToPackage display		: display_adapter@x86 ;
68
69# legacy drivers
70AddDriversToPackage					: console dprintf null <driver>tty usb_modeswitch zero ;
71AddDriversToPackage audio hmulti	: $(SYSTEM_ADD_ONS_DRIVERS_AUDIO) ;
72AddDriversToPackage audio old		: $(SYSTEM_ADD_ONS_DRIVERS_AUDIO_OLD) ;
73AddDriversToPackage bluetooth h2	: $(SYSTEM_ADD_ONS_DRIVERS_BT_H2) ;
74AddDriversToPackage midi			: $(SYSTEM_ADD_ONS_DRIVERS_MIDI) ;
75AddDriversToPackage bus				: usb_raw fw_raw@x86 ;
76AddDriversToPackage disk floppy		: pc_floppy@x86 ;
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_GCC_VERSION_$(architecture)[1]) = 2 {
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# servers
106AddFilesToPackage servers : $(SYSTEM_SERVERS) ;
107
108# apps
109AddFilesToPackage				: runtime_loader Deskbar Tracker ;
110AddFilesToPackage bin			: $(SYSTEM_BIN) consoled ;
111AddFilesToPackage apps			: $(SYSTEM_APPS) ;
112AddFilesToPackage preferences	: $(SYSTEM_PREFERENCES) ;
113AddFilesToPackage demos			: $(SYSTEM_DEMOS) ;
114
115SEARCH on install-wifi-firmwares.sh = [ FDirName $(HAIKU_TOP) data bin ] ;
116AddFilesToPackage bin : install-wifi-firmwares.sh ;
117
118AddSymlinkToPackage bin : trash : untrash ;
119AddSymlinkToPackage bin : less : more ;
120
121# scripts and data files
122local bootScripts = PostInstallScript SetupEnvironment
123	InstallerInitScript InstallerFinishScript ;
124SEARCH on $(bootScripts) = [ FDirName $(HAIKU_TOP) data system boot ] ;
125AddFilesToPackage boot : $(bootScripts) ;
126
127local launchScripts = <data!launch>system ;
128SEARCH on $(launchScripts) = [ FDirName $(HAIKU_TOP) data launch ] ;
129AddFilesToPackage data launch : $(launchScripts) ;
130
131local userLaunchScripts = <data!launch>user ;
132SEARCH on $(userLaunchScripts) = [ FDirName $(HAIKU_TOP) data launch ] ;
133AddFilesToPackage data user_launch : $(userLaunchScripts) ;
134
135# post install + first login scripts
136local postInstallFiles = add_catalog_entry_attributes.sh ;
137postInstallFiles = $(postInstallFiles:G=post-install) ;
138SEARCH on $(postInstallFiles)
139	= [ FDirName $(HAIKU_TOP) data system boot post_install ] ;
140AddFilesToPackage boot post-install : $(postInstallFiles) ;
141
142local firstLoginFiles = default_deskbar_items.sh ;
143firstLoginFiles = $(firstLoginFiles:G=first-login) ;
144SEARCH on $(firstLoginFiles)
145	= [ FDirName $(HAIKU_TOP) data system boot first_login ] ;
146AddFilesToPackage boot first-login : $(firstLoginFiles) ;
147
148# artwork and sounds
149local logoArtwork =
150	$(HAIKU_INCLUDE_TRADEMARKS)"HAIKU logo - white on blue - big.png"
151	$(HAIKU_INCLUDE_TRADEMARKS)"HAIKU logo - white on blue - normal.png" ;
152SEARCH on $(logoArtwork) = [ FDirName $(HAIKU_TOP) data artwork ] ;
153AddFilesToPackage data artwork : $(logoArtwork) ;
154
155# Mail spell check dictionaries
156local spellFiles = words geekspeak ;
157spellFiles = $(spellFiles:G=spell) ;
158SEARCH on $(spellFiles) = [ FDirName $(HAIKU_TOP) src apps mail ] ;
159AddFilesToPackage data spell_check word_dictionary : $(spellFiles) ;
160
161local fortuneFiles = [ Glob $(HAIKU_TOP)/data/system/data/fortunes
162	: [a-zA-Z0-9]* ] ;
163fortuneFiles = $(fortuneFiles:G=data!fortunes) ;
164AddFilesToPackage data fortunes : $(fortuneFiles) ;
165
166local fontDir = [ FDirName $(HAIKU_TOP) data system data fonts ] ;
167local psFonts = [ Glob $(fontDir)/psfonts : *.afm *.pfb ] ;
168AddFilesToPackage data fonts psfonts : $(psFonts) ;
169
170# keymaps
171AddFilesToPackage data Keymaps : $(HAIKU_KEYMAP_FILES) ;
172local keymapAlias ;
173for keymapAlias in $(HAIKU_KEYMAP_ALIASES) {
174	local aliasedTo = [ on $(keymapAlias) return $(HAIKU_KEYMAP_FILE) ] ;
175	AddSymlinkToPackage data Keymaps : $(aliasedTo:BSM) : $(keymapAlias:BSM) ;
176}
177
178# keyboard layouts
179AddFilesToPackage data KeyboardLayouts
180	: $(HAIKU_KEYBOARD_LAYOUT_FILES) ;
181AddFilesToPackage data KeyboardLayouts Apple\ Aluminum
182	: $(HAIKU_APPLE_ALUMINUM_KEYBOARD_LAYOUT_FILES) ;
183AddFilesToPackage data KeyboardLayouts ThinkPad
184	: $(HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES) ;
185
186# boot module links
187AddBootModuleSymlinksToPackage
188	acpi@x86,x86_64 ahci ata ata_adapter
189	bfs
190	config_manager
191	dpc
192	efi_gpt
193	generic_ide_pci
194	ide_isa@x86 isa@x86,x86_64 intel it8211
195	legacy_sata locked_pool
196	nvme_disk@x86,x86_64
197	openpic@ppc
198	packagefs pci
199	scsi scsi_cd scsi_disk scsi_periph silicon_image_3112 highpoint_ide_pci
200	usb usb_disk <usb>ehci <usb>ohci <usb>uhci <usb>xhci
201	virtio virtio_block virtio_pci virtio_scsi
202;
203
204# add-ons
205AddFilesToPackage add-ons accelerants	: $(SYSTEM_ADD_ONS_ACCELERANTS) ;
206AddFilesToPackage add-ons Translators	: $(SYSTEM_ADD_ONS_TRANSLATORS) ;
207AddFilesToPackage add-ons locale catalogs : $(SYSTEM_ADD_ONS_LOCALE_CATALOGS) ;
208
209AddFilesToPackage add-ons mail_daemon inbound_protocols		: POP3
210	IMAP ;
211AddFilesToPackage add-ons mail_daemon outbound_protocols 	: SMTP ;
212AddFilesToPackage add-ons mail_daemon inbound_filters
213	: MatchHeader SpamFilter NewMailNotification ;
214AddFilesToPackage add-ons mail_daemon outbound_filters		: Fortune ;
215
216AddFilesToPackage add-ons media : $(SYSTEM_ADD_ONS_MEDIA) ;
217AddFilesToPackage add-ons media plugins : $(SYSTEM_ADD_ONS_MEDIA_PLUGINS) ;
218
219AddFilesToPackage add-ons Network\ Settings
220	: IPv4Interface IPv6Interface DNSClientService Hostname FTPService SSHService
221		TelnetService ;
222
223AddFilesToPackage add-ons Tracker
224	: FileType Mark\ as… Mark\ as\ Read Open\ Target\ Folder
225		Open\ Terminal ZipOMatic ;
226AddSymlinkToPackage add-ons Tracker
227	: /boot/system/preferences/Backgrounds : Background ;
228AddSymlinkToPackage add-ons Tracker
229	: /boot/system/apps/TextSearch : TextSearch ;
230AddSymlinkToPackage add-ons Tracker
231	: /boot/system/apps/DiskUsage : DiskUsage ;
232
233AddFilesToPackage add-ons input_server devices
234	: <input>keyboard <input>mouse <input>tablet <input>wacom ;
235AddFilesToPackage add-ons input_server filters
236	: screen_saver shortcut_catcher switch_workspace ;
237AddDirectoryToPackage add-ons input_server methods ;
238
239AddFilesToPackage add-ons kernel network : <net>notifications stack ;
240AddFilesToPackage add-ons kernel network : dns_resolver ;
241AddFilesToPackage add-ons kernel network devices : $(SYSTEM_NETWORK_DEVICES) ;
242AddFilesToPackage add-ons kernel network datalink_protocols
243	: $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ;
244AddFilesToPackage add-ons kernel network ppp : $(SYSTEM_NETWORK_PPP) ;
245AddFilesToPackage add-ons kernel network protocols
246	: $(SYSTEM_NETWORK_PROTOCOLS) ;
247
248AddFilesToPackage add-ons Print : $(SYSTEM_ADD_ONS_PRINT) ;
249AddFilesToPackage add-ons Print transport
250	: $(SYSTEM_ADD_ONS_PRINT_TRANSPORT) ;
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# decorators
261AddFilesToPackage add-ons decorators : BeDecorator ;
262	# MacDecorator WinDecorator
263
264# the MIME DB
265CopyDirectoryToPackage data : <mimedb>mime_db : : : isTarget ;
266
267# directory attributes
268AddDirectoryToPackage apps : system-apps.rdef ;
269AddDirectoryToPackage preferences : system-preferences.rdef ;
270
271# Deskbar menu symlinks
272
273# "Applications" links
274local linkTarget ;
275for linkTarget in $(DESKBAR_APPLICATIONS) {
276	AddSymlinkToPackage data deskbar menu Applications
277		: ../../../../apps/$(linkTarget) : $(linkTarget) ;
278}
279
280# "Desktop applets" links
281for linkTarget in $(DESKBAR_DESKTOP_APPLETS) {
282	AddSymlinkToPackage data deskbar menu Desktop\ applets
283		: ../../../../apps/$(linkTarget) : $(linkTarget) ;
284}
285
286# "Preferences" links
287AddDirectoryToPackage data deskbar menu Preferences ;
288DESKBAR_PREFERENCES = $(SYSTEM_PREFERENCES:B) ;
289for linkTarget in $(DESKBAR_PREFERENCES) {
290	AddSymlinkToPackage data deskbar menu Preferences
291		: ../../../../preferences/$(linkTarget)
292		: $(linkTarget) ;
293}
294
295# "Demo" links
296AddDirectoryToPackage data deskbar menu Demos ;
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