xref: /haiku/build/jam/packages/Haiku (revision 4365774b6889e9467e4fd8719c5c89ca56240d28)
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 mmc : sdhci_pci ;
38AddFilesToPackage add-ons kernel busses random : virtio_rng ;
39AddFilesToPackage add-ons kernel busses scsi : ahci virtio_scsi ;
40AddFilesToPackage add-ons kernel busses usb : <usb>uhci <usb>ohci <usb>ehci
41	<usb>xhci ;
42AddFilesToPackage add-ons kernel busses virtio : virtio_pci ;
43AddFilesToPackage add-ons kernel console : vga_text ;
44AddFilesToPackage add-ons kernel debugger
45	: <kdebug>demangle <kdebug>disasm@x86,x86_64 <kdebug>hangman
46	  <kdebug>invalidate_on_exit <kdebug>usb_keyboard <kdebug>qrencode@libqrencode
47	  <kdebug>run_on_exit ;
48AddFilesToPackage add-ons kernel file_systems : $(SYSTEM_ADD_ONS_FILE_SYSTEMS) ;
49AddFilesToPackage add-ons kernel generic
50	: ata_adapter bios@x86,x86_64 dpc
51		locked_pool mpu401 scsi_periph smbios@x86,x86_64 <module>tty ;
52AddFilesToPackage add-ons kernel partitioning_systems
53	: amiga_rdb@m68k apple@ppc sun@sparc efi_gpt intel session ;
54AddFilesToPackage add-ons kernel interrupt_controllers : openpic@ppc ;
55AddFilesToPackage add-ons kernel power cpufreq : intel_pstates@x86,x86_64 ;
56AddFilesToPackage add-ons kernel power cpuidle : intel_cstates@x86,x86_64 ;
57
58if $(TARGET_ARCH) = x86 || $(TARGET_ARCH) = x86_64 {
59	AddFilesToPackage add-ons kernel cpu : generic_x86 ;
60}
61
62# drivers
63AddNewDriversToPackage 				: wmi@x86,x86_64 ;
64AddNewDriversToPackage disk			: nvme_disk@x86,x86_64 ;
65AddNewDriversToPackage disk mmc		: mmc_disk ;
66AddNewDriversToPackage disk scsi	: scsi_cd scsi_disk ;
67AddNewDriversToPackage disk virtual : virtio_block ram_disk ;
68AddNewDriversToPackage power		: $(SYSTEM_ADD_ONS_DRIVERS_POWER) ;
69AddNewDriversToPackage sensor		: $(SYSTEM_ADD_ONS_DRIVERS_SENSOR) ;
70AddNewDriversToPackage network		: virtio_net ;
71#AddNewDriversToPackage display		: display_adapter@x86 ;
72
73# legacy drivers
74AddDriversToPackage					: console dprintf null <driver>tty usb_modeswitch zero ;
75AddDriversToPackage audio hmulti	: $(SYSTEM_ADD_ONS_DRIVERS_AUDIO) ;
76AddDriversToPackage audio old		: $(SYSTEM_ADD_ONS_DRIVERS_AUDIO_OLD) ;
77AddDriversToPackage bluetooth h2	: $(SYSTEM_ADD_ONS_DRIVERS_BT_H2) ;
78AddDriversToPackage midi			: $(SYSTEM_ADD_ONS_DRIVERS_MIDI) ;
79AddDriversToPackage bus				: usb_raw ;
80AddDriversToPackage disk floppy		: pc_floppy@x86 ;
81AddDriversToPackage disk usb		: usb_disk ;
82AddDriversToPackage disk virtual	: nbd ;
83AddDriversToPackage dvb				: cx23882 ;
84AddDriversToPackage graphics		: $(SYSTEM_ADD_ONS_DRIVERS_GRAPHICS) ;
85AddDriversToPackage input			: ps2_hid usb_hid wacom ;
86AddDriversToPackage misc			: <driver>poke <driver>mem ;
87AddDriversToPackage net				: $(SYSTEM_ADD_ONS_DRIVERS_NET) ;
88AddDriversToPackage ports			: pc_serial usb_serial ;
89
90# kernel
91AddFilesToPackage : <revisioned>kernel_$(TARGET_ARCH) ;
92
93# libs
94AddLibrariesToPackage lib
95	: [ HaikuImageGetSystemLibs ] [ HaikuImageGetPrivateSystemLibs ] ;
96
97# libnetwork.so replaces quite a few libraries
98if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) = 1 {
99	local libNetworkAliases = libsocket.so libbind.so libnet.so ;
100	local lib ;
101	for lib in $(libNetworkAliases) {
102		AddSymlinkToPackage lib : libnetwork.so : $(lib) ;
103	}
104
105	AddSymlinkToPackage lib : libbnetapi.so : libnetapi.so ;
106}
107
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 ahci ata ata_adapter
186	bfs
187	config_manager
188	dpc
189	efi_gpt
190	generic_ide_pci
191	ide_isa@x86 isa@x86,x86_64 intel it8211
192	legacy_sata locked_pool
193	mmc mmc_disk
194	nvme_disk@x86,x86_64
195	openpic@ppc
196	packagefs pci
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_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	: padblocker 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
272local linkTarget ;
273
274# "Applications" links
275AddDirectoryToPackage data deskbar menu Applications
276	: deskbar-applications.rdef ;
277for linkTarget in $(DESKBAR_APPLICATIONS) {
278	AddSymlinkToPackage data deskbar menu Applications
279		: ../../../../apps/$(linkTarget) : $(linkTarget) ;
280}
281
282# "Desktop applets" links
283AddDirectoryToPackage data deskbar menu Desktop\ applets
284	: deskbar-applets.rdef ;
285for linkTarget in $(DESKBAR_DESKTOP_APPLETS) {
286	AddSymlinkToPackage data deskbar menu Desktop\ applets
287		: ../../../../apps/$(linkTarget) : $(linkTarget) ;
288}
289
290# "Preferences" links
291AddDirectoryToPackage data deskbar menu Preferences
292	: deskbar-preferences.rdef ;
293DESKBAR_PREFERENCES = $(SYSTEM_PREFERENCES:B) ;
294for linkTarget in $(DESKBAR_PREFERENCES) {
295	AddSymlinkToPackage data deskbar menu Preferences
296		: ../../../../preferences/$(linkTarget)
297		: $(linkTarget) ;
298}
299
300# "Demo" links
301AddDirectoryToPackage data deskbar menu Demos
302	: deskbar-demos.rdef ;
303for linkTarget in $(SYSTEM_DEMOS) {
304	AddSymlinkToPackage data deskbar menu Demos
305		: ../../../../demos/$(linkTarget) : $(linkTarget) ;
306}
307
308# Deskbar menu entries file
309AddFilesToPackage data deskbar : <deskbar>menu_entries ;
310
311# licenses
312CopyDirectoryToPackage data
313	: [ FDirName $(HAIKU_TOP) data system data licenses ]
314	: licenses ;
315
316# netresolv support files
317CopyDirectoryToPackage data
318	: [ FDirName $(HAIKU_TOP) data system data network ]
319	: network ;
320
321# Copy documentation as per DiskUsage's license requirement.
322CopyDirectoryToPackage documentation
323	: [ FDirName $(HAIKU_TOP) docs apps diskusage ]
324	: diskusage ;
325
326
327# empty directory
328AddDirectoryToPackage data empty ;
329
330
331BuildHaikuPackage $(haikuPackage) : haiku ;
332