SET(PREFIX ${CMAKE_INSTALL_PREFIX})
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.projectx.bt_core.service DESTINATION share/dbus-1/system-services)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bluetooth-frwk-core.service DESTINATION /usr/lib/systemd/system)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bluetooth-frwk-core.conf DESTINATION /etc/dbus-1/system.d)
--- /dev/null
+[Unit]
+Description=Bluetooth framework Core
+After=multi-user.target
+
+[Service]
+User=network_fw
+Group=network_fw
+SmackProcessLabel=System
+SupplementaryGroups=priv_mediastorage priv_externalstorage dialout
+Type=dbus
+BusName=org.projectx.bt_core
+ExecStart=/usr/bin/bt-core
+KillMode=process
+
+[Install]
+WantedBy=multi-user.target
# common
install -m 0644 packaging/bluetooth-frwk-common.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.common
+# bt-core
+install -m 0644 bt-core/bluetooth-frwk-core.service %{buildroot}%{_unitdir}/bluetooth-frwk-core.service
+
+
ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-frwk.service
ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/starter.target.wants/bluetooth-frwk.service
+%post core
+mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d
+ln -sf %{_libdir}/systemd/system/bluetooth-frwk-core.service %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-frwk-core.service
+ln -sf %{_libdir}/systemd/system/bluetooth-frwk-core.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+
+
%postun -p /sbin/ldconfig
%post service
%manifest %{name}.manifest
%license LICENSE
%defattr(-, root, root)
+%{_unitdir}/bluetooth-frwk-core.service
%{_datadir}/dbus-1/system-services/org.projectx.bt_core.service
%{_bindir}/bt-core
%{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf