1local haikuPackage = haiku.hpkg ; 2HaikuPackage $(haikuPackage) ; 3 4 5# wifi firmware 6for driver in $(SYSTEM_ADD_ONS_DRIVERS_NET) { 7 local package = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_PACKAGE) ] ; 8 local archive = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_ARCHIVE) ] ; 9 local extract = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_DO_EXTRACT) ] ; 10 if $(archive) { 11 AddWifiFirmwareToPackage $(driver) : $(package) : $(archive) 12 : $(extract) ; 13 } 14 local packages = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_PACKAGES) ] ; 15 local archives = [ on $(driver) return $(HAIKU_WIFI_FIRMWARE_ARCHIVES) ] ; 16 for archive in $(archives) { 17 AddWifiFirmwareToPackage $(driver) : $(packages[1]) : $(archive) 18 : $(extract) ; 19 packages = $(packages[2-]) ; 20 } 21} 22 23 24# modules 25AddFilesToPackage add-ons kernel bus_managers : $(SYSTEM_ADD_ONS_BUS_MANAGERS) ; 26AddFilesToPackage add-ons kernel busses agp_gart : <agp_gart>intel@x86 ; 27 28if $(HAIKU_ATA_STACK) = 1 { 29 AddFilesToPackage add-ons kernel busses ata 30 : generic_ide_pci it8211 legacy_sata silicon_image_3112 ide_isa@x86 ; 31} else { 32 AddFilesToPackage add-ons kernel busses ide 33 : generic_ide_pci it8211 legacy_sata silicon_image_3112 ide_isa@x86 ; 34} 35 36AddFilesToPackage add-ons kernel busses scsi : ahci ; 37AddFilesToPackage add-ons kernel busses usb : <usb>uhci <usb>ohci <usb>ehci ; 38AddFilesToPackage add-ons kernel console : vga_text ; 39AddFilesToPackage add-ons kernel debugger 40 : <kdebug>demangle <kdebug>disasm@x86 <kdebug>hangman 41 <kdebug>invalidate_on_exit <kdebug>usb_keyboard <kdebug>qrencode 42 <kdebug>run_on_exit ; 43AddFilesToPackage add-ons kernel file_systems : $(SYSTEM_ADD_ONS_FILE_SYSTEMS) ; 44AddFilesToPackage add-ons kernel generic 45 : ata_adapter@ata bios@x86,x86_64 dpc ide_adapter@ide 46 locked_pool mpu401 scsi_periph <module>tty ; 47AddFilesToPackage add-ons kernel partitioning_systems 48 : amiga_rdb apple efi_gpt intel session ; 49AddFilesToPackage add-ons kernel interrupt_controllers : openpic@ppc ; 50 51if $(TARGET_ARCH) = x86 || $(TARGET_ARCH) = x86_64 { 52 AddFilesToPackage add-ons kernel cpu : generic_x86 ; 53} 54 55# drivers 56AddNewDriversToPackage disk scsi : scsi_cd scsi_disk ; 57AddNewDriversToPackage power : enhanced_speedstep@x86 ; 58AddNewDriversToPackage power : acpi_battery@x86 ; 59#AddNewDriversToPackage display : display_controls@x86 ; 60 61# legacy drivers 62AddDriversToPackage : console dprintf null random <driver>tty 63 zero ; 64AddDriversToPackage audio hmulti : $(SYSTEM_ADD_ONS_DRIVERS_AUDIO) ; 65AddDriversToPackage audio old : $(SYSTEM_ADD_ONS_DRIVERS_AUDIO_OLD) ; 66AddDriversToPackage midi : $(SYSTEM_ADD_ONS_DRIVERS_MIDI) ; 67AddDriversToPackage bus : usb_raw fw_raw@x86 ; 68AddDriversToPackage disk floppy : pc_floppy@x86 ; 69AddDriversToPackage disk usb : usb_disk ; 70AddDriversToPackage disk usb : usb_floppy ; 71AddDriversToPackage printer usb : usb_printer ; 72AddDriversToPackage disk virtual : nbd ; 73AddDriversToPackage dvb : cx23882 ; 74AddDriversToPackage graphics : $(SYSTEM_ADD_ONS_DRIVERS_GRAPHICS) ; 75AddDriversToPackage input : ps2_hid usb_hid wacom ; 76AddDriversToPackage misc : <driver>poke <driver>mem ; 77AddDriversToPackage net : $(SYSTEM_ADD_ONS_DRIVERS_NET) ; 78AddDriversToPackage ports : usb_serial ; 79AddDriversToPackage power : $(SYSTEM_ADD_ONS_DRIVERS_POWER) ; 80 81# kernel 82AddFilesToPackage : <revisioned>kernel_$(TARGET_ARCH) ; 83 84# libs 85AddLibrariesToPackage lib : $(SYSTEM_LIBS) $(PRIVATE_SYSTEM_LIBS) ; 86 87# libnetwork.so replaces quite a few libraries 88SYSTEM_LIBS_LIBNETWORK_ALIASES = libsocket.so libbind.so libnet.so ; 89 90if $(HAIKU_GCC_VERSION[1]) = 2 { 91 local lib ; 92 for lib in $(SYSTEM_LIBS_LIBNETWORK_ALIASES) { 93 AddSymlinkToPackage lib : libnetwork.so : $(lib) ; 94 } 95 96 AddSymlinkToPackage lib : libbnetapi.so : libnetapi.so ; 97} 98 99 100SYSTEM_LIBS_ALIASES = 101 $(SYSTEM_LIBS_LIBNETWORK_ALIASES) 102 libnetapi.so 103; 104 105OPTIONAL_LIBS_ALIASES = 106 libjpeg.so 107 libpng.so 108 libz.so 109; 110 111# TODO: Remove the following symlinks when the libraries have been packaged 112# properly! 113# libpng.so links to the current libpng 114AddSymlinkToPackage lib : $(HAIKU_LIBPNG_CURRENT_LIB:BS) 115 : $(HAIKU_LIBPNG_CURRENT_LINK) : : true ; 116AddSymlinkToPackage lib : $(HAIKU_LIBPNG_CURRENT_LINK) 117 : libpng.so : : true ; 118 119# libjpeg.so links to the current libjpeg 120AddSymlinkToPackage lib : $(HAIKU_JPEG_CURRENT_LIB:BS) 121 : $(HAIKU_JPEG_CURRENT_LINK) : : true ; 122AddSymlinkToPackage lib : $(HAIKU_JPEG_CURRENT_LINK) 123 : libjpeg.so : : true ; 124 125# TODO: Remove when the packages have been rebuilt! 126AddSymlinkToPackage lib : libbe.so : liblocale.so ; 127 128# servers 129AddFilesToPackage servers : $(SYSTEM_SERVERS) ; 130 131# apps 132AddFilesToPackage : runtime_loader Deskbar Tracker ; 133AddFilesToPackage bin : $(SYSTEM_BIN) consoled ; 134AddFilesToPackage apps : $(SYSTEM_APPS) ; 135AddFilesToPackage preferences : $(SYSTEM_PREFERENCES) ; 136AddFilesToPackage demos : $(SYSTEM_DEMOS) ; 137 138SEARCH on which = [ FDirName $(HAIKU_TOP) data bin ] ; 139AddFilesToPackage bin : which ; 140SEARCH on install-wifi-firmwares.sh = [ FDirName $(HAIKU_TOP) data bin ] ; 141AddFilesToPackage bin : install-wifi-firmwares.sh ; 142 143AddSymlinkToPackage bin : bash : sh ; 144AddSymlinkToPackage bin : trash : untrash ; 145AddSymlinkToPackage bin : less : more ; 146AddSymlinkToPackage bin : gzip : gunzip ; 147AddSymlinkToPackage bin : gzip : zcat ; 148AddSymlinkToPackage bin : zdiff : zcmp ; 149AddSymlinkToPackage bin : unzip : zipinfo ; 150AddSymlinkToPackage bin : gawk : awk ; 151 152# scripts and data files 153local bootScripts = Bootscript Bootscript.cd SetupEnvironment Netscript 154 InstallerInitScript InstallerFinishScript ; 155SEARCH on $(bootScripts) = [ FDirName $(HAIKU_TOP) data system boot ] ; 156AddFilesToPackage boot : $(bootScripts) ; 157 158# post install scripts 159local postInstallFiles = add_catalog_entry_attributes.sh 160 default_deskbar_items.sh ; 161postInstallFiles = $(postInstallFiles:G=post-install) ; 162SEARCH on $(postInstallFiles) 163 = [ FDirName $(HAIKU_TOP) data common boot post_install ] ; 164AddFilesToPackage boot post-install : $(postInstallFiles) ; 165 166# Gutenprint data files 167CopyDirectoryToPackage data 168 : [ FDirName $(HAIKU_TOP) src libs print libgutenprint src xml ] 169 : gutenprint : -x *.c -x Makefile.am -x Makefile.in ; 170 171# artwork and sounds 172local logoArtwork = 173 $(HAIKU_INCLUDE_TRADEMARKS)"HAIKU logo - white on blue - big.png" 174 $(HAIKU_INCLUDE_TRADEMARKS)"HAIKU logo - white on blue - normal.png" ; 175SEARCH on $(logoArtwork) = [ FDirName $(HAIKU_TOP) data artwork ] ; 176AddFilesToPackage data artwork : $(logoArtwork) ; 177 178# Mail spell check dictionaries 179local spellFiles = words geekspeak ; 180spellFiles = $(spellFiles:G=spell) ; 181SEARCH on $(spellFiles) = [ FDirName $(HAIKU_TOP) src apps mail ] ; 182AddFilesToPackage data spell_check word_dictionary : $(spellFiles) ; 183 184local fortuneFiles = [ Glob $(HAIKU_TOP)/data/system/data/fortunes 185 : [a-zA-Z0-9]* ] ; 186fortuneFiles = $(fortuneFiles:G=data!fortunes) ; 187AddFilesToPackage data fortunes : $(fortuneFiles) ; 188 189local fontDir = [ FDirName $(HAIKU_TOP) data system data fonts ] ; 190local psFonts = [ Glob $(fontDir)/psfonts : *.afm *.pfb ] ; 191local ttFonts = [ Glob $(fontDir)/ttfonts : *.ttf ] ; 192AddFilesToPackage data fonts psfonts : $(psFonts) ; 193AddFilesToPackage data fonts ttfonts : $(ttFonts) ; 194 195local cannaDir = [ FDirName $(HAIKU_TOP) data system data Canna ] ; 196local cannaDefault = [ Glob $(cannaDir)/default : *.canna *.gz ] ; 197local cannaDic = [ Glob $(cannaDir)/dic : *.cbp ] ; 198local cannaDicCanna = [ Glob $(cannaDir)/dic/canna 199 : *.cld *.ctd *.cbd *.dir ] ; 200AddFilesToPackage data Canna default : $(cannaDefault) ; 201AddFilesToPackage data Canna dic : $(cannaDic) ; 202AddFilesToPackage data Canna dic canna : $(cannaDicCanna) ; 203#AddDirectoryToPackage data Canna dic group ; 204#AddDirectoryToPackage data Canna dic user ; 205 # TODO: If those serve any purpose, they should probably live in a writable 206 # subtree. 207 208local keymapFiles = [ Glob [ FDirName $(HAIKU_TOP) src data keymaps ] 209 : *.keymap ] ; 210keymapFiles = $(keymapFiles:BG=keymap) ; 211AddFilesToPackage data Keymaps : $(keymapFiles) ; 212AddSymlinkToPackage data Keymaps : Swedish : Finnish ; 213AddSymlinkToPackage data Keymaps : Slovene : Croatian ; 214AddSymlinkToPackage data Keymaps : US-International : Brazilian ; 215 216# Copy keyboard layout files to the image one-by-one. 217local keyboardLayoutsDir 218 = [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts ] ; 219local keyboardLayoutFiles = 220 "Generic 104-key" 221 "Generic 105-key International" 222 "Kinesis Advantage" 223 "Kinesis Ergo Elan International" 224 "TypeMatrix 2030" ; 225keyboardLayoutFiles = $(keyboardLayoutFiles:G=keyboard-layout) ; 226SEARCH on $(keyboardLayoutFiles) = $(keyboardLayoutsDir) ; 227AddFilesToPackage data KeyboardLayouts 228 : $(keyboardLayoutFiles) ; 229 230# Add Apple Aluminum keyboard layout files to the image in an Apple Aluminum 231# subdirectory. The subdirectory is turned into a submenu in the Layout menu 232# of the Keymap preference app. 233local appleAluminumDir 234 = [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts 235 Apple\ Aluminum ] ; 236local appleAluminumFiles = 237 "Apple Aluminium Extended International" 238 "Apple Aluminium International" 239 "Apple Aluminum (US)" 240 "Apple Aluminum Extended (US)" ; 241appleAluminumFiles = $(appleAluminumFiles:G=keyboard-layout) ; 242SEARCH on $(appleAluminumFiles) = $(appleAluminumDir) ; 243AddFilesToPackage data KeyboardLayouts Apple\ Aluminum 244 : $(appleAluminumFiles) ; 245 246# Add ThinkPad keyboard layout files to the image in a ThinkPad 247# subdirectory. The subdirectory is turned into a submenu in the Layout menu 248# of the Keymap preference app. 249local thinkpadDir 250 = [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts ThinkPad ] ; 251local thinkPadFiles = 252 "ThinkPad (US)" 253 "ThinkPad International" 254 "ThinkPad T400s (US)" 255 "ThinkPad T400s International" 256 "ThinkPad X1 (US)" 257 "ThinkPad X1 International" 258 "ThinkPad X100e (US)" 259 "ThinkPad X100e International" ; 260thinkPadFiles = $(thinkPadFiles:G=keyboard-layout) ; 261SEARCH on $(thinkPadFiles) = $(thinkpadDir) ; 262AddFilesToPackage data KeyboardLayouts ThinkPad 263 : $(thinkPadFiles) ; 264 265# boot module links 266AddBootModuleSymlinksToPackage 267 acpi@x86 ata@ata pci isa@x86 config_manager dpc 268 ide@ide scsi usb 269 openpic@ppc 270 ata_adapter@ata ide_adapter@ide locked_pool scsi_periph 271 ahci generic_ide_pci it8211 legacy_sata silicon_image_3112 272 ide_isa@x86 273 <usb>uhci <usb>ohci <usb>ehci 274 scsi_cd scsi_disk usb_disk 275 efi_gpt 276 intel 277 bfs packagefs 278; 279 280# add-ons 281AddFilesToPackage add-ons accelerants : $(SYSTEM_ADD_ONS_ACCELERANTS) ; 282AddFilesToPackage add-ons Translators : $(SYSTEM_ADD_ONS_TRANSLATORS) ; 283AddFilesToPackage add-ons locale catalogs : $(SYSTEM_ADD_ONS_LOCALE_CATALOGS) ; 284 285AddFilesToPackage add-ons opengl : 286 x86 @{ 287 Legacy\ Software\ Rasterizer@gcc2 288 Software\ Rasterizer@!gcc2 289 }@ # x86 290; 291 292AddFilesToPackage add-ons mail_daemon inbound_protocols : POP3 IMAP ; 293AddFilesToPackage add-ons mail_daemon outbound_protocols : SMTP ; 294AddFilesToPackage add-ons mail_daemon inbound_filters 295 : MatchHeader SpamFilter NewMailNotification ; 296AddFilesToPackage add-ons mail_daemon outbound_filters : Fortune ; 297 298AddFilesToPackage add-ons media : $(SYSTEM_ADD_ONS_MEDIA) ; 299AddFilesToPackage add-ons media plugins : $(SYSTEM_ADD_ONS_MEDIA_PLUGINS) ; 300 301AddFilesToPackage add-ons Tracker 302 : FileType-F Mark\ as… Mark\ as\ Read-R Open\ Target\ Folder-O 303 Open\ Terminal-T ZipOMatic-Z ; 304AddSymlinkToPackage add-ons Tracker 305 : /boot/system/preferences/Backgrounds : Background-B ; 306AddSymlinkToPackage add-ons Tracker 307 : /boot/system/apps/TextSearch : TextSearch-G ; 308AddSymlinkToPackage add-ons Tracker 309 : /boot/system/apps/DiskUsage : DiskUsage-I ; 310 311AddFilesToPackage add-ons input_server devices 312 : <input>keyboard <input>mouse <input>tablet <input>wacom ; 313AddFilesToPackage add-ons input_server filters 314 : screen_saver shortcut_catcher ; 315 316AddFilesToPackage add-ons kernel network : <net>notifications stack ; 317AddFilesToPackage add-ons kernel network : dns_resolver ; 318AddFilesToPackage add-ons kernel network devices : $(SYSTEM_NETWORK_DEVICES) ; 319AddFilesToPackage add-ons kernel network datalink_protocols 320 : $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ; 321AddFilesToPackage add-ons kernel network ppp: $(SYSTEM_NETWORK_PPP) ; 322AddFilesToPackage add-ons kernel network protocols 323 : $(SYSTEM_NETWORK_PROTOCOLS) ; 324 325AddFilesToPackage add-ons Print : $(SYSTEM_ADD_ONS_PRINT) ; 326AddFilesToPackage add-ons Print transport 327 : $(SYSTEM_ADD_ONS_PRINT_TRANSPORT) ; 328AddFilesToPackage add-ons Screen\ Savers : $(SYSTEM_ADD_ONS_SCREENSAVERS) ; 329 330AddFilesToPackage add-ons disk_systems 331 : <disk_system>intel <disk_system>gpt <disk_system>bfs <disk_system>ntfs ; 332 333 334# the MIME DB 335CopyDirectoryToPackage data : <mimedb>mime_db : : : isTarget ; 336 337 338# optional 339# TODO: We should probably build another package (including the data files 340# above) that can be installed, if desired. 341AddFilesToPackage optional add-ons input_server methods : canna ; 342 343 344# PDF Writer enconding files 345CopyDirectoryToPackage data 346 : [ FDirName $(HAIKU_TOP) src add-ons print drivers pdf encoding ] 347 : "PDF Writer" : -x Jamfile ; 348 349# licenses 350CopyDirectoryToPackage data 351 : [ FDirName $(HAIKU_TOP) data system data licenses ] 352 : licenses ; 353 354# Copy documentation as per DiskUsage's license requirement. 355CopyDirectoryToPackage documentation 356 : [ FDirName $(HAIKU_TOP) docs apps diskusage ] 357 : diskusage ; 358 359# Copy documentation and sample programs as per PDFlib Lite's license 360# requirement. 361CopyDirectoryToPackage documentation 362 : [ FDirName $(HAIKU_TOP) src libs pdflib doc ] 363 : pdflib ; 364CopyDirectoryToPackage develop sample-code 365 : [ FDirName $(HAIKU_TOP) src libs pdflib bind pdflib ] 366 : pdflib ; 367 368 369BuildHaikuPackage $(haikuPackage) : haiku ; 370