Use %{_unitdir} macro to package systemd unit files 60/30160/1 accepted/tizen/common/20141113.110935 accepted/tizen/ivi/20141114.065909 submit/tizen/20141113.022717 submit/tizen_mobile/20141120.000000
authorMikko Ylinen <mikko.ylinen@intel.com>
Wed, 12 Nov 2014 07:24:02 +0000 (09:24 +0200)
committerMikko Ylinen <mikko.ylinen@intel.com>
Wed, 12 Nov 2014 07:24:02 +0000 (09:24 +0200)
Bug-Tizen: TC-1716 (partial)

Change-Id: I6404a3e04f205b991122ddbfaae1df521b1a2d19
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
packaging/nfc-manager-neard.spec

index 2303fed..53ca61e 100755 (executable)
@@ -119,9 +119,10 @@ MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 %install
 %make_install
 
-mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants
-cp -af %{SOURCE1} %{buildroot}%{_libdir}/systemd/system/
-ln -s ../%{name}.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/%{name}.service
+install -d %{buildroot}%{_unitdir}
+install -d %{buildroot}%{_unitdir}/multi-user.target.wants/
+install -m 644 %{S:1} %{buildroot}%{_unitdir}/%{name}.service
+ln -s ../%{name}.service %{buildroot}%{_unitdir}/multi-user.target.wants/%{name}.service
 
 %post
 /sbin/ldconfig
@@ -157,8 +158,8 @@ systemctl daemon-reload
 %defattr(-,root,root,-)
 %{_bindir}/nfc-manager-daemon
 #%%{_bindir}/ndef-tool
-%{_libdir}/systemd/system/%{name}.service
-%{_libdir}/systemd/system/multi-user.target.wants/%{name}.service
+%{_unitdir}/%{name}.service
+%{_unitdir}/multi-user.target.wants/%{name}.service
 %{_datadir}/dbus-1/system-services/org.tizen.NetNfcService.service
 %{_datadir}/packages/nfc-manager.xml
 %{_datadir}/nfc-manager-daemon/sounds/*