Add hci's command service file for Broadcom BT/FM request
[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.1.3
4 Release:    1
5 Group:      Hardware Support/Handset
6 License:    Apache
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 %prep
37 %setup -q
38
39 %build
40 cmake ./ -DCMAKE_INSTALL_PREFIX=%{_prefix} -DPLUGIN_INSTALL_PREFIX=%{_prefix}
41 make %{?jobs:-j%jobs}
42
43 %install
44 rm -rf %{buildroot}
45
46 %make_install
47
48 mkdir -p %{buildroot}/usr/share/license
49 cp LICENSE.APLv2 %{buildroot}/usr/share/license/%{name}
50 cat %{_builddir}/%{name}-%{version}/LICENSE.Broadcom >> %{buildroot}/usr/share/license/%{name}
51
52 install -D -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/system/bluetooth-hciattach@.service
53 install -D -m 0644 %SOURCE2 %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-device.service
54
55 %files
56 %defattr(-,root,root,-)
57 #%{_bindir}/bcmtool_4330b1
58 %exclude %{_bindir}/bcmtool_4343w
59 %{_bindir}/bcmtool_4358a1
60 %{_bindir}/setbd
61 #%{_prefix}/etc/bluetooth/BT_FW_BCM4330B1_002.001.003.0221.0265.hcd
62 %{_prefix}/etc/bluetooth/BT_FW_BCM4358A1_001.002.005.0032.0066.hcd
63 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
64 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start.sh
65 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh
66 %exclude %{_libdir}/systemd/system/bluetooth-hciattach@.service
67 %exclude %{_libdir}/systemd/system/bluetooth-hci-device.service
68 %manifest %{name}.manifest
69
70 %post exynos3250
71 rm -rf %{_prefix}/etc/bluetooth/bt-dev-start.sh
72 ln -s %{_prefix}/etc/bluetooth/bt-dev-start-exynos3250.sh %{_prefix}/etc/bluetooth/bt-dev-start.sh
73
74 %files exynos3250
75 %defattr(-,root,root,-)
76 %{_bindir}/bcmtool_4343w
77 %{_bindir}/setbd
78 %{_prefix}/etc/bluetooth/BCM4343A1_001.002.009.0035.0096_ORC_Orbis_WC1-S.hcd
79 %{_prefix}/etc/bluetooth/BCM4343A1_001.002.009.0022.0050_Murata_Type-1FR.hcd
80 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
81 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start-exynos3250.sh
82 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh
83 /usr/share/license/%{name}
84 %{_libdir}/systemd/system/bluetooth-hciattach@.service
85 %{_libdir}/systemd/system/bluetooth-hci-device.service
86 %manifest %{name}.manifest
87
88 %post artik
89 rm -rf %{_prefix}/etc/bluetooth/bt-dev-start.sh
90 ln -s %{_prefix}/etc/bluetooth/bt-dev-start-artik.sh %{_prefix}/etc/bluetooth/bt-dev-start.sh
91
92 %files artik
93 %defattr(644,root,root,-)
94 %{_bindir}/brcm_patchram_plus
95 %{_bindir}/setbd
96 %{_prefix}/etc/bluetooth/BCM4354_003.001.012.0353.0745_Samsung_Artik_ORC.hcd
97 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
98 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start-artik.sh
99 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh
100 /usr/share/license/%{name}
101 %{_libdir}/systemd/system/bluetooth-hciattach@.service
102 %{_libdir}/systemd/system/bluetooth-hci-device.service
103 %manifest %{name}.manifest