xref: /haiku/build/jam/packages/Haiku (revision 6889394848e2dc9f41ff53b12141d572822ca0c6)
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
33if $(HAIKU_ATA_STACK) = 1 {
34	AddFilesToPackage add-ons kernel busses ata
35		: generic_ide_pci it8211 legacy_sata silicon_image_3112 ide_isa@x86 ;
36} else {
37	AddFilesToPackage add-ons kernel busses ide
38		: generic_ide_pci it8211 legacy_sata silicon_image_3112 ide_isa@x86 ;
39}
40
41AddFilesToPackage add-ons kernel busses random : virtio_rng ;
42AddFilesToPackage add-ons kernel busses scsi : ahci virtio_scsi ;
43AddFilesToPackage add-ons kernel busses usb : <usb>uhci <usb>ohci <usb>ehci
44	<usb>xhci ;
45AddFilesToPackage add-ons kernel busses virtio : virtio_pci ;
46AddFilesToPackage add-ons kernel console : vga_text ;
47AddFilesToPackage add-ons kernel debugger
48	: <kdebug>demangle <kdebug>disasm@x86 <kdebug>hangman
49	  <kdebug>invalidate_on_exit <kdebug>usb_keyboard <kdebug>qrencode@libqrencode
50	  <kdebug>run_on_exit ;
51AddFilesToPackage add-ons kernel file_systems : $(SYSTEM_ADD_ONS_FILE_SYSTEMS) ;
52AddFilesToPackage add-ons kernel generic
53	: ata_adapter@ata bios@x86,x86_64 dpc ide_adapter@ide
54		locked_pool mpu401 scsi_periph <module>tty ;
55AddFilesToPackage add-ons kernel partitioning_systems
56	: amiga_rdb@m68k apple@ppc efi_gpt intel session ;
57AddFilesToPackage add-ons kernel interrupt_controllers : openpic@ppc ;
58AddFilesToPackage add-ons kernel power cpufreq : intel_pstates@x86,x86_64 ;
59AddFilesToPackage add-ons kernel power cpuidle : intel_cstates@x86,x86_64 ;
60
61if $(TARGET_ARCH) = x86 || $(TARGET_ARCH) = x86_64 {
62	AddFilesToPackage add-ons kernel cpu : generic_x86 ;
63}
64
65# drivers
66AddNewDriversToPackage disk scsi	: scsi_cd scsi_disk ;
67AddNewDriversToPackage disk virtual : virtio_block ram_disk ;
68AddNewDriversToPackage power		: $(SYSTEM_ADD_ONS_DRIVERS_POWER) ;
69#AddNewDriversToPackage display		: display_adapter@x86 ;
70
71# legacy drivers
72AddDriversToPackage					: console dprintf null <driver>tty usb_modeswitch zero ;
73AddDriversToPackage audio hmulti	: $(SYSTEM_ADD_ONS_DRIVERS_AUDIO) ;
74AddDriversToPackage audio old		: $(SYSTEM_ADD_ONS_DRIVERS_AUDIO_OLD) ;
75AddDriversToPackage bluetooth h2	: $(SYSTEM_ADD_ONS_DRIVERS_BT_H2) ;
76AddDriversToPackage midi			: $(SYSTEM_ADD_ONS_DRIVERS_MIDI) ;
77AddDriversToPackage bus				: usb_raw fw_raw@x86 ;
78AddDriversToPackage disk floppy		: pc_floppy@x86 ;
79AddDriversToPackage disk usb		: usb_disk ;
80AddDriversToPackage disk usb		: usb_floppy ;
81AddDriversToPackage printer usb		: usb_printer ;
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_GCC_VERSION_$(architecture)[1]) = 2 {
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# TODO: Remove when the packages have been rebuilt!
110AddSymlinkToPackage lib : libbe.so : liblocale.so ;
111
112# servers
113AddFilesToPackage servers : $(SYSTEM_SERVERS) ;
114
115# apps
116AddFilesToPackage				: runtime_loader Deskbar Tracker ;
117AddFilesToPackage bin			: $(SYSTEM_BIN) consoled ;
118AddFilesToPackage apps			: $(SYSTEM_APPS) ;
119AddFilesToPackage preferences	: $(SYSTEM_PREFERENCES) ;
120AddFilesToPackage demos			: $(SYSTEM_DEMOS) ;
121
122SEARCH on install-wifi-firmwares.sh = [ FDirName $(HAIKU_TOP) data bin ] ;
123AddFilesToPackage bin : install-wifi-firmwares.sh ;
124
125AddSymlinkToPackage bin : trash : untrash ;
126AddSymlinkToPackage bin : less : more ;
127
128# scripts and data files
129local bootScripts = PostInstallScript SetupEnvironment
130	InstallerInitScript InstallerFinishScript ;
131SEARCH on $(bootScripts) = [ FDirName $(HAIKU_TOP) data system boot ] ;
132AddFilesToPackage boot : $(bootScripts) ;
133
134local launchScripts = <data!launch>system ;
135SEARCH on $(launchScripts) = [ FDirName $(HAIKU_TOP) data launch ] ;
136AddFilesToPackage data launch : $(launchScripts) ;
137
138local userLaunchScripts = <data!launch>user ;
139SEARCH on $(userLaunchScripts) = [ FDirName $(HAIKU_TOP) data launch ] ;
140AddFilesToPackage data user_launch : $(userLaunchScripts) ;
141
142# post install + first login scripts
143local postInstallFiles = add_catalog_entry_attributes.sh ;
144postInstallFiles = $(postInstallFiles:G=post-install) ;
145SEARCH on $(postInstallFiles)
146	= [ FDirName $(HAIKU_TOP) data system boot post_install ] ;
147AddFilesToPackage boot post-install : $(postInstallFiles) ;
148
149local firstLoginFiles = default_deskbar_items.sh ;
150firstLoginFiles = $(firstLoginFiles:G=first-login) ;
151SEARCH on $(firstLoginFiles)
152	= [ FDirName $(HAIKU_TOP) data system boot first_login ] ;
153AddFilesToPackage boot first-login : $(firstLoginFiles) ;
154
155# artwork and sounds
156local logoArtwork =
157	$(HAIKU_INCLUDE_TRADEMARKS)"HAIKU logo - white on blue - big.png"
158	$(HAIKU_INCLUDE_TRADEMARKS)"HAIKU logo - white on blue - normal.png" ;
159SEARCH on $(logoArtwork) = [ FDirName $(HAIKU_TOP) data artwork ] ;
160AddFilesToPackage data artwork : $(logoArtwork) ;
161
162# Mail spell check dictionaries
163local spellFiles = words geekspeak ;
164spellFiles = $(spellFiles:G=spell) ;
165SEARCH on $(spellFiles) = [ FDirName $(HAIKU_TOP) src apps mail ] ;
166AddFilesToPackage data spell_check word_dictionary : $(spellFiles) ;
167
168local fortuneFiles = [ Glob $(HAIKU_TOP)/data/system/data/fortunes
169	: [a-zA-Z0-9]* ] ;
170fortuneFiles = $(fortuneFiles:G=data!fortunes) ;
171AddFilesToPackage data fortunes : $(fortuneFiles) ;
172
173local fontDir = [ FDirName $(HAIKU_TOP) data system data fonts ] ;
174local psFonts = [ Glob $(fontDir)/psfonts : *.afm *.pfb ] ;
175AddFilesToPackage data fonts psfonts : $(psFonts) ;
176
177# keymaps
178AddFilesToPackage data Keymaps : $(HAIKU_KEYMAP_FILES) ;
179local keymapAlias ;
180for keymapAlias in $(HAIKU_KEYMAP_ALIASES) {
181	local aliasedTo = [ on $(keymapAlias) return $(HAIKU_KEYMAP_FILE) ] ;
182	AddSymlinkToPackage data Keymaps : $(aliasedTo:BSM) : $(keymapAlias:BSM) ;
183}
184
185# keyboard layouts
186AddFilesToPackage data KeyboardLayouts
187	: $(HAIKU_KEYBOARD_LAYOUT_FILES) ;
188AddFilesToPackage data KeyboardLayouts Apple\ Aluminum
189	: $(HAIKU_APPLE_ALUMINUM_KEYBOARD_LAYOUT_FILES) ;
190AddFilesToPackage data KeyboardLayouts ThinkPad
191	: $(HAIKU_THINKPAD_KEYBOARD_LAYOUT_FILES) ;
192
193# boot module links
194AddBootModuleSymlinksToPackage
195	acpi@x86,x86_64 ahci ata@ata ata_adapter@ata
196	bfs
197	config_manager
198	dpc
199	efi_gpt
200	generic_ide_pci
201	ide@ide ide_adapter@ide ide_isa@x86 isa@x86,x86_64 intel it8211
202	legacy_sata locked_pool
203	openpic@ppc
204	packagefs pci
205	scsi scsi_cd scsi_disk scsi_periph silicon_image_3112
206	usb usb_disk <usb>ehci <usb>ohci <usb>uhci <usb>xhci
207	virtio virtio_block virtio_pci virtio_scsi
208;
209
210# add-ons
211AddFilesToPackage add-ons accelerants	: $(SYSTEM_ADD_ONS_ACCELERANTS) ;
212AddFilesToPackage add-ons Translators	: $(SYSTEM_ADD_ONS_TRANSLATORS) ;
213AddFilesToPackage add-ons locale catalogs : $(SYSTEM_ADD_ONS_LOCALE_CATALOGS) ;
214
215AddFilesToPackage add-ons mail_daemon inbound_protocols		: POP3
216	IMAP ;
217AddFilesToPackage add-ons mail_daemon outbound_protocols 	: SMTP ;
218AddFilesToPackage add-ons mail_daemon inbound_filters
219	: MatchHeader SpamFilter NewMailNotification ;
220AddFilesToPackage add-ons mail_daemon outbound_filters		: Fortune ;
221
222AddFilesToPackage add-ons media : $(SYSTEM_ADD_ONS_MEDIA) ;
223AddFilesToPackage add-ons media plugins : $(SYSTEM_ADD_ONS_MEDIA_PLUGINS) ;
224
225AddFilesToPackage add-ons Network\ Settings
226	: IPv4Interface IPv6Interface DNSClientService FTPService SSHService
227		TelnetService ;
228
229AddFilesToPackage add-ons Tracker
230	: FileType Mark\ as… Mark\ as\ Read Open\ Target\ Folder
231		Open\ Terminal ZipOMatic ;
232AddSymlinkToPackage add-ons Tracker
233	: /boot/system/preferences/Backgrounds : Background ;
234AddSymlinkToPackage add-ons Tracker
235	: /boot/system/apps/TextSearch : TextSearch ;
236AddSymlinkToPackage add-ons Tracker
237	: /boot/system/apps/DiskUsage : DiskUsage ;
238
239AddFilesToPackage add-ons input_server devices
240	: <input>keyboard <input>mouse <input>tablet <input>wacom ;
241AddFilesToPackage add-ons input_server filters
242	: screen_saver shortcut_catcher switch_workspace ;
243AddDirectoryToPackage add-ons input_server methods ;
244
245AddFilesToPackage add-ons kernel network : <net>notifications stack ;
246AddFilesToPackage add-ons kernel network : dns_resolver ;
247AddFilesToPackage add-ons kernel network devices : $(SYSTEM_NETWORK_DEVICES) ;
248AddFilesToPackage add-ons kernel network datalink_protocols
249	: $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ;
250AddFilesToPackage add-ons kernel network ppp : $(SYSTEM_NETWORK_PPP) ;
251AddFilesToPackage add-ons kernel network protocols
252	: $(SYSTEM_NETWORK_PROTOCOLS) ;
253
254AddFilesToPackage add-ons Print : $(SYSTEM_ADD_ONS_PRINT) ;
255AddFilesToPackage add-ons Print transport
256	: $(SYSTEM_ADD_ONS_PRINT_TRANSPORT) ;
257AddFilesToPackage add-ons Screen\ Savers : $(SYSTEM_ADD_ONS_SCREENSAVERS) ;
258
259AddFilesToPackage add-ons disk_systems
260	: <disk_system>fat <disk_system>intel <disk_system>gpt <disk_system>bfs
261		<disk_system>ntfs ;
262
263# Kernel bluetooth stack
264AddFilesToPackage add-ons kernel bluetooth : $(SYSTEM_BT_STACK) ;
265
266# decorators
267AddFilesToPackage add-ons decorators : BeDecorator ;
268	# MacDecorator WinDecorator
269
270# the MIME DB
271CopyDirectoryToPackage data : <mimedb>mime_db : : : isTarget ;
272
273
274# Deskbar menu symlinks
275
276# "Applications" links
277local linkTarget ;
278for linkTarget in $(DESKBAR_APPLICATIONS) {
279	AddSymlinkToPackage data deskbar menu Applications
280		: ../../../../apps/$(linkTarget) : $(linkTarget) ;
281}
282
283# "Desktop applets" links
284for linkTarget in $(DESKBAR_DESKTOP_APPLETS) {
285	AddSymlinkToPackage data deskbar menu Desktop\ applets
286		: ../../../../apps/$(linkTarget) : $(linkTarget) ;
287}
288
289# "Preferences" links
290AddDirectoryToPackage data deskbar menu Preferences ;
291DESKBAR_PREFERENCES = $(SYSTEM_PREFERENCES:B) ;
292for linkTarget in $(DESKBAR_PREFERENCES) {
293	AddSymlinkToPackage data deskbar menu Preferences
294		: ../../../../preferences/$(linkTarget)
295		: $(linkTarget) ;
296}
297
298# "Demo" links
299AddDirectoryToPackage data deskbar menu Demos ;
300for linkTarget in $(SYSTEM_DEMOS) {
301	AddSymlinkToPackage data deskbar menu Demos
302		: ../../../../demos/$(linkTarget) : $(linkTarget) ;
303}
304
305# Deskbar menu entries file
306AddFilesToPackage data deskbar : <deskbar>menu_entries ;
307
308
309# PDF Writer enconding files
310CopyDirectoryToPackage data
311	: [ FDirName $(HAIKU_TOP) src add-ons print drivers pdf encoding ]
312	: "PDF Writer" : -x Jamfile ;
313
314# licenses
315CopyDirectoryToPackage data
316	: [ FDirName $(HAIKU_TOP) data system data licenses ]
317	: licenses ;
318
319# netresolv support files
320CopyDirectoryToPackage data
321	: [ FDirName $(HAIKU_TOP) data system data network ]
322	: network ;
323
324# Copy documentation as per DiskUsage's license requirement.
325CopyDirectoryToPackage documentation
326	: [ FDirName $(HAIKU_TOP) docs apps diskusage ]
327	: diskusage ;
328
329# Copy documentation and sample programs as per PDFlib Lite's license
330# requirement.
331CopyDirectoryToPackage documentation
332	: [ FDirName $(HAIKU_TOP) src libs pdflib doc ]
333	: pdflib ;
334CopyDirectoryToPackage develop sample-code
335	: [ FDirName $(HAIKU_TOP) src libs pdflib bind pdflib ]
336	: pdflib ;
337
338
339# empty directory
340AddDirectoryToPackage data empty ;
341
342
343BuildHaikuPackage $(haikuPackage) : haiku ;
344