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