From 0b4ae41ce91f79200fb02440e4967785ea0775ca Mon Sep 17 00:00:00 2001
From: Matt Madia <mattmadia@gmail.com>
Date: Sun, 10 Nov 2013 17:19:36 -0500
Subject: [PATCH] Bluetooth as HPKG, initial steps.
This turns the OptionalPackage "Bluetooth" into a HPKG. Currently it is
installed to /_packages_. The idea is for the bluetooth package to be installed
on the boot medium, without being activated by default.
build/jam/packages/Bluetooth contains a TODO for implementing the development
symlink for libbluetooth.so.
Untested beyond being able to build bluetooth.hpkg.
---
build/jam/DefaultBuildProfiles | 4 ++--
build/jam/HaikuPackages | 1 +
build/jam/OptionalPackages | 22 ++--------------------
build/jam/packages/Bluetooth | 27 +++++++++++++++++++++++++++
src/data/package_infos/generic/bluetooth | 15 +++++++++++++++
5 files changed, 47 insertions(+), 22 deletions(-)
create mode 100644 build/jam/packages/Bluetooth
create mode 100644 src/data/package_infos/generic/bluetooth
diff --git a/build/jam/DefaultBuildProfiles b/build/jam/DefaultBuildProfiles
index d780c23..b5261ad 100644
a
|
b
|
rule DefineDefaultBuildProfiles
|
71 | 71 | } |
72 | 72 | } |
73 | 73 | |
74 | | AddOptionalHaikuImagePackages BeBook Development Git WebPositive |
75 | | Welcome ; |
| 74 | AddOptionalHaikuImagePackages BeBook Bluetooth Development Git |
| 75 | WebPositive Welcome ; |
76 | 76 | } |
77 | 77 | |
78 | 78 | case "beta-*" : { |
diff --git a/build/jam/HaikuPackages b/build/jam/HaikuPackages
index 836c293..66de5ed 100644
a
|
b
|
local packages =
|
6 | 6 | HaikuUserguide |
7 | 7 | HaikuWelcome |
8 | 8 | MakefileEngine |
| 9 | Bluetooth |
9 | 10 | ; |
10 | 11 | |
11 | 12 | if $(HAIKU_BOOTSTRAP_BUILD) { |
diff --git a/build/jam/OptionalPackages b/build/jam/OptionalPackages
index 5c616a2..db29c51 100644
a
|
b
|
if [ IsOptionalHaikuImagePackageAdded BeOSCompatibility ] {
|
67 | 67 | |
68 | 68 | # Bluetooth stack |
69 | 69 | if [ IsOptionalHaikuImagePackageAdded Bluetooth ] { |
70 | | # TODO: Make this an actual package! |
71 | | # local bluetoothDrivers = h2generic ; |
72 | | # AddDriversToHaikuImage bluetooth : $(bluetoothDrivers) ; |
73 | | # AddFilesToHaikuImage system servers : bluetooth_server ; |
74 | | # AddFilesToHaikuImage system lib : libbluetooth.so ; |
75 | | # AddFilesToHaikuImage |
76 | | # system add-ons kernel network protocols : l2cap ; |
77 | | # AddFilesToHaikuImage system add-ons kernel bluetooth |
78 | | # : btCoreData hci ; |
79 | | # AddFilesToHaikuImage system preferences : Bluetooth ; |
80 | | # AddFilesToHaikuImage system bin : bt_dev_info bt_discovery ; |
81 | | # AddSymlinkToHaikuImage home config settings deskbar menu Preferences |
82 | | # : /boot/system/preferences/Bluetooth ; |
83 | | # if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ] |
84 | | # && $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) in 2 4 { |
85 | | # local arch = $(TARGET_ARCH) ; |
86 | | # local abi = gcc$(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) ; |
87 | | # AddSymlinkToHaikuImage system develop lib |
88 | | # : /system/lib libbluetooth.so ; |
89 | | # } |
| 70 | AddPackageFilesToHaikuImage _packages_ : bluetooth.hpkg |
| 71 | : nameFromMetaInfo ; |
90 | 72 | } |
91 | 73 | |
92 | 74 | |
diff --git a/build/jam/packages/Bluetooth b/build/jam/packages/Bluetooth
new file mode 100644
index 0000000..9f189b7
-
|
+
|
|
| 1 | local bluetoothPackage = bluetooth.hpkg ; |
| 2 | HaikuPackage $(bluetoothPackage) ; |
| 3 | |
| 4 | local bluetoothDrivers = h2generic ; |
| 5 | AddDriversToPackage bluetooth : $(bluetoothDrivers) ; |
| 6 | AddFilesToPackage servers : bluetooth_server ; |
| 7 | AddFilesToPackage lib : libbluetooth.so ; |
| 8 | AddFilesToPackage |
| 9 | add-ons kernel network protocols : l2cap ; |
| 10 | AddFilesToPackage add-ons kernel bluetooth |
| 11 | : btCoreData hci ; |
| 12 | AddFilesToPackage preferences : Bluetooth ; |
| 13 | AddFilesToPackage bin : bt_dev_info bt_discovery ; |
| 14 | |
| 15 | AddSymlinkToPackage data deskbar menu Applications |
| 16 | : ../../../../preferences/Bluetooth ; |
| 17 | |
| 18 | # TODO: Include the development portions of Bluetooth in the package! |
| 19 | #if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ] |
| 20 | # && $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) in 2 4 { |
| 21 | # local arch = $(TARGET_ARCH) ; |
| 22 | # local abi = gcc$(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) ; |
| 23 | # AddSymlinkToHaikuImage system develop lib |
| 24 | # : /system/lib libbluetooth.so ; |
| 25 | #} |
| 26 | |
| 27 | BuildHaikuPackage $(bluetoothPackage) : bluetooth ; |
diff --git a/src/data/package_infos/generic/bluetooth b/src/data/package_infos/generic/bluetooth
new file mode 100644
index 0000000..60da4ae
-
|
+
|
|
| 1 | name bluetooth |
| 2 | version %HAIKU_VERSION% |
| 3 | architecture any |
| 4 | summary "The Bluetooth stack for Haiku" |
| 5 | description "The Bluetooth stack for Haiku." |
| 6 | |
| 7 | packager "The Haiku build system" |
| 8 | vendor "Haiku Project" |
| 9 | |
| 10 | copyrights "2001-2013 Haiku, Inc. et al" |
| 11 | licenses MIT |
| 12 | |
| 13 | provides { |
| 14 | bluetooth = %HAIKU_VERSION% |
| 15 | } |