Correctly install the Tizen.Device.js file and also add a new
authorRusty Lynch <rusty.lynch@intel.com>
Wed, 12 Sep 2012 21:10:59 +0000 (14:10 -0700)
committerRusty Lynch <rusty.lynch@intel.com>
Mon, 17 Sep 2012 21:16:02 +0000 (14:16 -0700)
systemd configuration causing sockdrawer to be automatically started

packaging/sockdrawer.changes
packaging/sockdrawer.service [new file with mode: 0644]
packaging/sockdrawer.spec

index a06577b..679869a 100644 (file)
@@ -1,3 +1,7 @@
+* Wed Sep 12 2012 Rusty Lynch <rusty.lynch@intel.com> 2e2bef7
+- Start installing Tizen.Device.js
+- Adding a systemd configuration
+
 * Fri Sep 07 2012 Rusty Lynch <rusty.lynch@intel.com> cb5c43d
 - Initial packaging
 
diff --git a/packaging/sockdrawer.service b/packaging/sockdrawer.service
new file mode 100644 (file)
index 0000000..3f0488b
--- /dev/null
@@ -0,0 +1,14 @@
+[Unit]
+Description=SockDrawer Daemon
+After=syslog.target 
+
+[Service]
+ExecStart=/usr/bin/sockdrawer --contentdir=/usr/share/sockdrawer
+ExecReload=/bin/kill -HUP $MAINPID
+KillMode=process
+Restart=always
+StandardOutput=syslog
+
+[Install]
+WantedBy=multi-user.target
+
index 73c31a5..8a4b1f6 100644 (file)
@@ -6,6 +6,7 @@ Group:      System/Libraries
 License:    GPLv2.1
 URL:        https://github.com/otcshare/sockdrawer
 Source0:    %{name}-%{version}.tar.bz2
+Source1:    sockdrawer.service
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
 
@@ -30,6 +31,10 @@ make %{?jobs:-j%jobs}
 rm -rf %{buildroot}
 %make_install
 
+mkdir -p $RPM_BUILD_ROOT/%{_libdir}/systemd/system/graphical.target.wants
+install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/%{_libdir}/systemd/system/
+ln -sf ../sockdrawer.service $RPM_BUILD_ROOT/%{_libdir}/systemd/system/graphical.target.wants/sockdrawer.service
+
 %post -p /sbin/ldconfig
 
 %postun -p /sbin/ldconfig
@@ -37,3 +42,6 @@ rm -rf %{buildroot}
 %files
 %defattr(-,root,root,-)
 %{_bindir}/sockdrawer
+%{_datadir}/sockdrawer/*
+%{_libdir}/systemd/system/sockdrawer.service
+%{_libdir}/systemd/system/graphical.target.wants/sockdrawer.service