Skip to content

Commit

Permalink
Improve building Starfish on Sailfish Application SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
direc85 authored and FlorentRevest committed Sep 19, 2021
1 parent 03efa00 commit 6fad664
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 18 deletions.
2 changes: 2 additions & 0 deletions asteroidsyncservice.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include(../version.pri)

TEMPLATE = subdirs
SUBDIRS = asteroidsyncservice asteroidsyncserviced
OTHER_FILES += \
Expand Down
2 changes: 1 addition & 1 deletion asteroidsyncservice/asteroidsyncservice.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ TEMPLATE = lib
TARGET = asteroidsyncserviceplugin
QT += qml quick dbus
CONFIG += qt plugin
include(../version.pri)
include(../../version.pri)

TARGET = $$qtLibraryTarget($$TARGET)
uri = org.asteroid.syncservice
Expand Down
2 changes: 1 addition & 1 deletion asteroidsyncserviced/asteroidsyncserviced.pro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
QT += core bluetooth dbus
QT -= gui

include(../version.pri)
include(../../version.pri)
include(libasteroid/libasteroid.pri)

contains(CONFIG, telescope) {
Expand Down
1 change: 1 addition & 0 deletions asteroidsyncserviced/bluez/bluezclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "bluezclient.h"
#include "dbus-shared.h"
#include "../libasteroid/services/common.h"

#include <QDBusConnection>
#include <QDBusReply>
Expand Down
2 changes: 0 additions & 2 deletions asteroidsyncserviced/bluez/bluezclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
#include "bluez_adapter1.h"
#include "bluez_agentmanager1.h"

#define NOTIF_UUID "00009071-0000-0000-0000-00a57e401d05"

class Device {
public:
QBluetoothAddress address;
Expand Down
14 changes: 7 additions & 7 deletions asteroidsyncserviced/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);

WatchesManager *watchesManager = new WatchesManager();
#ifdef UBUNTU_TOUCH_PLATFORM
UbuntuPlatform *platform = new UbuntuPlatform(watchesManager);
#elif SAILFISHOS_PLATFORM
SailfishPlatform *platform = new SailfishPlatform(watchesManager);
#endif
DBusInterface *dbusInterface = new DBusInterface(watchesManager);
WatchesManager watchesManager;
#ifdef UBUNTU_TOUCH_PLATFORM
UbuntuPlatform platform(&watchesManager);
#elif SAILFISHOS_PLATFORM
SailfishPlatform platform(&watchesManager);
#endif
DBusInterface dbusInterface(&watchesManager);

return a.exec();
}
14 changes: 7 additions & 7 deletions rpm/asteroidsyncservice.spec
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ Support for AsteroidOS watches in SailfishOS.
rm -rf %{buildroot}
%qmake5_install

mkdir -p %{buildroot}%{_libdir}/systemd/user/user-session.target.wants
ln -s ../asteroidsyncserviced.service %{buildroot}%{_libdir}/systemd/user/user-session.target.wants/
mkdir -p %{buildroot}%{_userunitdir}/user-session.target.wants
ln -s ../asteroidsyncserviced.service %{buildroot}%{_userunitdir}/user-session.target.wants/

%post
grep -q "^/usr/bin/asteroidsyncserviced" /usr/share/mapplauncherd/privileges || echo "/usr/bin/asteroidsyncserviced,cehlmnpu" >> /usr/share/mapplauncherd/privileges
su nemo -c 'systemctl --user daemon-reload'
su nemo -c 'systemctl --user try-restart asteroidsyncserviced.service'
echo "/usr/bin/asteroidsyncserviced,cehlmnpu" > /usr/share/mapplauncherd/privileges.d/harbour-asteroidsyncserviced.privileges
systemctl-user daemon-reload
systemctl-user try-restart asteroidsyncserviced.service

%files
%defattr(-,root,root,-)
%{_bindir}
%{_libdir}/systemd/user/%{name}d.service
%{_libdir}/systemd/user/user-session.target.wants/%{name}d.service
%{_userunitdir}/%{name}d.service
%{_userunitdir}/user-session.target.wants/%{name}d.service
%{_libdir}/qt5/qml/org/asteroid/syncservice

0 comments on commit 6fad664

Please sign in to comment.