Add an IVI-specific systemd service 94/27694/1
authorManuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Wed, 17 Sep 2014 12:55:28 +0000 (14:55 +0200)
committerManuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Wed, 17 Sep 2014 12:55:28 +0000 (14:55 +0200)
IVI does not have a systemd setup similar to Common, most
notably the Weston part. This makes starting
"notifications-display.service" on IVI fail. Fix that.
This can safely be reverted in the future.

Change-Id: I48f169082a0e12e4b778710a2a34d8a4efcbe87f
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Makefile.am
configure.ac
notifications-display-ivi.service.in [new file with mode: 0644]
packaging/notification-service.spec

index 532cab3..f7ff9f5 100644 (file)
@@ -31,9 +31,10 @@ bluetooth_notification_client_LDADD = $(TIZEN_LIBS)
 
 SCRIPT_IN_FILES = \
      notifications.service.in \
-     notifications-display.service.in
+     notifications-display.service.in \
+     notifications-display-ivi.service.in
 
 install-data-hook:
        $(mkinstalldirs) $(DESTDIR)/usr/lib/systemd/system/
        install -m 0644 notifications.service $(DESTDIR)/usr/lib/systemd/system/notifications.service
-       install -m 0644 notifications-display.service $(DESTDIR)/usr/lib/systemd/system/notifications-display.service
+       install -m 0644 $(notif_display_service) $(DESTDIR)/usr/lib/systemd/system/notifications-display.service
index 2987c6b..d9db945 100644 (file)
@@ -15,10 +15,15 @@ AC_CHECK_FUNC([dlopen], [],
               AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
 AC_SUBST(DLOPEN_LIBS)
 
+AC_ARG_WITH(notif-display-service, AS_HELP_STRING([--with-notif-display-service=],[]),,
+            with_notif_display_service="notifications-display.service")
+notif_display_service=$with_notif_display_service
+AC_SUBST(notif_display_service)
+
 PKG_CHECK_MODULES([TIZEN], [eina ecore com-core notification dbus-1 bluetooth-api dlog libwlmessage])
 AC_SUBST(TIZEN_CFLAGS)
 AC_SUBST(TIZEN_LIBS)
 
-AC_CONFIG_FILES([Makefile plugins/Makefile notifications.service notifications-display.service])
+AC_CONFIG_FILES([Makefile plugins/Makefile notifications.service notifications-display.service notifications-display-ivi.service])
 AC_PROG_RANLIB([ranlib])
 AC_OUTPUT
diff --git a/notifications-display-ivi.service.in b/notifications-display-ivi.service.in
new file mode 100644 (file)
index 0000000..6e89495
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=Notifications Popup daemon
+Requires=notifications.service
+After=notifications.service
+
+[Service]
+ExecStart=/usr/bin/notification-display-service
+Environment=XDG_RUNTIME_DIR=/run/user/5000
+
+[Install]
+WantedBy=graphical.target
index 68dd000..5b552ed 100644 (file)
@@ -35,9 +35,16 @@ This package provides unit test used in the development of the notification serv
 %setup -q -n %{name}-%{version}
 
 %build
-%autogen
+%if "%{profile}" == "ivi"
+notifications_display_service="notifications-display-ivi.service"
+%else
+notifications_display_service="notifications-display.service"
+%endif
+
+%autogen --with-notif-display-service=$notifications_display_service
 make %{?_smp_mflags}
 
+
 %install
 %make_install
 %install_service graphical.target.wants notifications.service