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 scsi : ahci virtio_scsi ; 40AddFilesToPackage add-ons kernel busses usb : <usb>uhci <usb>ohci <usb>ehci ; 41AddFilesToPackage add-ons kernel busses virtio : virtio_pci ; 42AddFilesToPackage add-ons kernel console : vga_text ; 43AddFilesToPackage add-ons kernel debugger 44 : <kdebug>demangle <kdebug>disasm@x86 <kdebug>hangman 45 <kdebug>invalidate_on_exit <kdebug>usb_keyboard <kdebug>qrencode 46 <kdebug>run_on_exit ; 47AddFilesToPackage add-ons kernel file_systems : $(SYSTEM_ADD_ONS_FILE_SYSTEMS) ; 48AddFilesToPackage add-ons kernel generic 49 : ata_adapter@ata bios@x86,x86_64 dpc ide_adapter@ide 50 locked_pool mpu401 scsi_periph <module>tty ; 51AddFilesToPackage add-ons kernel partitioning_systems 52 : amiga_rdb apple efi_gpt intel session ; 53AddFilesToPackage add-ons kernel interrupt_controllers : openpic@ppc ; 54AddFilesToPackage add-ons kernel power cpufreq : intel_pstates@x86,x86_64 ; 55AddFilesToPackage add-ons kernel power cpuidle : intel_cstates@x86,x86_64 ; 56 57if $(TARGET_ARCH) = x86 || $(TARGET_ARCH) = x86_64 { 58 AddFilesToPackage add-ons kernel cpu : generic_x86 ; 59} 60 61# drivers 62AddNewDriversToPackage disk scsi : scsi_cd scsi_disk ; 63AddNewDriversToPackage disk virtual : virtio_block ; 64AddNewDriversToPackage power : acpi_battery@x86 ; 65#AddNewDriversToPackage display : display_controls@x86 ; 66 67# legacy drivers 68AddDriversToPackage : console dprintf null random <driver>tty 69 zero ; 70AddDriversToPackage audio hmulti : $(SYSTEM_ADD_ONS_DRIVERS_AUDIO) ; 71AddDriversToPackage audio old : $(SYSTEM_ADD_ONS_DRIVERS_AUDIO_OLD) ; 72AddDriversToPackage midi : $(SYSTEM_ADD_ONS_DRIVERS_MIDI) ; 73AddDriversToPackage bus : usb_raw fw_raw@x86 ; 74AddDriversToPackage disk floppy : pc_floppy@x86 ; 75AddDriversToPackage disk usb : usb_disk ; 76AddDriversToPackage disk usb : usb_floppy ; 77AddDriversToPackage printer usb : usb_printer ; 78AddDriversToPackage disk virtual : nbd ; 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 ; 84AddDriversToPackage power : $(SYSTEM_ADD_ONS_DRIVERS_POWER) ; 85 86# kernel 87AddFilesToPackage : <revisioned>kernel_$(TARGET_ARCH) ; 88 89# libs 90AddLibrariesToPackage lib 91 : [ HaikuImageGetSystemLibs ] [ HaikuImageGetPrivateSystemLibs ] ; 92 93# libnetwork.so replaces quite a few libraries 94if $(HAIKU_GCC_VERSION_$(architecture)[1]) = 2 { 95 local libNetworkAliases = libsocket.so libbind.so libnet.so ; 96 local lib ; 97 for lib in $(libNetworkAliases) { 98 AddSymlinkToPackage lib : libnetwork.so : $(lib) ; 99 } 100 101 AddSymlinkToPackage lib : libbnetapi.so : libnetapi.so ; 102} 103 104 105# servers 106AddFilesToPackage servers : $(SYSTEM_SERVERS) ; 107 108# apps 109AddFilesToPackage : runtime_loader Deskbar Tracker ; 110AddFilesToPackage bin : $(SYSTEM_BIN) consoled ; 111AddFilesToPackage apps : $(SYSTEM_APPS) ; 112AddFilesToPackage preferences : $(SYSTEM_PREFERENCES) ; 113AddFilesToPackage demos : $(SYSTEM_DEMOS) ; 114 115SEARCH on install-wifi-firmwares.sh = [ FDirName $(HAIKU_TOP) data bin ] ; 116AddFilesToPackage bin : install-wifi-firmwares.sh ; 117 118AddSymlinkToPackage bin : bash : sh ; 119AddSymlinkToPackage bin : trash : untrash ; 120AddSymlinkToPackage bin : less : more ; 121AddSymlinkToPackage bin : gzip : gunzip ; 122AddSymlinkToPackage bin : gzip : zcat ; 123AddSymlinkToPackage bin : zdiff : zcmp ; 124AddSymlinkToPackage bin : unzip : zipinfo ; 125AddSymlinkToPackage bin : gawk : awk ; 126 127# scripts and data files 128local bootScripts = Bootscript Bootscript.cd SetupEnvironment Netscript 129 InstallerInitScript InstallerFinishScript ; 130SEARCH on $(bootScripts) = [ FDirName $(HAIKU_TOP) data system boot ] ; 131AddFilesToPackage boot : $(bootScripts) ; 132 133# post install scripts 134local postInstallFiles = default_deskbar_items.sh ; 135postInstallFiles = $(postInstallFiles:G=post-install) ; 136SEARCH on $(postInstallFiles) 137 = [ FDirName $(HAIKU_TOP) data system boot post_install ] ; 138AddFilesToPackage boot post-install : $(postInstallFiles) ; 139 140local fortuneFiles = [ Glob $(HAIKU_TOP)/data/system/data/fortunes 141 : [a-zA-Z0-9]* ] ; 142fortuneFiles = $(fortuneFiles:G=data!fortunes) ; 143AddFilesToPackage data fortunes : $(fortuneFiles) ; 144 145local fontDir = [ FDirName $(HAIKU_TOP) data system data fonts ] ; 146local psFonts = [ Glob $(fontDir)/psfonts : *.afm *.pfb ] ; 147local ttFonts = [ Glob $(fontDir)/ttfonts : *.ttf ] ; 148AddFilesToPackage data fonts psfonts : $(psFonts) ; 149AddFilesToPackage data fonts ttfonts : $(ttFonts) ; 150 151local keymapFiles = [ Glob [ FDirName $(HAIKU_TOP) src data keymaps ] 152 : *.keymap ] ; 153keymapFiles = $(keymapFiles:BG=keymap) ; 154AddFilesToPackage data Keymaps : $(keymapFiles) ; 155AddSymlinkToPackage data Keymaps : Swedish : Finnish ; 156AddSymlinkToPackage data Keymaps : Slovene : Croatian ; 157AddSymlinkToPackage data Keymaps : US-International : Brazilian ; 158 159# Copy keyboard layout files to the image one-by-one. 160local keyboardLayoutsDir 161 = [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts ] ; 162local keyboardLayoutFiles = 163 "Generic 104-key" 164 "Generic 105-key International" 165 "Kinesis Advantage" 166 "Kinesis Ergo Elan International" 167 "TypeMatrix 2030" ; 168keyboardLayoutFiles = $(keyboardLayoutFiles:G=keyboard-layout) ; 169SEARCH on $(keyboardLayoutFiles) = $(keyboardLayoutsDir) ; 170AddFilesToPackage data KeyboardLayouts 171 : $(keyboardLayoutFiles) ; 172 173# Add Apple Aluminum keyboard layout files to the image in an Apple Aluminum 174# subdirectory. The subdirectory is turned into a submenu in the Layout menu 175# of the Keymap preference app. 176local appleAluminumDir 177 = [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts 178 Apple\ Aluminum ] ; 179local appleAluminumFiles = 180 "Apple Aluminium Extended International" 181 "Apple Aluminium International" 182 "Apple Aluminum (US)" 183 "Apple Aluminum Extended (US)" ; 184appleAluminumFiles = $(appleAluminumFiles:G=keyboard-layout) ; 185SEARCH on $(appleAluminumFiles) = $(appleAluminumDir) ; 186AddFilesToPackage data KeyboardLayouts Apple\ Aluminum 187 : $(appleAluminumFiles) ; 188 189# Add ThinkPad keyboard layout files to the image in a ThinkPad 190# subdirectory. The subdirectory is turned into a submenu in the Layout menu 191# of the Keymap preference app. 192local thinkpadDir 193 = [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts ThinkPad ] ; 194local thinkPadFiles = 195 "ThinkPad (US)" 196 "ThinkPad International" 197 "ThinkPad T400s (US)" 198 "ThinkPad T400s International" 199 "ThinkPad X1 (US)" 200 "ThinkPad X1 International" 201 "ThinkPad X100e (US)" 202 "ThinkPad X100e International" ; 203thinkPadFiles = $(thinkPadFiles:G=keyboard-layout) ; 204SEARCH on $(thinkPadFiles) = $(thinkpadDir) ; 205AddFilesToPackage data KeyboardLayouts ThinkPad 206 : $(thinkPadFiles) ; 207 208# boot module links 209AddBootModuleSymlinksToPackage 210 acpi@x86,x86_64 ata@ata pci isa@x86,x86_64 config_manager dpc 211 ide@ide scsi usb 212 openpic@ppc 213 ata_adapter@ata ide_adapter@ide locked_pool scsi_periph 214 ahci generic_ide_pci it8211 legacy_sata silicon_image_3112 215 ide_isa@x86 216 <usb>uhci <usb>ohci <usb>ehci 217 scsi_cd scsi_disk usb_disk 218 virtio virtio_pci virtio_block virtio_scsi 219 efi_gpt 220 intel 221 bfs packagefs 222; 223 224# add-ons 225AddFilesToPackage add-ons accelerants : $(SYSTEM_ADD_ONS_ACCELERANTS) ; 226AddFilesToPackage add-ons Translators : $(SYSTEM_ADD_ONS_TRANSLATORS) ; 227AddFilesToPackage add-ons locale catalogs : $(SYSTEM_ADD_ONS_LOCALE_CATALOGS) ; 228 229AddFilesToPackage add-ons Tracker 230 : FileType-F Mark\ as… Mark\ as\ Read-R Open\ Target\ Folder-O 231 Open\ Terminal-T ZipOMatic-Z ; 232AddSymlinkToPackage add-ons Tracker 233 : /boot/system/preferences/Backgrounds : Background-B ; 234AddSymlinkToPackage add-ons Tracker 235 : /boot/system/apps/TextSearch : TextSearch-G ; 236AddSymlinkToPackage add-ons Tracker 237 : /boot/system/apps/DiskUsage : DiskUsage-I ; 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 ; 243 244AddFilesToPackage add-ons kernel network : <net>notifications stack ; 245AddFilesToPackage add-ons kernel network : dns_resolver ; 246AddFilesToPackage add-ons kernel network devices : $(SYSTEM_NETWORK_DEVICES) ; 247AddFilesToPackage add-ons kernel network datalink_protocols 248 : $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ; 249AddFilesToPackage add-ons kernel network ppp: $(SYSTEM_NETWORK_PPP) ; 250AddFilesToPackage add-ons kernel network protocols 251 : $(SYSTEM_NETWORK_PROTOCOLS) ; 252 253AddFilesToPackage add-ons disk_systems 254 : <disk_system>intel <disk_system>gpt <disk_system>bfs <disk_system>ntfs ; 255 256 257# the MIME DB 258CopyDirectoryToPackage data : <mimedb>mime_db : : : isTarget ; 259 260 261# Deskbar menu symlinks 262 263# "Applications" links 264DESKBAR_APPLICATIONS = ActivityMonitor CharacterMap DeskCalc 265 Devices DiskProbe DriveSetup DiskUsage Expander Installer 266 StyledEdit Terminal 267; 268local linkTarget ; 269for linkTarget in $(DESKBAR_APPLICATIONS) { 270 AddSymlinkToPackage data deskbar menu Applications 271 : ../../../../apps/$(linkTarget) : $(linkTarget) ; 272} 273 274# "Desktop applets" links 275DESKBAR_DESKTOP_APPLETS = LaunchBox NetworkStatus PowerStatus ProcessController 276 Workspaces 277; 278for linkTarget in $(DESKBAR_DESKTOP_APPLETS) { 279 AddSymlinkToPackage data deskbar menu Desktop\ applets 280 : ../../../../apps/$(linkTarget) : $(linkTarget) ; 281} 282 283# "Preferences" links 284AddDirectoryToPackage data deskbar menu Preferences ; 285DESKBAR_PREFERENCES = $(SYSTEM_PREFERENCES:B) ; 286for linkTarget in $(DESKBAR_PREFERENCES) { 287 AddSymlinkToPackage data deskbar menu Preferences 288 : ../../../../preferences/$(linkTarget) 289 : $(linkTarget) ; 290} 291 292# Deskbar menu entries file 293AddFilesToPackage data deskbar : <deskbar>menu_entries ; 294 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 307BuildHaikuPackage $(haikuPackage) : haiku ; 308