xref: /haiku/build/jam/packages/Haiku (revision 529cd177b573aaba391c8adc9c9f5ad76a14bf81)
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 ;
44AddFilesToPackage add-ons kernel busses virtio : virtio_pci ;
45AddFilesToPackage add-ons kernel console : vga_text ;
46AddFilesToPackage add-ons kernel debugger
47	: <kdebug>demangle <kdebug>disasm@x86 <kdebug>hangman
48	  <kdebug>invalidate_on_exit <kdebug>usb_keyboard <kdebug>qrencode@libqrencode
49	  <kdebug>run_on_exit ;
50AddFilesToPackage add-ons kernel file_systems : $(SYSTEM_ADD_ONS_FILE_SYSTEMS) ;
51AddFilesToPackage add-ons kernel generic
52	: ata_adapter@ata bios@x86,x86_64 dpc ide_adapter@ide
53		locked_pool mpu401 scsi_periph <module>tty ;
54AddFilesToPackage add-ons kernel partitioning_systems
55	: amiga_rdb@m68k apple@ppc efi_gpt intel session ;
56AddFilesToPackage add-ons kernel interrupt_controllers : openpic@ppc ;
57AddFilesToPackage add-ons kernel power cpufreq : intel_pstates@x86,x86_64 ;
58AddFilesToPackage add-ons kernel power cpuidle : intel_cstates@x86,x86_64 ;
59
60if $(TARGET_ARCH) = x86 || $(TARGET_ARCH) = x86_64 {
61	AddFilesToPackage add-ons kernel cpu : generic_x86 ;
62}
63
64# drivers
65AddNewDriversToPackage disk scsi	: scsi_cd scsi_disk ;
66AddNewDriversToPackage disk virtual : virtio_block ;
67AddNewDriversToPackage power		: $(SYSTEM_ADD_ONS_DRIVERS_POWER) ;
68#AddNewDriversToPackage display		: display_adapter@x86 ;
69
70# legacy drivers
71AddDriversToPackage					: console dprintf null <driver>tty zero ;
72AddDriversToPackage audio hmulti	: $(SYSTEM_ADD_ONS_DRIVERS_AUDIO) ;
73AddDriversToPackage audio old		: $(SYSTEM_ADD_ONS_DRIVERS_AUDIO_OLD) ;
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 usb		: usb_floppy ;
79AddDriversToPackage printer usb		: usb_printer ;
80AddDriversToPackage disk virtual	: nbd ;
81AddDriversToPackage dvb				: cx23882 ;
82AddDriversToPackage graphics		: $(SYSTEM_ADD_ONS_DRIVERS_GRAPHICS) ;
83AddDriversToPackage input			: ps2_hid usb_hid wacom ;
84AddDriversToPackage misc			: <driver>poke <driver>mem ;
85AddDriversToPackage net				: $(SYSTEM_ADD_ONS_DRIVERS_NET) ;
86AddDriversToPackage ports			: pc_serial usb_serial ;
87
88# kernel
89AddFilesToPackage : <revisioned>kernel_$(TARGET_ARCH) ;
90
91# libs
92AddLibrariesToPackage lib
93	: [ HaikuImageGetSystemLibs ] [ HaikuImageGetPrivateSystemLibs ] ;
94
95# libnetwork.so replaces quite a few libraries
96if $(HAIKU_GCC_VERSION_$(architecture)[1]) = 2 {
97	local libNetworkAliases = libsocket.so libbind.so libnet.so ;
98	local lib ;
99	for lib in $(libNetworkAliases) {
100		AddSymlinkToPackage lib : libnetwork.so : $(lib) ;
101	}
102
103	AddSymlinkToPackage lib : libbnetapi.so : libnetapi.so ;
104}
105
106
107# TODO: Remove when the packages have been rebuilt!
108AddSymlinkToPackage lib : libbe.so : liblocale.so ;
109
110# servers
111AddFilesToPackage servers : $(SYSTEM_SERVERS) ;
112
113# apps
114AddFilesToPackage  				: runtime_loader Deskbar Tracker ;
115AddFilesToPackage bin			: $(SYSTEM_BIN) consoled ;
116AddFilesToPackage apps			: $(SYSTEM_APPS) ;
117AddFilesToPackage preferences	: $(SYSTEM_PREFERENCES) ;
118AddFilesToPackage demos			: $(SYSTEM_DEMOS) ;
119
120SEARCH on install-wifi-firmwares.sh = [ FDirName $(HAIKU_TOP) data bin ] ;
121AddFilesToPackage bin : install-wifi-firmwares.sh ;
122
123AddSymlinkToPackage bin : trash : untrash ;
124AddSymlinkToPackage bin : less : more ;
125AddSymlinkToPackage bin : gzip : gunzip ;
126AddSymlinkToPackage bin : gzip : zcat ;
127AddSymlinkToPackage bin : zdiff : zcmp ;
128AddSymlinkToPackage bin : unzip : zipinfo ;
129
130# scripts and data files
131local bootScripts = Bootscript Bootscript.cd SetupEnvironment Netscript
132	InstallerInitScript InstallerFinishScript ;
133SEARCH on $(bootScripts) = [ FDirName $(HAIKU_TOP) data system boot ] ;
134AddFilesToPackage boot : $(bootScripts) ;
135
136# post install scripts
137local postInstallFiles = add_catalog_entry_attributes.sh
138	default_deskbar_items.sh ;
139postInstallFiles = $(postInstallFiles:G=post-install) ;
140SEARCH on $(postInstallFiles)
141	= [ FDirName $(HAIKU_TOP) data system boot post_install ] ;
142AddFilesToPackage boot post-install : $(postInstallFiles) ;
143
144# artwork and sounds
145local logoArtwork =
146	$(HAIKU_INCLUDE_TRADEMARKS)"HAIKU logo - white on blue - big.png"
147	$(HAIKU_INCLUDE_TRADEMARKS)"HAIKU logo - white on blue - normal.png" ;
148SEARCH on $(logoArtwork) = [ FDirName $(HAIKU_TOP) data artwork ] ;
149AddFilesToPackage data artwork : $(logoArtwork) ;
150
151# Mail spell check dictionaries
152local spellFiles = words geekspeak ;
153spellFiles = $(spellFiles:G=spell) ;
154SEARCH on $(spellFiles) = [ FDirName $(HAIKU_TOP) src apps mail ] ;
155AddFilesToPackage data spell_check word_dictionary : $(spellFiles) ;
156
157local fortuneFiles = [ Glob $(HAIKU_TOP)/data/system/data/fortunes
158	: [a-zA-Z0-9]* ] ;
159fortuneFiles = $(fortuneFiles:G=data!fortunes) ;
160AddFilesToPackage data fortunes : $(fortuneFiles) ;
161
162local fontDir = [ FDirName $(HAIKU_TOP) data system data fonts ] ;
163local psFonts = [ Glob $(fontDir)/psfonts : *.afm *.pfb ] ;
164local ttFonts = [ Glob $(fontDir)/ttfonts : *.ttf ] ;
165AddFilesToPackage data fonts psfonts : $(psFonts) ;
166AddFilesToPackage data fonts ttfonts : $(ttFonts) ;
167
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
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 ata_adapter@ata
189	bfs
190	config_manager
191	dpc
192	efi_gpt
193	generic_ide_pci
194	ide@ide ide_adapter@ide ide_isa@x86 isa@x86,x86_64 intel it8211
195	legacy_sata locked_pool
196	openpic@ppc
197	packagefs pci
198	scsi scsi_cd scsi_disk scsi_periph silicon_image_3112
199	usb usb_disk <usb>ehci <usb>ohci <usb>uhci
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 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) ;
215AddFilesToPackage add-ons media plugins : $(SYSTEM_ADD_ONS_MEDIA_PLUGINS) ;
216
217AddFilesToPackage add-ons Network\ Setup : Interfaces Services ;
218
219AddFilesToPackage add-ons Tracker
220	: FileType Mark\ as… Mark\ as\ Read Open\ Target\ Folder
221		Open\ Terminal ZipOMatic ;
222AddSymlinkToPackage add-ons Tracker
223	: /boot/system/preferences/Backgrounds : Background ;
224AddSymlinkToPackage add-ons Tracker
225	: /boot/system/apps/TextSearch : TextSearch ;
226AddSymlinkToPackage add-ons Tracker
227	: /boot/system/apps/DiskUsage : DiskUsage ;
228
229AddFilesToPackage add-ons input_server devices
230	: <input>keyboard <input>mouse <input>tablet <input>wacom ;
231AddFilesToPackage add-ons input_server filters
232	: screen_saver shortcut_catcher ;
233
234AddFilesToPackage add-ons kernel network : <net>notifications stack ;
235AddFilesToPackage add-ons kernel network : dns_resolver ;
236AddFilesToPackage add-ons kernel network devices : $(SYSTEM_NETWORK_DEVICES) ;
237AddFilesToPackage add-ons kernel network datalink_protocols
238	: $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ;
239AddFilesToPackage add-ons kernel network ppp: $(SYSTEM_NETWORK_PPP) ;
240AddFilesToPackage add-ons kernel network protocols
241	: $(SYSTEM_NETWORK_PROTOCOLS) ;
242
243AddFilesToPackage add-ons Print : $(SYSTEM_ADD_ONS_PRINT) ;
244AddFilesToPackage add-ons Print transport
245	: $(SYSTEM_ADD_ONS_PRINT_TRANSPORT) ;
246AddFilesToPackage add-ons Screen\ Savers : $(SYSTEM_ADD_ONS_SCREENSAVERS) ;
247
248AddFilesToPackage add-ons disk_systems
249	: <disk_system>intel <disk_system>gpt <disk_system>bfs <disk_system>ntfs ;
250
251
252# the MIME DB
253CopyDirectoryToPackage data : <mimedb>mime_db : : : isTarget ;
254
255
256# Deskbar menu symlinks
257
258# "Applications" links
259local linkTarget ;
260for linkTarget in $(DESKBAR_APPLICATIONS) {
261	AddSymlinkToPackage data deskbar menu Applications
262		: ../../../../apps/$(linkTarget) : $(linkTarget) ;
263}
264
265# "Desktop applets" links
266for linkTarget in $(DESKBAR_DESKTOP_APPLETS) {
267	AddSymlinkToPackage data deskbar menu Desktop\ applets
268		: ../../../../apps/$(linkTarget) : $(linkTarget) ;
269}
270
271# "Preferences" links
272AddDirectoryToPackage data deskbar menu Preferences ;
273DESKBAR_PREFERENCES = $(SYSTEM_PREFERENCES:B) ;
274for linkTarget in $(DESKBAR_PREFERENCES) {
275	AddSymlinkToPackage data deskbar menu Preferences
276		: ../../../../preferences/$(linkTarget)
277		: $(linkTarget) ;
278}
279
280# "Demo" links
281AddDirectoryToPackage data deskbar menu Demos ;
282for linkTarget in $(SYSTEM_DEMOS) {
283	AddSymlinkToPackage data deskbar menu Demos
284		: ../../../../demos/$(linkTarget) : $(linkTarget) ;
285}
286
287# Deskbar menu entries file
288AddFilesToPackage data deskbar : <deskbar>menu_entries ;
289
290
291# PDF Writer enconding files
292CopyDirectoryToPackage data
293	: [ FDirName $(HAIKU_TOP) src add-ons print drivers pdf encoding ]
294	: "PDF Writer" : -x Jamfile ;
295
296# licenses
297CopyDirectoryToPackage data
298	: [ FDirName $(HAIKU_TOP) data system data licenses ]
299	: licenses ;
300
301# Copy documentation as per DiskUsage's license requirement.
302CopyDirectoryToPackage documentation
303	: [ FDirName $(HAIKU_TOP) docs apps diskusage ]
304	: diskusage ;
305
306# Copy documentation and sample programs as per PDFlib Lite's license
307# requirement.
308CopyDirectoryToPackage documentation
309	: [ FDirName $(HAIKU_TOP) src libs pdflib doc ]
310	: pdflib ;
311CopyDirectoryToPackage develop sample-code
312	: [ FDirName $(HAIKU_TOP) src libs pdflib bind pdflib ]
313	: pdflib ;
314
315
316# empty directory
317AddDirectoryToPackage data empty ;
318
319
320BuildHaikuPackage $(haikuPackage) : haiku ;
321