+%bcond_with wayland
+
Name: notification-service
Summary: Simple notification service
Version: 0.0.3
Group: Application Framework/Notifications
License: Flora
Source0: %{name}-%{version}.tar.bz2
-BuildRequires: pkgconfig(eina)
-BuildRequires: pkgconfig(ecore)
-BuildRequires: pkgconfig(com-core)
+BuildRequires: pkgconfig(eina)
+BuildRequires: pkgconfig(ecore)
+BuildRequires: pkgconfig(com-core)
BuildRequires: pkgconfig(notification)
-BuildRequires: dbus-devel
+BuildRequires: pkgconfig(notification-service)
+BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(dbus-glib-1)
+BuildRequires: pkgconfig(dlog)
BuildRequires: bluetooth-frwk-devel
-BuildRequires: bundle-devel
+BuildRequires: pkgconfig(bundle)
+%if %{with wayland}
+BuildRequires: pkgconfig(libwlmessage)
+%endif
+%{?systemd_requires}
%description
Headless notification service that collects incoming notifications from the
%prep
%setup -q -n %{name}-%{version}
-%define PREFIX %{_prefix}/apps/
-
%build
+%if %{with wayland}
+%autogen --enable-wayland
+%else
%autogen
+%endif
make %{?_smp_mflags}
%install
-rm -rf %{buildroot}
%make_install
+%install_service graphical.target.wants notifications.service
+%install_service graphical.target.wants notifications_display.service
+
+%post
+%systemd_post notifications.service
+
+%preun
+%systemd_preun notifications.service
+
+%postun
+%systemd_postun notifications.service
%files
%defattr(-,root,root,-)
%{_bindir}/notification-service
-%{_libdir}/systemd/system/notifications.service
-%{_libdir}/systemd/system/notifications.socket
-%{_libdir}/systemd/system/sockets.target.wants/notifications.socket
+%{_bindir}/notification-display-service
+%{_unitdir}/notifications.service
+%{_unitdir}/notifications_display.service
+%{_unitdir}/graphical.target.wants/notifications.service
+%{_unitdir}/graphical.target.wants/notifications_display.service
%files test
%defattr(-,root,root,-)