Update spec file with the following 02/2202/2
authorGeoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Mon, 8 Oct 2012 07:50:32 +0000 (00:50 -0700)
committerGeoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Mon, 8 Oct 2012 07:56:34 +0000 (00:56 -0700)
 Use macros instead of hardocded paths
 Change from non-standard-group to Tizen group

Change-Id: I3583babb42dc00797cfc63cb0c1310e6bc773906

packaging/neard.spec

index 53eec4e..d695cd8 100644 (file)
@@ -1,14 +1,14 @@
 %define kernel_version 3.5
 %define kernel_target adaptation-intel-automotive
-Name:       neard
+Name:      neard
 Summary:    Near Field Communication Manager
 Version:    0.6
 Release:    7
-Group:      System/Networking
+Group:      System Environment/Daemons
 License:    GPLv2
-Source0:    http://www.kernel.org/pub/linux/network/nfc/neard-%{version}.tar.bz2
+Source0:    http://www.kernel.org/pub/linux/network/nfc/%{name}-%{version}.tar.bz2
 Source1:    init
-Source2:    neard.service
+Source2:    %{name}.service
 Requires(post): /bin/ln
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(dbus-1)
@@ -52,8 +52,6 @@ kver=`find /lib/modules -name "%{kernel_version}*%{kernel_target}" | cut -c 14-`
 CFLAGS+=" -I/usr/src/kernels/${kver}/include"
 %configure \
                --enable-debug \
-               --prefix=/usr \
-               --sysconfdir=/etc \
                --enable-nfctype1=builtin \
                --enable-nfctype2=builtin \
                --enable-nfctype3=builtin \
@@ -66,9 +64,9 @@ make %{?jobs:-j%jobs}
 %install
 %make_install
 
-mkdir -p %{buildroot}/etc/rc.d/init.d
-cp %{SOURCE1} %{buildroot}/etc/rc.d/init.d/neard
-chmod +x %{buildroot}/etc/rc.d/init.d/neard
+mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
+cp %{SOURCE1} %{buildroot}%{_sysconfdir}/rc.d/init.d/neard
+chmod +x %{buildroot}%{_sysconfdir}/rc.d/init.d/neard
 
 # Systemd service file
 install -d %{buildroot}%{_libdir}/systemd/system/
@@ -89,9 +87,9 @@ systemctl daemon-reload
 
 %files
 %doc COPYING
-/usr/libexec/neard
-/etc/dbus-1/system.d/org.neard.conf
-/etc/rc.d/init.d/*
+%{_libexecdir}/neard
+%{_sysconfdir}/dbus-1/system.d/org.neard.conf
+%{_sysconfdir}/rc.d/init.d/*
 %{_libdir}/systemd/system/neard.service
 %{_libdir}/systemd/system/network.target.wants/neard.service