Add RPI3 B+ model BT firmware file
[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.2.0
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 Source1:    bluetooth-hciattach@.service
11 Source2:    bluetooth-hci-device.service
12 Provides:   bluetooth-scripts
13
14 BuildRequires:  pkgconfig(vconf)
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 Provides:   bluetooth-scripts
24
25 %description exynos3250
26 bcm firmware and tools for exynos3250
27
28 %package artik
29 Summary:    bcm firmware and tools for artik
30 Group:      Hardware Support/Handset
31 Provides:   bluetooth-scripts
32
33 %description artik
34 bcm firmware and tools for artik
35
36 %package exynos7270
37 Summary:    bcm firmware and tools for exynos7270
38 Group:      Hardware Support/Handset
39 Provides:   bluetooth-scripts
40
41 %description exynos7270
42 BT firmware and tools for exynos7270
43
44 %package rpi3
45 Summary:    bcm firmware and tools for rpi3
46 Group:      Hardware Support/Handset
47 Provides:   bluetooth-scripts
48
49 %description rpi3
50 BT firmware and tools for rpi3
51
52 %prep
53 %setup -q
54
55 %build
56 cmake ./ -DCMAKE_INSTALL_PREFIX=%{_prefix} -DPLUGIN_INSTALL_PREFIX=%{_prefix}
57 make %{?jobs:-j%jobs}
58
59 %install
60 rm -rf %{buildroot}
61
62 %make_install
63
64 install -D -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/system/bluetooth-hciattach@.service
65 install -D -m 0644 %SOURCE2 %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-device.service
66
67 %files
68 %manifest %{name}.manifest
69 %license LICENSE.APLv2 LICENSE.Broadcom
70 %defattr(-,root,root,-)
71 #%{_bindir}/bcmtool_4330b1
72 %exclude %{_bindir}/bcmtool_4343w
73 %{_bindir}/bcmtool_4358a1
74 %{_bindir}/setbd
75 #%{_prefix}/etc/bluetooth/BT_FW_BCM4330B1_002.001.003.0221.0265.hcd
76 %{_prefix}/etc/bluetooth/BT_FW_BCM4358A1_001.002.005.0032.0066.hcd
77 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
78 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start.sh
79 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh
80 %exclude %{_libdir}/systemd/system/bluetooth-hciattach@.service
81 %exclude %{_libdir}/systemd/system/bluetooth-hci-device.service
82 %manifest %{name}.manifest
83
84 %post exynos3250
85 rm -rf %{_prefix}/etc/bluetooth/bt-dev-start.sh
86 ln -s %{_prefix}/etc/bluetooth/bt-dev-start-exynos3250.sh %{_prefix}/etc/bluetooth/bt-dev-start.sh
87
88 %files exynos3250
89 %manifest %{name}.manifest
90 %license LICENSE.APLv2 LICENSE.Broadcom
91 %defattr(-,root,root,-)
92 %{_bindir}/bcmtool_4343w
93 %{_bindir}/setbd
94 %{_prefix}/etc/bluetooth/BCM4343A1_001.002.009.0035.0096_ORC_Orbis_WC1-S.hcd
95 %{_prefix}/etc/bluetooth/BCM4343A1_001.002.009.0022.0050_Murata_Type-1FR.hcd
96 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
97 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start-exynos3250.sh
98 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh
99 %{_libdir}/systemd/system/bluetooth-hciattach@.service
100 %{_libdir}/systemd/system/bluetooth-hci-device.service
101 %manifest %{name}.manifest
102
103 %post artik
104 rm -rf %{_prefix}/etc/bluetooth/bt-dev-start.sh
105 ln -s %{_prefix}/etc/bluetooth/bt-dev-start-artik.sh %{_prefix}/etc/bluetooth/bt-dev-start.sh
106
107 %files artik
108 %manifest %{name}.manifest
109 %license LICENSE.APLv2 LICENSE.Broadcom
110 %defattr(644,root,root,-)
111 %{_bindir}/brcm_patchram_plus
112 %{_bindir}/setbd
113 %{_prefix}/etc/bluetooth/BCM4354_003.001.012.0353.0745_Samsung_Artik_ORC.hcd
114 %{_prefix}/etc/bluetooth/BCM4345C0_003.001.025.0111.0205.hcd
115 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
116 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start-artik.sh
117 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh
118 %{_libdir}/systemd/system/bluetooth-hciattach@.service
119 %{_libdir}/systemd/system/bluetooth-hci-device.service
120 %manifest %{name}.manifest
121
122 %post exynos7270
123 rm -rf %{_prefix}/etc/bluetooth/bt-dev-start.sh
124 ln -s %{_prefix}/etc/bluetooth/bt-dev-start-exynos7270.sh %{_prefix}/etc/bluetooth/bt-dev-start.sh
125 rm -rf /lib/firmware/43012B0.hex
126 ln -s /lib/firmware/bcm43012/BCM43012B0_002.001.021.0081.0087.hex /lib/firmware/43012B0.hex
127
128 %files exynos7270
129 %manifest %{name}.manifest
130 %license LICENSE.APLv2 LICENSE.Broadcom
131 %defattr(-,root,root,-)
132 %{_bindir}/setbd
133 /lib/firmware/bcm43012/BCM43012B0_002.001.021.0081.0087.hex
134 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
135 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start-exynos7270.sh
136 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh
137 %{_libdir}/systemd/system/bluetooth-hciattach@.service
138 %{_libdir}/systemd/system/bluetooth-hci-device.service
139 %manifest %{name}.manifest
140
141 %post rpi3
142 rm -rf %{_prefix}/etc/bluetooth/bt-dev-start.sh
143 rm -rf %{_prefix}/etc/bluetooth/bt-dev-end.sh
144 ln -s %{_prefix}/etc/bluetooth/bt-dev-start-rpi3.sh %{_prefix}/etc/bluetooth/bt-dev-start.sh
145 ln -s %{_prefix}/etc/bluetooth/bt-dev-end-rpi3.sh %{_prefix}/etc/bluetooth/bt-dev-end.sh
146
147 %files rpi3
148 %manifest %{name}.manifest
149 %license LICENSE.APLv2 LICENSE.Broadcom
150 %defattr(-,root,root,-)
151 /lib/firmware/brcm/BCM43430A1.hcd
152 /lib/firmware/brcm/BCM4345C0.hcd
153 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end-rpi3.sh
154 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start-rpi3.sh
155 %manifest %{name}.manifest