1local architecture = $(HAIKU_PACKAGING_ARCHS[1]) ; 2 3 4local haikuPackage = haiku.hpkg ; 5HaikuPackage $(haikuPackage) ; 6 7 8# wifi firmware 9for driver in $(SYSTEM_ADD_ONS_DRIVERS_NET) { 10 local package = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_PACKAGE) ] ; 11 local archive = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_ARCHIVE) ] ; 12 local extract = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_DO_EXTRACT) ] ; 13 if $(archive) { 14 AddWifiFirmwareToPackage $(driver) : $(package) : $(archive) 15 : $(extract) ; 16 } 17 local packages = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_PACKAGES) ] ; 18 local archives = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_ARCHIVES) ] ; 19 for archive in $(archives) { 20 AddWifiFirmwareToPackage $(driver) : $(packages[1]) : $(archive) 21 : $(extract) ; 22 packages = $(packages[2-]) ; 23 } 24} 25 26 27# modules 28AddFilesToPackage add-ons kernel bus_managers : $(SYSTEM_ADD_ONS_BUS_MANAGERS) ; 29AddFilesToPackage add-ons kernel busses agp_gart : <agp_gart>intel@x86,x86_64 ; 30 31if $(HAIKU_ATA_STACK) = 1 { 32 AddFilesToPackage add-ons kernel busses ata 33 : generic_ide_pci it8211 legacy_sata silicon_image_3112 ide_isa@x86 ; 34} else { 35 AddFilesToPackage add-ons kernel busses ide 36 : generic_ide_pci it8211 legacy_sata silicon_image_3112 ide_isa@x86 ; 37} 38 39AddFilesToPackage add-ons kernel busses random : virtio_rng ; 40AddFilesToPackage add-ons kernel busses scsi : ahci virtio_scsi ; 41AddFilesToPackage add-ons kernel busses usb : <usb>uhci <usb>ohci <usb>ehci ; 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 <kdebug>hangman 46 <kdebug>invalidate_on_exit <kdebug>usb_keyboard <kdebug>qrencode 47 <kdebug>run_on_exit ; 48AddFilesToPackage add-ons kernel file_systems : $(SYSTEM_ADD_ONS_FILE_SYSTEMS) ; 49AddFilesToPackage add-ons kernel generic 50 : ata_adapter@ata bios@x86,x86_64 dpc ide_adapter@ide 51 locked_pool mpu401 scsi_periph <module>tty ; 52AddFilesToPackage add-ons kernel partitioning_systems 53 : amiga_rdb apple efi_gpt intel session ; 54AddFilesToPackage add-ons kernel interrupt_controllers : openpic@ppc ; 55 56if $(TARGET_ARCH) = x86 || $(TARGET_ARCH) = x86_64 { 57 AddFilesToPackage add-ons kernel cpu : generic_x86 ; 58} 59 60# drivers 61AddNewDriversToPackage disk scsi : scsi_cd scsi_disk ; 62AddNewDriversToPackage disk virtual : virtio_block ; 63AddNewDriversToPackage power : enhanced_speedstep@x86 ; 64AddNewDriversToPackage power : $(SYSTEM_ADD_ONS_DRIVERS_POWER) ; 65#AddNewDriversToPackage display : display_controls@x86 ; 66 67# legacy drivers 68AddDriversToPackage : console dprintf null <driver>tty zero ; 69AddDriversToPackage audio hmulti : $(SYSTEM_ADD_ONS_DRIVERS_AUDIO) ; 70AddDriversToPackage audio old : $(SYSTEM_ADD_ONS_DRIVERS_AUDIO_OLD) ; 71AddDriversToPackage midi : $(SYSTEM_ADD_ONS_DRIVERS_MIDI) ; 72AddDriversToPackage bus : usb_raw fw_raw@x86 ; 73AddDriversToPackage disk floppy : pc_floppy@x86 ; 74AddDriversToPackage disk usb : usb_disk ; 75AddDriversToPackage disk usb : usb_floppy ; 76AddDriversToPackage printer usb : usb_printer ; 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 : 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# TODO: Remove when the packages have been rebuilt! 105AddSymlinkToPackage lib : libbe.so : liblocale.so ; 106 107# servers 108AddFilesToPackage servers : $(SYSTEM_SERVERS) ; 109 110# apps 111AddFilesToPackage : runtime_loader Deskbar Tracker ; 112AddFilesToPackage bin : $(SYSTEM_BIN) consoled ; 113AddFilesToPackage apps : $(SYSTEM_APPS) ; 114AddFilesToPackage preferences : $(SYSTEM_PREFERENCES) ; 115AddFilesToPackage demos : $(SYSTEM_DEMOS) ; 116 117SEARCH on install-wifi-firmwares.sh = [ FDirName $(HAIKU_TOP) data bin ] ; 118AddFilesToPackage bin : install-wifi-firmwares.sh ; 119 120AddSymlinkToPackage bin : bash : sh ; 121AddSymlinkToPackage bin : trash : untrash ; 122AddSymlinkToPackage bin : less : more ; 123AddSymlinkToPackage bin : gzip : gunzip ; 124AddSymlinkToPackage bin : gzip : zcat ; 125AddSymlinkToPackage bin : zdiff : zcmp ; 126AddSymlinkToPackage bin : unzip : zipinfo ; 127AddSymlinkToPackage bin : gawk : awk ; 128 129# scripts and data files 130local bootScripts = Bootscript Bootscript.cd SetupEnvironment Netscript 131 InstallerInitScript InstallerFinishScript ; 132SEARCH on $(bootScripts) = [ FDirName $(HAIKU_TOP) data system boot ] ; 133AddFilesToPackage boot : $(bootScripts) ; 134 135# post install scripts 136local postInstallFiles = add_catalog_entry_attributes.sh 137 default_deskbar_items.sh ; 138postInstallFiles = $(postInstallFiles:G=post-install) ; 139SEARCH on $(postInstallFiles) 140 = [ FDirName $(HAIKU_TOP) data system boot post_install ] ; 141AddFilesToPackage boot post-install : $(postInstallFiles) ; 142 143# Gutenprint data files 144CopyDirectoryToPackage data 145 : [ FDirName $(HAIKU_TOP) src libs print libgutenprint src xml ] 146 : gutenprint : -x *.c -x Makefile.am -x Makefile.in ; 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 ] ; 168local ttFonts = [ Glob $(fontDir)/ttfonts : *.ttf ] ; 169AddFilesToPackage data fonts psfonts : $(psFonts) ; 170AddFilesToPackage data fonts ttfonts : $(ttFonts) ; 171 172local cannaDir = [ FDirName $(HAIKU_TOP) data system data Canna ] ; 173local cannaDefault = [ Glob $(cannaDir)/default : *.canna *.gz ] ; 174local cannaDic = [ Glob $(cannaDir)/dic : *.cbp ] ; 175local cannaDicCanna = [ Glob $(cannaDir)/dic/canna 176 : *.cld *.ctd *.cbd *.dir ] ; 177AddFilesToPackage data Canna default : $(cannaDefault) ; 178AddFilesToPackage data Canna dic : $(cannaDic) ; 179AddFilesToPackage data Canna dic canna : $(cannaDicCanna) ; 180#AddDirectoryToPackage data Canna dic group ; 181#AddDirectoryToPackage data Canna dic user ; 182 # TODO: If those serve any purpose, they should probably live in a writable 183 # subtree. 184 185local keymapFiles = [ Glob [ FDirName $(HAIKU_TOP) src data keymaps ] 186 : *.keymap ] ; 187keymapFiles = $(keymapFiles:BG=keymap) ; 188AddFilesToPackage data Keymaps : $(keymapFiles) ; 189AddSymlinkToPackage data Keymaps : Swedish : Finnish ; 190AddSymlinkToPackage data Keymaps : Slovene : Croatian ; 191AddSymlinkToPackage data Keymaps : US-International : Brazilian ; 192 193# Copy keyboard layout files to the image one-by-one. 194local keyboardLayoutsDir 195 = [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts ] ; 196local keyboardLayoutFiles = 197 "Generic 104-key" 198 "Generic 105-key International" 199 "Kinesis Advantage" 200 "Kinesis Ergo Elan International" 201 "TypeMatrix 2030" ; 202keyboardLayoutFiles = $(keyboardLayoutFiles:G=keyboard-layout) ; 203SEARCH on $(keyboardLayoutFiles) = $(keyboardLayoutsDir) ; 204AddFilesToPackage data KeyboardLayouts 205 : $(keyboardLayoutFiles) ; 206 207# Add Apple Aluminum keyboard layout files to the image in an Apple Aluminum 208# subdirectory. The subdirectory is turned into a submenu in the Layout menu 209# of the Keymap preference app. 210local appleAluminumDir 211 = [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts 212 Apple\ Aluminum ] ; 213local appleAluminumFiles = 214 "Apple Aluminium Extended International" 215 "Apple Aluminium International" 216 "Apple Aluminum (US)" 217 "Apple Aluminum Extended (US)" ; 218appleAluminumFiles = $(appleAluminumFiles:G=keyboard-layout) ; 219SEARCH on $(appleAluminumFiles) = $(appleAluminumDir) ; 220AddFilesToPackage data KeyboardLayouts Apple\ Aluminum 221 : $(appleAluminumFiles) ; 222 223# Add ThinkPad keyboard layout files to the image in a ThinkPad 224# subdirectory. The subdirectory is turned into a submenu in the Layout menu 225# of the Keymap preference app. 226local thinkpadDir 227 = [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts ThinkPad ] ; 228local thinkPadFiles = 229 "ThinkPad (US)" 230 "ThinkPad International" 231 "ThinkPad T400s (US)" 232 "ThinkPad T400s International" 233 "ThinkPad X1 (US)" 234 "ThinkPad X1 International" 235 "ThinkPad X100e (US)" 236 "ThinkPad X100e International" ; 237thinkPadFiles = $(thinkPadFiles:G=keyboard-layout) ; 238SEARCH on $(thinkPadFiles) = $(thinkpadDir) ; 239AddFilesToPackage data KeyboardLayouts ThinkPad 240 : $(thinkPadFiles) ; 241 242# boot module links 243AddBootModuleSymlinksToPackage 244 acpi@x86,x86_64 ata@ata pci isa@x86,x86_64 config_manager dpc 245 ide@ide scsi usb 246 openpic@ppc 247 ata_adapter@ata ide_adapter@ide locked_pool scsi_periph 248 ahci generic_ide_pci it8211 legacy_sata silicon_image_3112 249 ide_isa@x86 250 <usb>uhci <usb>ohci <usb>ehci 251 scsi_cd scsi_disk usb_disk 252 virtio virtio_pci virtio_block virtio_scsi 253 efi_gpt 254 intel 255 bfs packagefs 256; 257 258# add-ons 259AddFilesToPackage add-ons accelerants : $(SYSTEM_ADD_ONS_ACCELERANTS) ; 260AddFilesToPackage add-ons Translators : $(SYSTEM_ADD_ONS_TRANSLATORS) ; 261AddFilesToPackage add-ons locale catalogs : $(SYSTEM_ADD_ONS_LOCALE_CATALOGS) ; 262 263AddFilesToPackage add-ons mail_daemon inbound_protocols : POP3 IMAP ; 264AddFilesToPackage add-ons mail_daemon outbound_protocols : SMTP ; 265AddFilesToPackage add-ons mail_daemon inbound_filters 266 : MatchHeader SpamFilter NewMailNotification ; 267AddFilesToPackage add-ons mail_daemon outbound_filters : Fortune ; 268 269AddFilesToPackage add-ons media : $(SYSTEM_ADD_ONS_MEDIA) ; 270AddFilesToPackage add-ons media plugins : $(SYSTEM_ADD_ONS_MEDIA_PLUGINS) ; 271 272AddFilesToPackage add-ons Tracker 273 : FileType Mark\ as… Mark\ as\ Read Open\ Target\ Folder 274 Open\ Terminal ZipOMatic ; 275AddSymlinkToPackage add-ons Tracker 276 : /boot/system/preferences/Backgrounds : Background ; 277AddSymlinkToPackage add-ons Tracker 278 : /boot/system/apps/TextSearch : TextSearch ; 279AddSymlinkToPackage add-ons Tracker 280 : /boot/system/apps/DiskUsage : DiskUsage ; 281 282AddFilesToPackage add-ons input_server devices 283 : <input>keyboard <input>mouse <input>tablet <input>wacom ; 284AddFilesToPackage add-ons input_server filters 285 : screen_saver shortcut_catcher ; 286 287AddFilesToPackage add-ons kernel network : <net>notifications stack ; 288AddFilesToPackage add-ons kernel network : dns_resolver ; 289AddFilesToPackage add-ons kernel network devices : $(SYSTEM_NETWORK_DEVICES) ; 290AddFilesToPackage add-ons kernel network datalink_protocols 291 : $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ; 292AddFilesToPackage add-ons kernel network ppp: $(SYSTEM_NETWORK_PPP) ; 293AddFilesToPackage add-ons kernel network protocols 294 : $(SYSTEM_NETWORK_PROTOCOLS) ; 295 296AddFilesToPackage add-ons Print : $(SYSTEM_ADD_ONS_PRINT) ; 297AddFilesToPackage add-ons Print transport 298 : $(SYSTEM_ADD_ONS_PRINT_TRANSPORT) ; 299AddFilesToPackage add-ons Screen\ Savers : $(SYSTEM_ADD_ONS_SCREENSAVERS) ; 300 301AddFilesToPackage add-ons disk_systems 302 : <disk_system>intel <disk_system>gpt <disk_system>bfs <disk_system>ntfs ; 303 304 305# the MIME DB 306CopyDirectoryToPackage data : <mimedb>mime_db : : : isTarget ; 307 308 309# Deskbar menu symlinks 310 311# "Applications" links 312DESKBAR_APPLICATIONS = ActivityMonitor CharacterMap CodyCam CDPlayer DeskCalc 313 Devices DiskProbe DriveSetup DiskUsage Expander HaikuDepot Icon-O-Matic 314 Installer Magnify Mail MediaConverter MediaPlayer MidiPlayer People PoorMan 315 Screenshot SerialConnect SoundRecorder StyledEdit Terminal TV 316; 317local linkTarget ; 318for linkTarget in $(DESKBAR_APPLICATIONS) { 319 AddSymlinkToPackage data deskbar menu Applications 320 : ../../../../apps/$(linkTarget) : $(linkTarget) ; 321} 322 323# "Desktop applets" links 324DESKBAR_DESKTOP_APPLETS = LaunchBox NetworkStatus PowerStatus ProcessController 325 Workspaces 326; 327for linkTarget in $(DESKBAR_DESKTOP_APPLETS) { 328 AddSymlinkToPackage data deskbar menu Desktop\ applets 329 : ../../../../apps/$(linkTarget) : $(linkTarget) ; 330} 331 332# "Preferences" links 333AddDirectoryToPackage data deskbar menu Preferences ; 334DESKBAR_PREFERENCES = $(SYSTEM_PREFERENCES:B) ; 335for linkTarget in $(DESKBAR_PREFERENCES) { 336 AddSymlinkToPackage data deskbar menu Preferences 337 : ../../../../preferences/$(linkTarget) 338 : $(linkTarget) ; 339} 340 341# "Demo" links 342AddDirectoryToPackage data deskbar menu Demos ; 343for linkTarget in $(SYSTEM_DEMOS) { 344 AddSymlinkToPackage data deskbar menu Demos 345 : ../../../../demos/$(linkTarget) : $(linkTarget) ; 346} 347 348# Deskbar menu entries file 349AddFilesToPackage data deskbar : <deskbar>menu_entries ; 350 351 352# optional 353# TODO: We should probably build another package (including the data files 354# above) that can be installed, if desired. 355AddFilesToPackage optional add-ons input_server methods : canna ; 356 357 358# PDF Writer enconding files 359CopyDirectoryToPackage data 360 : [ FDirName $(HAIKU_TOP) src add-ons print drivers pdf encoding ] 361 : "PDF Writer" : -x Jamfile ; 362 363# licenses 364CopyDirectoryToPackage data 365 : [ FDirName $(HAIKU_TOP) data system data licenses ] 366 : licenses ; 367 368# Copy documentation as per DiskUsage's license requirement. 369CopyDirectoryToPackage documentation 370 : [ FDirName $(HAIKU_TOP) docs apps diskusage ] 371 : diskusage ; 372 373# Copy documentation and sample programs as per PDFlib Lite's license 374# requirement. 375CopyDirectoryToPackage documentation 376 : [ FDirName $(HAIKU_TOP) src libs pdflib doc ] 377 : pdflib ; 378CopyDirectoryToPackage develop sample-code 379 : [ FDirName $(HAIKU_TOP) src libs pdflib bind pdflib ] 380 : pdflib ; 381 382 383# empty directory 384AddDirectoryToPackage data empty ; 385 386 387BuildHaikuPackage $(haikuPackage) : haiku ; 388