Increase the version to 8.0
[platform/core/connectivity/bluetooth-tools.git] / packaging / bluetooth-tools.spec
index 65af919..5e6797e 100644 (file)
@@ -1,7 +1,7 @@
 Name:       bluetooth-tools
 Summary:    Bluetooth-tools
-Version:    0.2.37
-Release:    0
+Version:    0.8.0
+Release:    1
 Group:      Network & Connectivity/Bluetooth
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
@@ -9,7 +9,6 @@ Source0:    %{name}-%{version}.tar.gz
 BuildRequires:  cmake
 Suggests:       bluetooth-share
 Requires:       tizen-platform-config-tools
-Requires:      bluetooth-scripts
 Requires:   %{name}-compat = %{version}-%{release}
 Recommends:   %{name}-profile_common = %{version}-%{release}
 
@@ -57,8 +56,6 @@ Bluetooth-tools extension for Tizen ivi profile.
 Summary:    On/Off Bluetooth adapter
 Group:      Network & Connectivity/Bluetooth
 Requires:   %{name} = %{version}-%{release}
-Requires:   rfkill
-Provides:   bluetooth-scripts
 Conflicts:  bluetooth-firmware-bcm
 
 %description no-firmware
@@ -91,73 +88,32 @@ mkdir -p %{buildroot}/run/bluetooth
 install -m 0755 scripts/bt-dev-start.sh %{buildroot}%{_prefix}/etc/bluetooth/bt-dev-start.sh
 install -m 0755 scripts/bt-dev-end.sh %{buildroot}%{_prefix}/etc/bluetooth/bt-dev-end.sh
 
-#install -D -m 0644 packaging/bluetooth-hci-logger.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-logger.service
-#install -D -m 0644 packaging/bluetooth-hci-logger.path %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-logger.path
+install -D -m 0644 packaging/bluetooth-stack-up.service %{buildroot}%{_unitdir}/bluetooth-stack-up.service
 
-#install -D -m 0644 packaging/bluetooth-hci-logger-stop.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-logger-stop.service
-#install -D -m 0644 packaging/bluetooth-hci-logger-stop.path %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-logger-stop.path
+install -D -m 0644 packaging/bluetooth-stack-down.service %{buildroot}%{_unitdir}/bluetooth-stack-down.service
 
-install -D -m 0644 packaging/bluez-start.service %{buildroot}%{_libdir}/systemd/system/bluez-start.service
-install -D -m 0644 packaging/bluez-start.path %{buildroot}%{_libdir}/systemd/system/bluez-start.path
+install -D -m 0644 packaging/bluetooth-stack-down-with-radio.service %{buildroot}%{_unitdir}/bluetooth-stack-down-with-radio.service
 
-install -D -m 0644 packaging/bluetooth-stack-up.service %{buildroot}%{_libdir}/systemd/system/bluetooth-stack-up.service
-install -D -m 0644 packaging/bluetooth-stack-up.path %{buildroot}%{_libdir}/systemd/system/bluetooth-stack-up.path
+#install -D -m 0644 packaging/bluetooth-force-hci-logger.service %{buildroot}%{_unitdir}/bluetooth-force-hci-logger.service
+#install -D -m 0644 packaging/bluetooth-hci-dump@.service %{buildroot}%{_unitdir}/bluetooth-hci-dump@.service
 
-install -D -m 0644 packaging/bluetooth-stack-down.service %{buildroot}%{_libdir}/systemd/system/bluetooth-stack-down.service
-install -D -m 0644 packaging/bluetooth-stack-down.path %{buildroot}%{_libdir}/systemd/system/bluetooth-stack-down.path
+install -D -m 0644 packaging/bluetooth-hci-up.service %{buildroot}%{_unitdir}/bluetooth-hci-up.service
+install -D -m 0644 packaging/bluetooth-hci-down.service %{buildroot}%{_unitdir}/bluetooth-hci-down.service
 
