e2c6c518c19593f0bf42c2cd6491a14f5063232c
[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
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 %prep
45 %setup -q
46
47 %build
48 cmake ./ -DCMAKE_INSTALL_PREFIX=%{_prefix} -DPLUGIN_INSTALL_PREFIX=%{_prefix}
49 make %{?jobs:-j%jobs}
50
51 %install
52 rm -rf %{buildroot}
53
54 %make_install
55
56 mkdir -p %{buildroot}/usr/share/license
57 cp LICENSE.APLv2 %{buildroot}/usr/share/license/%{name}
58 cat %{_builddir}/%{name}-%{version}/LICENSE.Broadcom >> %{buildroot}/usr/share/license/%{name}
59
60 install -D -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/system/bluetooth-hciattach@.service
61 install -D -m 0644 %SOURCE2 %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-device.service
62
63 %files
64 %defattr(-,root,root,-)
65 #%{_bindir}/bcmtool_4330b1
66 %exclude %{_bindir}/bcmtool_4343w
67 %{_bindir}/bcmtool_4358a1
68 %{_bindir}/setbd
69 #%{_prefix}/etc/bluetooth/BT_FW_BCM4330B1_002.001.003.0221.0265.hcd
70 %{_prefix}/etc/bluetooth/BT_FW_BCM4358A1_001.002.005.0032.0066.hcd
71 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
72 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start.sh
73 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh
74 %exclude %{_libdir}/systemd/system/bluetooth-hciattach@.service
75 %exclude %{_libdir}/systemd/system/bluetooth-hci-device.service
76 %manifest %{name}.manifest
77
78 %post exynos3250
79 rm -rf %{_prefix}/etc/bluetooth/bt-dev-start.sh
80 ln -s %{_prefix}/etc/bluetooth/bt-dev-start-exynos3250.sh %{_prefix}/etc/bluetooth/bt-dev-start.sh
81
82 %files exynos3250
83 %defattr(-,root,root,-)
84 %{_bindir}/bcmtool_4343w
85 %{_bindir}/setbd
86 %{_prefix}/etc/bluetooth/BCM4343A1_001.002.009.0035.0096_ORC_Orbis_WC1-S.hcd
87 %{_prefix}/etc/bluetooth/BCM4343A1_001.002.009.0022.0050_Murata_Type-1FR.hcd
88 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
89 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start-exynos3250.sh
90 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh
91 /usr/share/license/%{name}
92 %{_libdir}/systemd/system/bluetooth-hciattach@.service
93 %{_libdir}/systemd/system/bluetooth-hci-device.service
94 %manifest %{name}.manifest
95
96 %post artik
97 rm -rf %{_prefix}/etc/bluetooth/bt-dev-start.sh
98 ln -s %{_prefix}/etc/bluetooth/bt-dev-start-artik.sh %{_prefix}/etc/bluetooth/bt-dev-start.sh
99
100 %files artik
101 %defattr(644,root,root,-)
102 %{_bindir}/brcm_patchram_plus
103 %{_bindir}/setbd
104 %{_prefix}/etc/bluetooth/BCM4354_003.001.012.0353.0745_Samsung_Artik_ORC.hcd
105 %{_prefix}/etc/bluetooth/BCM4345C0_003.001.025.0111.0205.hcd
106 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
107 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start-artik.sh
108 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh
109 /usr/share/license/%{name}
110 %{_libdir}/systemd/system/bluetooth-hciattach@.service
111 %{_libdir}/systemd/system/bluetooth-hci-device.service
112 %manifest %{name}.manifest
113
114 %post exynos7270
115 rm -rf %{_prefix}/etc/bluetooth/bt-dev-start.sh
116 ln -s %{_prefix}/etc/bluetooth/bt-dev-start-exynos7270.sh %{_prefix}/etc/bluetooth/bt-dev-start.sh
117 rm -rf /lib/firmware/43012B0.hex
118 ln -s /lib/firmware/bcm43012/BCM43012B0_002.001.021.0081.0087.hex /lib/firmware/43012B0.hex
119
120 %files exynos7270
121 %defattr(-,root,root,-)
122 %{_bindir}/setbd
123 /lib/firmware/bcm43012/BCM43012B0_002.001.021.0081.0087.hex
124 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
125 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start-exynos7270.sh
126 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh
127 /usr/share/license/%{name}
128 %{_libdir}/systemd/system/bluetooth-hciattach@.service
129 %{_libdir}/systemd/system/bluetooth-hci-device.service
130 %manifest %{name}.manifest