Add a license in spec file
[platform/adaptation/bluetooth-firmware-bcm.git] / packaging / bluetooth-firmware-bcm.spec
index b060c34..d7b1445 100644 (file)
@@ -1,12 +1,14 @@
 Name:      bluetooth-firmware-bcm
 Summary:    firmware and tools for bluetooth
-Version:    0.1.3
+Version:    0.2.0
 Release:    1
 Group:      Hardware Support/Handset
-License:    Apache
+License:    Apache-2.0 and Broadcom
 # NOTE: Source name does not match package name.  This should be
 # resolved in the future, by I don't have that power. - Ryan Ware
 Source0:    %{name}-%{version}.tar.gz
+Source1:    bluetooth-hciattach@.service
+Source2:    bluetooth-hci-device.service
 Provides:   bluetooth-scripts
 
 BuildRequires:  pkgconfig(vconf)
@@ -31,6 +33,22 @@ Provides:   bluetooth-scripts
 %description artik
 bcm firmware and tools for artik
 
+%package exynos7270
+Summary:    bcm firmware and tools for exynos7270
+Group:      Hardware Support/Handset
+Provides:   bluetooth-scripts
+
+%description exynos7270
+BT firmware and tools for exynos7270
+
+%package rpi3
+Summary:    bcm firmware and tools for rpi3
+Group:      Hardware Support/Handset
+Provides:   bluetooth-scripts
+
+%description rpi3
+BT firmware and tools for rpi3
+
 %prep
 %setup -q
 
@@ -43,11 +61,12 @@ rm -rf %{buildroot}
 
 %make_install
 
-mkdir -p %{buildroot}/usr/share/license
-cp LICENSE.APLv2 %{buildroot}/usr/share/license/%{name}
-cat %{_builddir}/%{name}-%{version}/LICENSE.Broadcom >> %{buildroot}/usr/share/license/%{name}
+install -D -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/system/bluetooth-hciattach@.service
+install -D -m 0644 %SOURCE2 %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-device.service
 
 %files
+%manifest %{name}.manifest
+%license LICENSE.APLv2 LICENSE.Broadcom
 %defattr(-,root,root,-)
 #%{_bindir}/bcmtool_4330b1
 %exclude %{_bindir}/bcmtool_4343w
@@ -58,6 +77,8 @@ cat %{_builddir}/%{name}-%{version}/LICENSE.Broadcom >> %{buildroot}/usr/share/l
 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start.sh
 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh
+%exclude %{_libdir}/systemd/system/bluetooth-hciattach@.service
+%exclude %{_libdir}/systemd/system/bluetooth-hci-device.service
 %manifest %{name}.manifest
 
 %post exynos3250
@@ -65,6 +86,8 @@ rm -rf %{_prefix}/etc/bluetooth/bt-dev-start.sh
 ln -s %{_prefix}/etc/bluetooth/bt-dev-start-exynos3250.sh %{_prefix}/etc/bluetooth/bt-dev-start.sh
 
 %files exynos3250
+%manifest %{name}.manifest
+%license LICENSE.APLv2 LICENSE.Broadcom
 %defattr(-,root,root,-)
 %{_bindir}/bcmtool_4343w
 %{_bindir}/setbd
@@ -73,7 +96,8 @@ ln -s %{_prefix}/etc/bluetooth/bt-dev-start-exynos3250.sh %{_prefix}/etc/bluetoo
 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start-exynos3250.sh
 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh
-/usr/share/license/%{name}
+%{_libdir}/systemd/system/bluetooth-hciattach@.service
+%{_libdir}/systemd/system/bluetooth-hci-device.service
 %manifest %{name}.manifest
 
 %post artik
@@ -81,12 +105,50 @@ rm -rf %{_prefix}/etc/bluetooth/bt-dev-start.sh
 ln -s %{_prefix}/etc/bluetooth/bt-dev-start-artik.sh %{_prefix}/etc/bluetooth/bt-dev-start.sh
 
 %files artik
+%manifest %{name}.manifest
+%license LICENSE.APLv2 LICENSE.Broadcom
 %defattr(644,root,root,-)
 %{_bindir}/brcm_patchram_plus
 %{_bindir}/setbd
 %{_prefix}/etc/bluetooth/BCM4354_003.001.012.0353.0745_Samsung_Artik_ORC.hcd
+%{_prefix}/etc/bluetooth/BCM4345C0_003.001.025.0111.0205.hcd
 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start-artik.sh
 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh
-/usr/share/license/%{name}
+%{_libdir}/systemd/system/bluetooth-hciattach@.service
+%{_libdir}/systemd/system/bluetooth-hci-device.service
+%manifest %{name}.manifest
+
+%post exynos7270
+rm -rf %{_prefix}/etc/bluetooth/bt-dev-start.sh
+ln -s %{_prefix}/etc/bluetooth/bt-dev-start-exynos7270.sh %{_prefix}/etc/bluetooth/bt-dev-start.sh
+rm -rf /lib/firmware/43012B0.hex
+ln -s /lib/firmware/bcm43012/BCM43012B0_002.001.021.0081.0087.hex /lib/firmware/43012B0.hex
+
+%files exynos7270
+%manifest %{name}.manifest
+%license LICENSE.APLv2 LICENSE.Broadcom
+%defattr(-,root,root,-)
+%{_bindir}/setbd
+/lib/firmware/bcm43012/BCM43012B0_002.001.021.0081.0087.hex
+%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
+%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start-exynos7270.sh
+%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-set-addr.sh
+%{_libdir}/systemd/system/bluetooth-hciattach@.service
+%{_libdir}/systemd/system/bluetooth-hci-device.service
+%manifest %{name}.manifest
+
+%post rpi3
+rm -rf %{_prefix}/etc/bluetooth/bt-dev-start.sh
+rm -rf %{_prefix}/etc/bluetooth/bt-dev-end.sh
+ln -s %{_prefix}/etc/bluetooth/bt-dev-start-rpi3.sh %{_prefix}/etc/bluetooth/bt-dev-start.sh
+ln -s %{_prefix}/etc/bluetooth/bt-dev-end-rpi3.sh %{_prefix}/etc/bluetooth/bt-dev-end.sh
+
+%files rpi3
+%manifest %{name}.manifest
+%license LICENSE.APLv2 LICENSE.Broadcom
+%defattr(-,root,root,-)
+%{_prefix}/etc/bluetooth/BCM43430A1.hcd
+%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end-rpi3.sh
+%attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start-rpi3.sh
 %manifest %{name}.manifest