-install -D -m 0644 packaging/bluetooth-stack-down-with-radio.service %{buildroot}%{_libdir}/systemd/system/bluetooth-stack-down-with-radio.service
-install -D -m 0644 packaging/bluetooth-stack-down-with-radio.path %{buildroot}%{_libdir}/systemd/system/bluetooth-stack-down-with-radio.path
-
-#install -D -m 0644 packaging/bluetooth-force-hci-logger.service %{buildroot}%{_libdir}/systemd/system/bluetooth-force-hci-logger.service
-#install -D -m 0644 packaging/bluetooth-hci-dump@.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-dump@.service
-
-install -D -m 0644 packaging/bluetooth-hci-up.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-up.service
-install -D -m 0644 packaging/bluetooth-hci-up.path %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-up.path
-install -D -m 0644 packaging/bluetooth-hci-down.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-down.service
-install -D -m 0644 packaging/bluetooth-hci-down.path %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-down.path
+install -D -m 0644 packaging/bluetooth-stack-up-common.service %{buildroot}%{_unitdir}/bluetooth-stack-up-common.service
+install -D -m 0644 packaging/bluetooth-stack-down-common.service %{buildroot}%{_unitdir}/bluetooth-stack-down-common.service
 
 %post
-mkdir -p %{_libdir}/systemd/system/multi-user.target.wants/
-#ln -sf %{_libdir}/systemd/system/bluetooth-hci-logger.path %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-hci-logger.path
-#ln -sf %{_libdir}/systemd/system/bluetooth-hci-logger-stop.path %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-hci-logger-stop.path
-ln -sf %{_libdir}/systemd/system/bluez-start.path %{_libdir}/systemd/system/multi-user.target.wants/bluez-start.path
-ln -sf %{_libdir}/systemd/system/bluetooth-stack-up.path %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-stack-up.path
-ln -sf %{_libdir}/systemd/system/bluetooth-stack-down.path %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-stack-down.path
-ln -sf %{_libdir}/systemd/system/bluetooth-hci-up.path %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-hci-up.path
-ln -sf %{_libdir}/systemd/system/bluetooth-hci-down.path %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-hci-down.path
+mkdir -p %{_unitdir}/multi-user.target.wants/
 
 %files
 %manifest %{name}.manifest
 %license LICENSE.APLv2
 %defattr(-,root,root,-)
-#%exclude %{_sysconfdir}/rc.d/init.d/bluetooth-address
-#%{_sysconfdir}/rc.d/rc3.d/S60bluetooth-address
-#%{_sysconfdir}/rc.d/rc5.d/S60bluetooth-address
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-on.sh
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-dev-up.sh
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-mode-on.sh
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-off.sh
-#%attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-hci-logdump.sh
-#%attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-run-hci-logger.sh
-#%{_unitdir}/multi-user.target.wants/bluetooth-address.service
-#%{_unitdir}/bluetooth-address.service
-#%{_libdir}/systemd/system/bluetooth-hci-logger.service
-#%{_libdir}/systemd/system/bluetooth-hci-logger.path
-#%{_libdir}/systemd/system/bluetooth-hci-logger-stop.service
-#%{_libdir}/systemd/system/bluetooth-hci-logger-stop.path
-%{_libdir}/systemd/system/bluez-start.service
-%{_libdir}/systemd/system/bluez-start.path
-#%{_libdir}/systemd/system/bluetooth-force-hci-logger.service
-#%{_libdir}/systemd/system/bluetooth-hci-dump@.service
-%{_libdir}/systemd/system/bluetooth-stack-up.service
-%{_libdir}/systemd/system/bluetooth-stack-up.path
-%{_libdir}/systemd/system/bluetooth-stack-down.service
-%{_libdir}/systemd/system/bluetooth-stack-down.path
-%{_libdir}/systemd/system/bluetooth-hci-up.service
-%{_libdir}/systemd/system/bluetooth-hci-up.path
-%{_libdir}/systemd/system/bluetooth-hci-down.service
-%{_libdir}/systemd/system/bluetooth-hci-down.path
 
 %post profile_common
 pushd %{_prefix}/etc/bluetooth/
