2ba15c0f114b2cd11ab60e0c5c283fb4bc3adc6e
[platform/adaptation/bluetooth-firmware-bcm.git] / packaging / bluetooth-firmware-bcm.spec
1 Name:      bluetooth-firmware-bcm
2 Summary:    firmware and tools for bluetooth
3 Version:    0.7.5
4 Release:    1
5 Group:      Hardware Support/Handset
6 License:    Apache-2.0 and Broadcom
7 # NOTE: Source name does not match package name.  This should be
8 # resolved in the future, by I don't have that power. - Ryan Ware
9 Source0:    %{name}-%{version}.tar.gz
10
11 BuildRequires:  pkgconfig(vconf)
12 BuildRequires:  pkgconfig(dlog)
13 BuildRequires:  pkgconfig(hal-api-common)
14 BuildRequires:  pkgconfig(hal-api-bluetooth)
15 BuildRequires:  cmake
16
17 %description
18  firmware and tools for bluetooth
19
20 %package exynos3250
21 Summary:    bcm firmware and tools for exynos3250
22 Group:      Hardware Support/Handset
23
24 %description exynos3250
25 bcm firmware and tools for exynos3250
26
27 %package artik
28 Summary:    bcm firmware and tools for artik
29 Group:      Hardware Support/Handset
30
31 %description artik
32 bcm firmware and tools for artik
33
34 %package exynos7270
35 Summary:    bcm firmware and tools for exynos7270
36 Group:      Hardware Support/Handset
37
38 %description exynos7270
39 BT firmware and tools for exynos7270
40
41 %package rpi3
42 Summary:    bcm firmware and tools for rpi3
43 Group:      Hardware Support/Handset
44
45 %description rpi3
46 BT firmware and tools for rpi3
47
48 %prep
49 %setup -q
50
51 %build
52 cmake ./ -DCMAKE_INSTALL_PREFIX=%{_prefix} \
53         -DPLUGIN_INSTALL_PREFIX=%{_prefix} \
54         -DHAL_LIB_DIR=%{_hal_libdir} \
55         -DHAL_LICENSE_DIR=%{_hal_licensedir} \
56         -DHAL_SYSCONF_DIR=%{_hal_sysconfdir}
57 make %{?jobs:-j%jobs}
58
59 %install
60 rm -rf %{buildroot}
61
62 %make_install
63
64 %files
65 %manifest %{name}.manifest
66 %{_hal_licensedir}/%{name}/LICENSE.APLv2
67 %{_hal_licensedir}/%{name}/LICENSE.Broadcom
68 #%{_hal_sysconfdir}/bluetooth/bcmtool_4330b1
69 %exclude %{_hal_sysconfdir}/bluetooth/bcmtool_4343w
70 %{_hal_sysconfdir}/bluetooth/bcmtool_4358a1
71 %{_hal_sysconfdir}/bluetooth/setbd
72 #%{_hal_sysconfdir}/bluetooth/BT_FW_BCM4330B1_002.001.003.0221.0265.hcd
73 %{_hal_sysconfdir}/bluetooth/BT_FW_BCM4358A1_001.002.005.0032.0066.hcd
74 %{_hal_sysconfdir}/bluetooth/bt-dev-end.sh
75 %{_hal_sysconfdir}/bluetooth/bt-dev-start.sh
76 %{_hal_sysconfdir}/bluetooth/bt-set-addr.sh
77
78 %post exynos3250
79 rm -rf %{_hal_sysconfdir}/bluetooth/bt-dev-start.sh
80 ln -s %{_hal_sysconfdir}/bluetooth/bt-dev-start-exynos3250.sh %{_hal_sysconfdir}/bluetooth/bt-dev-start.sh
81
82 %files exynos3250
83 %manifest %{name}.manifest
84 %{_hal_licensedir}/%{name}/LICENSE.APLv2
85 %{_hal_licensedir}/%{name}/LICENSE.Broadcom
86 %{_hal_sysconfdir}/bluetooth/bcmtool_4343w
87 %{_hal_sysconfdir}/bluetooth/setbd
88 %{_hal_sysconfdir}/bluetooth/BCM4343A1_001.002.009.0035.0096_ORC_Orbis_WC1-S.hcd
89 %{_hal_sysconfdir}/bluetooth/BCM4343A1_001.002.009.0022.0050_Murata_Type-1FR.hcd
90 %{_hal_sysconfdir}/bluetooth/bt-dev-end.sh
91 %{_hal_sysconfdir}/bluetooth/bt-dev-start-exynos3250.sh
92 %{_hal_sysconfdir}/bluetooth/bt-set-addr.sh
93
94 %post artik
95 rm -rf %{_hal_sysconfdir}/bluetooth/bt-dev-start.sh
96 ln -s %{_hal_sysconfdir}/bluetooth/bt-dev-start-artik.sh %{_hal_sysconfdir}/bluetooth/bt-dev-start.sh
97
98 %files artik
99 %manifest %{name}.manifest
100 %{_hal_licensedir}/%{name}/LICENSE.APLv2
101 %{_hal_licensedir}/%{name}/LICENSE.Broadcom
102 %{_hal_sysconfdir}/bluetooth/brcm_patchram_plus
103 %{_hal_sysconfdir}/bluetooth/setbd
104 %{_hal_sysconfdir}/bluetooth/BCM4354_003.001.012.0353.0745_Samsung_Artik_ORC.hcd
105 %{_hal_sysconfdir}/bluetooth/BCM4345C0_003.001.025.0111.0205.hcd
106 %{_hal_sysconfdir}/bluetooth/bt-dev-end.sh
107 %{_hal_sysconfdir}/bluetooth/bt-dev-start-artik.sh
108 %{_hal_sysconfdir}/bluetooth/bt-set-addr.sh
109
110 %post exynos7270
111 rm -rf %{_hal_sysconfdir}/bluetooth/bt-dev-start.sh
112 ln -s %{_hal_sysconfdir}/bluetooth/bt-dev-start-exynos7270.sh %{_hal_sysconfdir}/bluetooth/bt-dev-start.sh
113 rm -rf %{_hal_libdir}/firmware/43012B0.hex
114 ln -s %{_hal_libdir}/firmware/bcm43012/BCM43012B0_002.001.021.0081.0087.hex %{_hal_libdir}/firmware/43012B0.hex
115
116 %files exynos7270
117 %manifest %{name}.manifest
118 %{_hal_licensedir}/%{name}/LICENSE.APLv2
119 %{_hal_licensedir}/%{name}/LICENSE.Broadcom
120 %{_hal_sysconfdir}/bluetooth/setbd
121 %{_hal_libdir}/firmware/bcm43012/BCM43012B0_002.001.021.0081.0087.hex
122 %{_hal_sysconfdir}/bluetooth/bt-dev-end.sh
123 %{_hal_sysconfdir}/bluetooth/bt-dev-start-exynos7270.sh
124 %{_hal_sysconfdir}/bluetooth/bt-set-addr.sh
125
126 %post rpi3
127 rm -rf %{_hal_sysconfdir}/bluetooth/bt-dev-start.sh
128 rm -rf %{_hal_sysconfdir}/bluetooth/bt-dev-end.sh
129 ln -s %{_hal_sysconfdir}/bluetooth/bt-dev-start-rpi3.sh %{_hal_sysconfdir}/bluetooth/bt-dev-start.sh
130 ln -s %{_hal_sysconfdir}/bluetooth/bt-dev-end-rpi3.sh %{_hal_sysconfdir}/bluetooth/bt-dev-end.sh
131 mkdir -p %{_hal_libdir}/firmware/brcm
132 ln -s %{_hal_sysconfdir}/bluetooth/BCM43430A1.hcd %{_hal_libdir}/firmware/brcm/
133 ln -s %{_hal_sysconfdir}/bluetooth/BCM4345C0.hcd %{_hal_libdir}/firmware/brcm/
134
135 %files rpi3
136 %manifest %{name}.manifest
137 %{_hal_licensedir}/%{name}/LICENSE.APLv2
138 %{_hal_licensedir}/%{name}/LICENSE.Broadcom
139 %{_hal_sysconfdir}/bluetooth/BCM43430A1.hcd
140 %{_hal_sysconfdir}/bluetooth/BCM4345C0.hcd
141 %{_hal_sysconfdir}/bluetooth/bt-dev-end-rpi3.sh
142 %{_hal_sysconfdir}/bluetooth/bt-dev-start-rpi3.sh
143 %{_hal_libdir}/*.so*