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 ; 54 55if $(TARGET_ARCH) = x86 || $(TARGET_ARCH) = x86_64 { 56 AddFilesToPackage add-ons kernel cpu : generic_x86 ; 57} 58 59# drivers 60AddNewDriversToPackage disk scsi : scsi_cd scsi_disk ; 61AddNewDriversToPackage disk virtual : virtio_block ; 62AddNewDriversToPackage power : enhanced_speedstep@x86 ; 63AddNewDriversToPackage power : acpi_battery@x86 ; 64#AddNewDriversToPackage display : display_controls@x86 ; 65 66# legacy drivers 67AddDriversToPackage : console dprintf null random <driver>tty 68 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 graphics : $(SYSTEM_ADD_ONS_DRIVERS_GRAPHICS) ; 79AddDriversToPackage input : ps2_hid usb_hid wacom ; 80AddDriversToPackage misc : <driver>poke <driver>mem ; 81AddDriversToPackage net : $(SYSTEM_ADD_ONS_DRIVERS_NET) ; 82AddDriversToPackage ports : usb_serial ; 83AddDriversToPackage power : $(SYSTEM_ADD_ONS_DRIVERS_POWER) ; 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# servers 105AddFilesToPackage servers : $(SYSTEM_SERVERS) ; 106 107# apps 108AddFilesToPackage : runtime_loader Deskbar Tracker ; 109AddFilesToPackage bin : $(SYSTEM_BIN) consoled ; 110AddFilesToPackage apps : $(SYSTEM_APPS) ; 111AddFilesToPackage preferences : $(SYSTEM_PREFERENCES) ; 112AddFilesToPackage demos : $(SYSTEM_DEMOS) ; 113 114SEARCH on install-wifi-firmwares.sh = [ FDirName $(HAIKU_TOP) data bin ] ; 115AddFilesToPackage bin : install-wifi-firmwares.sh ; 116 117AddSymlinkToPackage bin : bash : sh ; 118AddSymlinkToPackage bin : trash : untrash ; 119AddSymlinkToPackage bin : less : more ; 120AddSymlinkToPackage bin : gzip : gunzip ; 121AddSymlinkToPackage bin : gzip : zcat ; 122AddSymlinkToPackage bin : zdiff : zcmp ; 123AddSymlinkToPackage bin : unzip : zipinfo ; 124AddSymlinkToPackage bin : gawk : awk ; 125 126# scripts and data files 127local bootScripts = Bootscript Bootscript.cd SetupEnvironment Netscript 128 InstallerInitScript InstallerFinishScript ; 129SEARCH on $(bootScripts) = [ FDirName $(HAIKU_TOP) data system boot ] ; 130AddFilesToPackage boot : $(bootScripts) ; 131 132# post install scripts 133local postInstallFiles = default_deskbar_items.sh ; 134postInstallFiles = $(postInstallFiles:G=post-install) ; 135SEARCH on $(postInstallFiles) 136 = [ FDirName $(HAIKU_TOP) data system boot post_install ] ; 137AddFilesToPackage boot post-install : $(postInstallFiles) ; 138 139local fortuneFiles = [ Glob $(HAIKU_TOP)/data/system/data/fortunes 140 : [a-zA-Z0-9]* ] ; 141fortuneFiles = $(fortuneFiles:G=data!fortunes) ; 142AddFilesToPackage data fortunes : $(fortuneFiles) ; 143 144local fontDir = [ FDirName $(HAIKU_TOP) data system data fonts ] ; 145local psFonts = [ Glob $(fontDir)/psfonts : *.afm *.pfb ] ; 146local ttFonts = [ Glob $(fontDir)/ttfonts : *.ttf ] ; 147AddFilesToPackage data fonts psfonts : $(psFonts) ; 148AddFilesToPackage data fonts ttfonts : $(ttFonts) ; 149 150local keymapFiles = [ Glob [ FDirName $(HAIKU_TOP) src data keymaps ] 151 : *.keymap ] ; 152keymapFiles = $(keymapFiles:BG=keymap) ; 153AddFilesToPackage data Keymaps : $(keymapFiles) ; 154AddSymlinkToPackage data Keymaps : Swedish : Finnish ; 155AddSymlinkToPackage data Keymaps : Slovene : Croatian ; 156AddSymlinkToPackage data Keymaps : US-International : Brazilian ; 157 158# Copy keyboard layout files to the image one-by-one. 159local keyboardLayoutsDir 160 = [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts ] ; 161local keyboardLayoutFiles = 162 "Generic 104-key" 163 "Generic 105-key International" 164 "Kinesis Advantage" 165 "Kinesis Ergo Elan International" 166 "TypeMatrix 2030" ; 167keyboardLayoutFiles = $(keyboardLayoutFiles:G=keyboard-layout) ; 168SEARCH on $(keyboardLayoutFiles) = $(keyboardLayoutsDir) ; 169AddFilesToPackage data KeyboardLayouts 170 : $(keyboardLayoutFiles) ; 171 172# Add Apple Aluminum keyboard layout files to the image in an Apple Aluminum 173# subdirectory. The subdirectory is turned into a submenu in the Layout menu 174# of the Keymap preference app. 175local appleAluminumDir 176 = [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts 177 Apple\ Aluminum ] ; 178local appleAluminumFiles = 179 "Apple Aluminium Extended International" 180 "Apple Aluminium International" 181 "Apple Aluminum (US)" 182 "Apple Aluminum Extended (US)" ; 183appleAluminumFiles = $(appleAluminumFiles:G=keyboard-layout) ; 184SEARCH on $(appleAluminumFiles) = $(appleAluminumDir) ; 185AddFilesToPackage data KeyboardLayouts Apple\ Aluminum 186 : $(appleAluminumFiles) ; 187 188# Add ThinkPad keyboard layout files to the image in a ThinkPad 189# subdirectory. The subdirectory is turned into a submenu in the Layout menu 190# of the Keymap preference app. 191local thinkpadDir 192 = [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts ThinkPad ] ; 193local thinkPadFiles = 194 "ThinkPad (US)" 195 "ThinkPad International" 196 "ThinkPad T400s (US)" 197 "ThinkPad T400s International" 198 "ThinkPad X1 (US)" 199 "ThinkPad X1 International" 200 "ThinkPad X100e (US)" 201 "ThinkPad X100e International" ; 202thinkPadFiles = $(thinkPadFiles:G=keyboard-layout) ; 203SEARCH on $(thinkPadFiles) = $(thinkpadDir) ; 204AddFilesToPackage data KeyboardLayouts ThinkPad 205 : $(thinkPadFiles) ; 206 207# boot module links 208AddBootModuleSymlinksToPackage 209 acpi@x86,x86_64 ata@ata pci isa@x86,x86_64 config_manager dpc 210 ide@ide scsi usb 211 openpic@ppc 212 ata_adapter@ata ide_adapter@ide locked_pool scsi_periph 213 ahci generic_ide_pci it8211 legacy_sata silicon_image_3112 214 ide_isa@x86 215 <usb>uhci <usb>ohci <usb>ehci 216 scsi_cd scsi_disk usb_disk 217 virtio virtio_pci virtio_block virtio_scsi 218 efi_gpt 219 intel 220 bfs packagefs 221; 222 223# add-ons 224AddFilesToPackage add-ons accelerants : $(SYSTEM_ADD_ONS_ACCELERANTS) ; 225AddFilesToPackage add-ons Translators : $(SYSTEM_ADD_ONS_TRANSLATORS) ; 226AddFilesToPackage add-ons locale catalogs : $(SYSTEM_ADD_ONS_LOCALE_CATALOGS) ; 227 228AddFilesToPackage add-ons Tracker 229 : FileType-F Mark\ as… Mark\ as\ Read-R Open\ Target\ Folder-O 230 Open\ Terminal-T ZipOMatic-Z ; 231AddSymlinkToPackage add-ons Tracker 232 : /boot/system/preferences/Backgrounds : Background-B ; 233AddSymlinkToPackage add-ons Tracker 234 : /boot/system/apps/TextSearch : TextSearch-G ; 235AddSymlinkToPackage add-ons Tracker 236 : /boot/system/apps/DiskUsage : DiskUsage-I ; 237 238AddFilesToPackage add-ons input_server devices 239 : <input>keyboard <input>mouse <input>tablet <input>wacom ; 240AddFilesToPackage add-ons input_server filters 241 : screen_saver shortcut_catcher ; 242 243AddFilesToPackage add-ons kernel network : <net>notifications stack ; 244AddFilesToPackage add-ons kernel network : dns_resolver ; 245AddFilesToPackage add-ons kernel network devices : $(SYSTEM_NETWORK_DEVICES) ; 246AddFilesToPackage add-ons kernel network datalink_protocols 247 : $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ; 248AddFilesToPackage add-ons kernel network ppp: $(SYSTEM_NETWORK_PPP) ; 249AddFilesToPackage add-ons kernel network protocols 250 : $(SYSTEM_NETWORK_PROTOCOLS) ; 251 252AddFilesToPackage add-ons disk_systems 253 : <disk_system>intel <disk_system>gpt <disk_system>bfs <disk_system>ntfs ; 254 255 256# the MIME DB 257CopyDirectoryToPackage data : <mimedb>mime_db : : : isTarget ; 258 259 260# Deskbar menu symlinks 261 262# "Applications" links 263DESKBAR_APPLICATIONS = ActivityMonitor CharacterMap DeskCalc 264 Devices DiskProbe DriveSetup DiskUsage Expander Installer 265 StyledEdit Terminal 266; 267local linkTarget ; 268for linkTarget in $(DESKBAR_APPLICATIONS) { 269 AddSymlinkToPackage data deskbar menu Applications 270 : ../../../../apps/$(linkTarget) : $(linkTarget) ; 271} 272 273# "Desktop applets" links 274DESKBAR_DESKTOP_APPLETS = LaunchBox NetworkStatus PowerStatus ProcessController 275 Workspaces 276; 277for linkTarget in $(DESKBAR_DESKTOP_APPLETS) { 278 AddSymlinkToPackage data deskbar menu Desktop\ applets 279 : ../../../../apps/$(linkTarget) : $(linkTarget) ; 280} 281 282# "Preferences" links 283AddDirectoryToPackage data deskbar menu Preferences ; 284DESKBAR_PREFERENCES = $(SYSTEM_PREFERENCES:B) ; 285for linkTarget in $(DESKBAR_PREFERENCES) { 286 AddSymlinkToPackage data deskbar menu Preferences 287 : ../../../../preferences/$(linkTarget) 288 : $(linkTarget) ; 289} 290 291# Deskbar menu entries file 292AddFilesToPackage data deskbar : <deskbar>menu_entries ; 293 294 295# licenses 296CopyDirectoryToPackage data 297 : [ FDirName $(HAIKU_TOP) data system data licenses ] 298 : licenses ; 299 300# Copy documentation as per DiskUsage's license requirement. 301CopyDirectoryToPackage documentation 302 : [ FDirName $(HAIKU_TOP) docs apps diskusage ] 303 : diskusage ; 304 305 306BuildHaikuPackage $(haikuPackage) : haiku ; 307