@@ -165,18 +121,30 @@ ln -sf common/bt-stack-up.sh bt-stack-up.sh
 ln -sf common/bt-stack-down.sh bt-stack-down.sh
 ln -sf common/bt-reset-env.sh bt-reset-env.sh
 popd
+pushd %{_unitdir}
+mv bluetooth-stack-up-common.service bluetooth-stack-up.service
+mv bluetooth-stack-down-common.service bluetooth-stack-down.service
+popd
 %preun profile_common
 pushd %{_prefix}/etc/bluetooth/
 rm bt-stack-up.sh
 rm bt-stack-down.sh
 rm bt-reset-env.sh
 popd
+pushd %{_unitdir}
+rm bluetooth-stack-up.service
+rm bluetooth-stack-down.service
+popd
 %files profile_common
 %license LICENSE.APLv2
 #%{_sysconfdir}/rc.d/init.d/bluetooth-address
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/common/bt-stack-up.sh
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/common/bt-stack-down.sh
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/common/bt-reset-env.sh
+%{_unitdir}/bluetooth-stack-up-common.service
+%{_unitdir}/bluetooth-stack-down-common.service
+%{_unitdir}/bluetooth-hci-up.service
+%{_unitdir}/bluetooth-hci-down.service
 
 %post profile_mobile
 pushd %{_prefix}/etc/bluetooth/
@@ -184,7 +152,6 @@ ln -sf mobile/bt-stack-up.sh bt-stack-up.sh
 ln -sf mobile/bt-stack-down.sh bt-stack-down.sh
 ln -sf mobile/bt-stack-down-with-radio.sh bt-stack-down-with-radio.sh
 ln -sf mobile/bt-reset-env.sh bt-reset-env.sh
-ln -sf %{_libdir}/systemd/system/bluetooth-stack-down-with-radio.path %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-stack-down-with-radio.path
 popd
 %preun profile_mobile
 pushd %{_prefix}/etc/bluetooth/
@@ -199,8 +166,11 @@ popd
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/mobile/bt-stack-down.sh
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/mobile/bt-reset-env.sh
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/mobile/bt-stack-down-with-radio.sh
-%{_libdir}/systemd/system/bluetooth-stack-down-with-radio.service
-%{_libdir}/systemd/system/bluetooth-stack-down-with-radio.path
+%{_unitdir}/bluetooth-stack-down-with-radio.service
+%{_unitdir}/bluetooth-stack-up.service
+%{_unitdir}/bluetooth-stack-down.service
+%{_unitdir}/bluetooth-hci-up.service
+%{_unitdir}/bluetooth-hci-down.service
 
 %post profile_ivi
 pushd %{_prefix}/etc/bluetooth/
@@ -219,6 +189,10 @@ popd
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/ivi/bt-stack-up.sh
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/ivi/bt-stack-down.sh
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/ivi/bt-reset-env.sh
+%{_unitdir}/bluetooth-stack-up.service
+%{_unitdir}/bluetooth-stack-down.service
+%{_unitdir}/bluetooth-hci-up.service
+%{_unitdir}/bluetooth-hci-down.service
 
 %post profile_wearable
 pushd %{_prefix}/etc/bluetooth/
@@ -237,6 +211,10 @@ popd
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/wearable/bt-stack-up.sh
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/wearable/bt-stack-down.sh
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/wearable/bt-reset-env.sh
+%{_unitdir}/bluetooth-stack-up.service
+%{_unitdir}/bluetooth-stack-down.service
+%{_unitdir}/bluetooth-hci-up.service
+%{_unitdir}/bluetooth-hci-down.service
 
 %files no-firmware
 %manifest %{name}.manifest
@@ -244,3 +222,8 @@ popd
 %defattr(-, root, root)
 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-end.sh
 %attr(755,-,-) %{_prefix}/etc/bluetooth/bt-dev-start.sh
+%{_unitdir}/bluetooth-stack-up.service
+%{_unitdir}/bluetooth-stack-down.service
+%{_unitdir}/bluetooth-hci-up.service
+%{_unitdir}/bluetooth-hci-down.service
+